@@ -101,8 +101,7 @@ bool HighsMipSolverData::checkSolution(
101101 for (HighsInt i = 0 ; i != mipsolver.model_ ->num_col_ ; ++i) {
102102 if (solution[i] < mipsolver.model_ ->col_lower_ [i] - feastol) return false ;
103103 if (solution[i] > mipsolver.model_ ->col_upper_ [i] + feastol) return false ;
104- if (mipsolver.variableType (i) == HighsVarType::kInteger &&
105- fractionality (solution[i]) > feastol)
104+ if (mipsolver.isColInteger (i) && fractionality (solution[i]) > feastol)
106105 return false ;
107106 }
108107
@@ -157,8 +156,7 @@ bool HighsMipSolverData::trySolution(const std::vector<double>& solution,
157156 for (HighsInt i = 0 ; i != mipsolver.model_ ->num_col_ ; ++i) {
158157 if (solution[i] < mipsolver.model_ ->col_lower_ [i] - feastol) return false ;
159158 if (solution[i] > mipsolver.model_ ->col_upper_ [i] + feastol) return false ;
160- if (mipsolver.variableType (i) == HighsVarType::kInteger &&
161- fractionality (solution[i]) > feastol)
159+ if (mipsolver.isColInteger (i) && fractionality (solution[i]) > feastol)
162160 return false ;
163161
164162 obj += mipsolver.colCost (i) * solution[i];
@@ -465,15 +463,15 @@ void HighsMipSolverData::finishAnalyticCenterComputation(
465463 HighsDomain::Reason::unspecified ());
466464 if (mipsolver.mipdata_ ->domain .infeasible ()) return ;
467465 ++nfixed;
468- if (mipsolver.variableType (i) == HighsVarType:: kInteger ) ++nintfixed;
466+ if (mipsolver.isColInteger (i)) ++nintfixed;
469467 } else if (analyticCenter[i] >=
470468 mipsolver.model_ ->col_upper_ [i] - tolerance) {
471469 mipsolver.mipdata_ ->domain .changeBound (
472470 HighsBoundType::kLower , i, mipsolver.model_ ->col_upper_ [i],
473471 HighsDomain::Reason::unspecified ());
474472 if (mipsolver.mipdata_ ->domain .infeasible ()) return ;
475473 ++nfixed;
476- if (mipsolver.variableType (i) == HighsVarType:: kInteger ) ++nintfixed;
474+ if (mipsolver.isColInteger (i)) ++nintfixed;
477475 }
478476 }
479477 if (nfixed > 0 )
@@ -900,10 +898,8 @@ void HighsMipSolverData::runSetup() {
900898 HighsInt end = ARstart_[i + 1 ];
901899 bool integral = true ;
902900 for (HighsInt j = start; j != end; ++j) {
903- integral =
904- integral &&
905- mipsolver.variableType (ARindex_[j]) != HighsVarType::kContinuous &&
906- fractionality (ARvalue_[j]) <= epsilon;
901+ integral = integral && mipsolver.isColIntegral (ARindex_[j]) &&
902+ fractionality (ARvalue_[j]) <= epsilon;
907903
908904 maxabsval = std::max (maxabsval, std::abs (ARvalue_[j]));
909905 }
0 commit comments