File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
HRT/4_YESBIN_2STA_NOMERGED_BOTHTIES Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -234,8 +234,9 @@ int Allocation::reductionMineDoctors(int mode) {
234234 int remHere = 0 ;
235235#endif /* DEBUG */
236236 for (int k = worst_rank + 1 ; k < doctors[i].nbPref ; k++) {
237+ nbTotRem += doctors[i].preferences [k].size ();
238+ doctors[i].nbTotPref -= doctors[i].preferences [k].size ();
237239 for (size_t id = 0 ; id < doctors[i].preferences [k].size (); ++id) {
238- nbTotRem += 1 ;
239240#ifdef DEBUG
240241 remHere += 1 ;
241242#endif /* DEBUG */
@@ -452,11 +453,11 @@ int Allocation::reductionExactDoctor(bool supp) {
452453 int remHere = 0 ;
453454#endif /* DEBUG */
454455 for (int k = rank + 1 ; k < doctors[i].nbPref ; k++) {
455- for (size_t id = 0 ; id < doctors[i].preferences [k].size (); ++id) {
456- nbTotRem += 1 ;
456+ nbTotRem += doctors[i].preferences [k].size ();
457457#ifdef DEBUG
458- remHere += 1 ;
458+ remHere += doctors[i]. preferences [k]. size () ;
459459#endif /* DEBUG */
460+ for (size_t id = 0 ; id < doctors[i].preferences [k].size (); ++id) {
460461 int idxHos = doctors[i].preferences [k][id] - 1 ;
461462 // remove from idxHos any reference to i.
462463 for (size_t rank = 0 ; rank < hospitals[idxHos].preferences .size (); ++rank) {
You can’t perform that action at this time.
0 commit comments