From b47ac24ed11f0846441c80e58c7014e6cfc50d12 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 23 Dec 2007 19:15:50 +0000 Subject: [PATCH] - Decrease the cost of students not from the same school +5 could lead to a large penalty (5*20=100) which exceeds the cost of a 1st vs. 2nd choice tour. This could cause a student to be bumped to a 2nd choice tour for no reason other than to fix the schools. The idea for duplicate schools is to only prefer to have 2 students from the same school on a tour if there's a choice that oculd go either way, this will break that tie. --- admin/tours_sa.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/tours_sa.php b/admin/tours_sa.php index 1470f0a..b5dfe9f 100644 --- a/admin/tours_sa.php +++ b/admin/tours_sa.php @@ -67,7 +67,7 @@ set_percent(0); - Foreach student in a tour +15 - Above the grade level +25 - Below the grade level - +5 - Noone from the same school + +2 - Noone from the same school If ranked (rank=1,2,3,4,...): +(rank*rank*5 - 5) = +0, +15, +40, +75 If not ranked and max choices specified @@ -152,7 +152,7 @@ function tour_cost_function($annealer, $bucket_id, $ids) /* Search the schools array for insteances of '1' */ foreach($schools as $sid=>$cnt) { - if($cnt == 1) $cost += 5; + if($cnt == 1) $cost += 2; } // TRACE("Team $bucket_id, cost is $cost\n");