diff --git a/admin/judges_sa.php b/admin/judges_sa.php index 932fad21..2fab6630 100644 --- a/admin/judges_sa.php +++ b/admin/judges_sa.php @@ -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");