diff --git a/admin/judges_sa.php b/admin/judges_sa.php index 2fab6630..c0b32bb5 100644 --- a/admin/judges_sa.php +++ b/admin/judges_sa.php @@ -139,15 +139,18 @@ function judges_cost_function($annealer, $bucket_id, $ids) for($y=0; $y < count($t['cats']); $y++) { $l = $t['cats'][$y]; /* Lookup the judge cat pref for this category */ - $pref = -$j['catprefs'][$l] + 2; + $pref = -$j['cat_prefs'][$l] + 2; /* $pref = 0 (best match) --- 4 (worst match) */ + //but wait, if they're "indifferent" then we really dont care, so the cost for it shoudl be 0. + if($pref==2) $pref=0; + $cpref += $pref; } $dpref = 0; for($y=0; $y < count($t['divs']); $y++) { $l = $t['divs'][$y]; /* Lookup the judge cat pref for this category */ - $pref = -$j['divprefs'][$l] + 2; + $pref = -$j['div_prefs'][$l] + 5; /* $pref = 0 (best match) --- 4 (worst match) */ $dpref += $pref; } @@ -326,11 +329,22 @@ function pr_judge(&$jt, $jid) print("("); foreach($jt['cats'] as $c) print("c{$c}={$j['cat_prefs'][$c]} "); + echo " / "; + foreach($j['cat_prefs'] AS $k=>$v) { + print("c{$k}=$v "); + } + echo ") ("; + foreach($jt['divs'] as $d) print("d{$d}={$j['div_prefs'][$d]} "); + echo " / "; + foreach($j['div_prefs'] AS $k=>$v) { + print("d{$k}=$v "); + } + print(")"); - if($j['willing_chair'] == 'yes') print(" (chair) "); + if($j['willing_chair'] == 'yes') print(" chair "); print("\n"); } @@ -737,7 +751,7 @@ for($x=1;$x