Skip to content

Commit

Permalink
Readd missing constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
WPettersson committed Sep 11, 2019
1 parent 9d0493f commit 1c31853
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions SMTI/3_NOBIN_1STA_YESMERGED_MAXWT/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@ int manlove(Allocation& allo, int mode){

model.update();

for (int i = 0; i < allo.nbChildren; i++){
for (int j = 0; j<allo.children[i].nbPref; j++){
for(int k=0; k<allo.children[i].preferences[j].size();k++){
int idxFam = allo.children[i].preferences[j][k];
int idxRank = allo.children[i].ranks[j][k];
allocationOfChildI[i] += isChildIAllocatedToFamilyJ[i][j][k];
allocationOfFamilyJ[idxFam] += isChildIAllocatedToFamilyJ[i][j][k];
for (int l= idxRank; l < allo.families[idxFam].preferences.size(); l++){
fillingOfFamilyJUpToRankK[idxFam][l] += isChildIAllocatedToFamilyJ[i][j][k];
}
}
}
}

// Perform values
for (int i = 0; i < allo.nbChildren; i++) {
for (size_t j = 0; j < allo.children[i].nbPref; ++j) {
Expand Down

0 comments on commit 1c31853

Please sign in to comment.