Skip to content

Commit

Permalink
change model_->solver() to oSolver for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxies committed Mar 17, 2022
1 parent 76cb6be commit e166fac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/MibSBilevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ MibSBilevel::checkBilevelFeasiblity(bool isRoot)
shouldStoreValuesUBSol.resize(lN + uN);
}

const double * sol = model_->solver()->getColSolution();
const double * sol = oSolver->getColSolution();

std::vector<double> linkSol;
for(i = 0; i < uN; i++){
Expand Down Expand Up @@ -875,7 +875,7 @@ MibSBilevel::checkBilevelFeasiblity(bool isRoot)
int begPos = uN + i * truncLN;
CoinDisjointCopyN(partialValuesUB, truncLN, valuesUB + begPos);
}
objVal += UBSolver->getObjValue() * model_->solver()->getObjSense();
objVal += UBSolver->getObjValue() * oSolver->getObjSense();
}
else{
isUBProvenOptimal = false;
Expand Down Expand Up @@ -963,7 +963,7 @@ MibSBilevel::checkBilevelFeasiblity(bool isRoot)
else{
index = uN + i;
}
if ((model_->solver()->isInteger(index)) &&
if ((oSolver->isInteger(index)) &&
(((lowerSol[i] - floor(lowerSol[i])) < etol) ||
((ceil(lowerSol[i]) - lowerSol[i]) < etol))){
optLowerSolutionOrd_[i] = (double) floor(lowerSol[i] + 0.5);
Expand Down

0 comments on commit e166fac

Please sign in to comment.