forked from science-ation/science-ation
Make division preferences have slightly higher priority than category preferences.
Add an additional (fairly large) cost for creating a completely empty team Change the experience to use a weighted experience instead of a sum, and give a weighted cost to teams for less than 5 years weighted experience, but onyl if there's more than 1 person on the team (1 person teams are not penalized for not having any experience)
This commit is contained in:
parent
e2b5208aee
commit
534981a0b9
@ -124,6 +124,10 @@ function judges_cost_function($annealer, $bucket_id, $ids)
|
||||
$cost += $min * 50;
|
||||
$cost += $max * 10;
|
||||
|
||||
//add an additional large cost above the minimum requirement cost if the team is completely empty
|
||||
if($c==0)
|
||||
$cost+=50;
|
||||
|
||||
// TRACE("Under min=$min, over max=$max\n");
|
||||
|
||||
/* For each judge on the team, score their preferences */
|
||||
@ -151,7 +155,8 @@ function judges_cost_function($annealer, $bucket_id, $ids)
|
||||
// TRACE("Judge {$ids[$x]}({$j['name']}) cp=$cpref, dp=$dpref\n");
|
||||
|
||||
$cost += 2 * $cpref;
|
||||
$cost += 2 * $dpref;
|
||||
//division matching is more important than category matching
|
||||
$cost += 3 * $dpref;
|
||||
|
||||
/* See if the judge is willing to chair a team */
|
||||
if($j['willing_chair'] == 'yes') $have_chair = true;
|
||||
@ -189,9 +194,10 @@ function judges_cost_function($annealer, $bucket_id, $ids)
|
||||
if($have_div2 == false) $cost += 40;
|
||||
}
|
||||
|
||||
/* Small penalty for a jteam with no experience whatsoever */
|
||||
if($years_experience == 0) {
|
||||
$cost += 2;
|
||||
/* Small penalty for a jteam with very little experience,
|
||||
* but only if there's more than 1 person on the team */
|
||||
if($years_experience_weighted<5 && count($ids)>1) {
|
||||
$cost += (5-$years_experience_weighted)*2;
|
||||
}
|
||||
|
||||
// TRACE("Team $bucket_id, cost is $cost\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user