forked from science-ation/science-ation
Add a cost for judges assigned to a team that speak more languages than they need for that team
(ie, a bilingual judge being used for an english-only team)
This commit is contained in:
parent
8d6d653567
commit
951b7209d9
@ -163,12 +163,22 @@ function judges_cost_function($annealer, $bucket_id, $ids)
|
||||
if(!in_array($l, $j['languages'])) $cost += 45;
|
||||
}
|
||||
|
||||
/* For each additional language that the judge knows that they dont need
|
||||
* increase the cost, this should hopefully stop the condition where
|
||||
* it uses up all the bilingual judges for english only teams
|
||||
* leaving no french/bilingual judges for the french teams */
|
||||
$tlangs_count=count($t['langs']);
|
||||
$jlangs_count=count($j['languages']);
|
||||
if($jlangs_count>$tlangs_count)
|
||||
$cost+=($jlangs_count-$tlangs_count)*15;
|
||||
|
||||
/* If divisional round2 is enabled, make sure there is a judge
|
||||
* on the team for round2 */
|
||||
if($j['available_for_divisional2'] == true) $have_div2 = true;
|
||||
|
||||
/* Add up the years experience */
|
||||
$years_experience += $j['years_school'] + $j['years_regional'] + $j['years_national'];
|
||||
$years_experience_weighted += $j['years_school'] + $j['years_regional']*2 + $j['years_national']*4;
|
||||
|
||||
}
|
||||
/* Huge penalty for a team without a willing chair, but only if the min judges per team >1 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user