forked from science-ation/science-ation
- 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.
This commit is contained in:
parent
8972b5219f
commit
b47ac24ed1
@ -67,7 +67,7 @@ set_percent(0);
|
|||||||
- Foreach student in a tour
|
- Foreach student in a tour
|
||||||
+15 - Above the grade level
|
+15 - Above the grade level
|
||||||
+25 - Below 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,...):
|
If ranked (rank=1,2,3,4,...):
|
||||||
+(rank*rank*5 - 5) = +0, +15, +40, +75
|
+(rank*rank*5 - 5) = +0, +15, +40, +75
|
||||||
If not ranked and max choices specified
|
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' */
|
/* Search the schools array for insteances of '1' */
|
||||||
foreach($schools as $sid=>$cnt) {
|
foreach($schools as $sid=>$cnt) {
|
||||||
if($cnt == 1) $cost += 5;
|
if($cnt == 1) $cost += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRACE("Team $bucket_id, cost is $cost\n");
|
// TRACE("Team $bucket_id, cost is $cost\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user