Skip to content

Commit

Permalink
Fixing bug in ISIC Type 2 when doing fractional separation
Browse files Browse the repository at this point in the history
  • Loading branch information
tkralphs committed Nov 26, 2023
1 parent 234a738 commit 6ae82f3
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/MibSCutGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,8 +925,10 @@ MibSCutGenerator::findLowerLevelSol(double *uselessIneqs, double *lowerLevelSol,
addedRow.append(row);
//since linking vars are int, we are sure that multA2XOpt
//is integer.
value = floor(multA2XOpt[i] + 0.5);
addedRow.insert(i + lCols, value - multA2XMax[i]);
// TKR: This is no longer true, now that we have fractional separation
//value = floor(multA2XOpt[i] + 0.5);
//addedRow.insert(i + lCols, value - multA2XMax[i]);
addedRow.insert(i + lCols, multA2XOpt[i] - multA2XMax[i]);
newMatrix->appendRow(addedRow);
addedRow.clear();
}
Expand Down Expand Up @@ -1073,11 +1075,6 @@ MibSCutGenerator::findLowerLevelSol(double *uselessIneqs, double *lowerLevelSol,
CoinDisjointCopyN(optSol + lCols, numBinCols, uselessIneqs);
foundSolution = true;
}
else{//this case should not happen when we use intersection cut for removing
//the optimal solution of relaxation which satisfies integrality requirements
//throw CoinError("The MIP which gives the best lower-level sol, cannot be infeasible!",
// "findLowerLevelSol", "MibSCutGenerator");
}
}

delete [] multA2XOpt;
Expand Down Expand Up @@ -1532,14 +1529,6 @@ MibSCutGenerator::findLowerLevelSolImprovingDirectionIC(double *uselessIneqs, do
CoinDisjointCopyN(optSol + lCols, numContCols, uselessIneqs);
foundSolution = true;
}
else{//this case should not happen when we use intersection cut for removing
//the optimal solution of relaxation which satisfies integrality requirements
//std::cout << "iteration = " << localModel_->countIteration_ << std::endl;
//std::cout << "remaining time = " << remainingTime << std::endl;
//std::cout << "current time = " << timeLimit - localModel_->broker_->subTreeTimer().getTime() << std::endl;
//throw CoinError("The MIP which is solved for ImprovingDirectionIC, cannot be infeasible!",
// "findLowerLevelSolImprovingDirectionIC", "MibSCutGenerator");
}
delete [] lCoeffsTimesLpSol;
return foundSolution;
}
Expand Down

0 comments on commit 6ae82f3

Please sign in to comment.