Skip to content
Snippets Groups Projects
Commit ba5d4043 authored by Andreas Beckmann's avatar Andreas Beckmann
Browse files

do not assign unsuitable candidates with weight 0.0

parent a8c15472
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ perl sohpc-assign.pl slots.csv weights-pref.csv students.csv project-preference ...@@ -25,7 +25,7 @@ perl sohpc-assign.pl slots.csv weights-pref.csv students.csv project-preference
# apply tentative selections # apply tentative selections
if true ; then if true ; then
sed -n -e '1aID,selected' -e 's/\([0-9\.]\{4,\}\)[: ]\{1,\}\([0-9]\{1,\}\).*/-\2,\1/p' select-by-pref.txt > assign-t.csv sed -n -e '1aID,selected' -e 's/\([0-9\.]\{4,\}\)[: ]\{1,\}\([1-9][0-9]\{0,\}\).*/-\2,\1/p' select-by-pref.txt > assign-t.csv
rm -rf Selection rm -rf Selection
mkdir Selection mkdir Selection
cd Selection cd Selection
......
...@@ -147,6 +147,7 @@ while (@todo) { ...@@ -147,6 +147,7 @@ while (@todo) {
next if defined $project2student{$p}{$slot}; next if defined $project2student{$p}{$slot};
foreach $c (@{$project{$p}{cand}}) { foreach $c (@{$project{$p}{cand}}) {
next if defined $student2project{$c->{student}}; next if defined $student2project{$c->{student}};
next unless $c->{value} > 0;
push @cand, {project => $p, slot => $slot, student => $c, value => $c->{value} + max_score({%project2student, $p => {%{$project2student{$p}}, $slot => $c->{student}}}, {%student2project, $c->{student} => $p})}; push @cand, {project => $p, slot => $slot, student => $c, value => $c->{value} + max_score({%project2student, $p => {%{$project2student{$p}}, $slot => $c->{student}}}, {%student2project, $c->{student} => $p})};
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment