Skip to content

Commit

Permalink
fix for mipstart ans maximization
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Sep 13, 2024
1 parent b95ba13 commit bc74ac6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Cbc/src/CbcSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5840,6 +5840,14 @@ int CbcMain1(int argc, const char *argv[],
babModel_->createContinuousSolver();
babModel_->setBestSolution(CBC_ROUNDING,
obj, &x[0], 1);
/* But this is outside branchAndBound so needs to know
about direction */
if (babModel_->getObjSense()==-1.0) {
babModel_->setCutoff(-obj);
babModel_->setMinimizationObjValue(-obj);
// and solver (solver will flip)
babModel_->solver()->setDblParam(OsiDualObjectiveLimit,obj);
}
babModel_->clearContinuousSolver();
babModel_->passInSolverCharacteristics(NULL);
if (useSolution == 0)
Expand Down

0 comments on commit bc74ac6

Please sign in to comment.