From e166facd9ba4128d57354348b17439f9497a3b50 Mon Sep 17 00:00:00 2001 From: Yu Xie Date: Wed, 16 Mar 2022 23:17:14 -0400 Subject: [PATCH] change model_->solver() to oSolver for consistency --- src/MibSBilevel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MibSBilevel.cpp b/src/MibSBilevel.cpp index 2dd9464b..f35ff8e8 100644 --- a/src/MibSBilevel.cpp +++ b/src/MibSBilevel.cpp @@ -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 linkSol; for(i = 0; i < uN; i++){ @@ -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; @@ -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);