@@ -98,14 +98,14 @@ std::string HighsMipSolverData::solutionSourceToString(
9898
9999bool HighsMipSolverData::checkSolution (
100100 const std::vector<double >& solution) const {
101- for (HighsInt i = 0 ; i != mipsolver.model_ -> num_col_ ; ++i) {
101+ for (HighsInt i = 0 ; i != mipsolver.numCol () ; ++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 ;
104104 if (mipsolver.isColInteger (i) && fractionality (solution[i]) > feastol)
105105 return false ;
106106 }
107107
108- for (HighsInt i = 0 ; i != mipsolver.model_ -> num_row_ ; ++i) {
108+ for (HighsInt i = 0 ; i != mipsolver.numRow () ; ++i) {
109109 double rowactivity = 0.0 ;
110110
111111 HighsInt start = ARstart_[i];
@@ -125,7 +125,7 @@ std::vector<std::tuple<HighsInt, HighsInt, double>>
125125HighsMipSolverData::getInfeasibleRows (
126126 const std::vector<double >& solution) const {
127127 std::vector<std::tuple<HighsInt, HighsInt, double >> infeasibleRows;
128- for (HighsInt i = 0 ; i != mipsolver.model_ -> num_row_ ; ++i) {
128+ for (HighsInt i = 0 ; i != mipsolver.numRow () ; ++i) {
129129 HighsInt start = ARstart_[i];
130130 HighsInt end = ARstart_[i + 1 ];
131131
@@ -149,11 +149,11 @@ HighsMipSolverData::getInfeasibleRows(
149149
150150bool HighsMipSolverData::trySolution (const std::vector<double >& solution,
151151 const int solution_source) {
152- if (int (solution.size ()) != mipsolver.model_ -> num_col_ ) return false ;
152+ if (int (solution.size ()) != mipsolver.numCol () ) return false ;
153153
154154 HighsCDouble obj = 0 ;
155155
156- for (HighsInt i = 0 ; i != mipsolver.model_ -> num_col_ ; ++i) {
156+ for (HighsInt i = 0 ; i != mipsolver.numCol () ; ++i) {
157157 if (solution[i] < mipsolver.model_ ->col_lower_ [i] - feastol) return false ;
158158 if (solution[i] > mipsolver.model_ ->col_upper_ [i] + feastol) return false ;
159159 if (mipsolver.isColInteger (i) && fractionality (solution[i]) > feastol)
@@ -162,7 +162,7 @@ bool HighsMipSolverData::trySolution(const std::vector<double>& solution,
162162 obj += mipsolver.colCost (i) * solution[i];
163163 }
164164
165- for (HighsInt i = 0 ; i != mipsolver.model_ -> num_row_ ; ++i) {
165+ for (HighsInt i = 0 ; i != mipsolver.numRow () ; ++i) {
166166 double rowactivity = 0.0 ;
167167
168168 HighsInt start = ARstart_[i];
@@ -180,7 +180,7 @@ bool HighsMipSolverData::trySolution(const std::vector<double>& solution,
180180
181181bool HighsMipSolverData::solutionRowFeasible (
182182 const std::vector<double >& solution) const {
183- for (HighsInt i = 0 ; i != mipsolver.model_ -> num_row_ ; ++i) {
183+ for (HighsInt i = 0 ; i != mipsolver.numRow () ; ++i) {
184184 HighsCDouble c_double_rowactivity = HighsCDouble (0.0 );
185185
186186 HighsInt start = ARstart_[i];
@@ -260,7 +260,7 @@ HighsModelStatus HighsMipSolverData::trivialHeuristics() {
260260 const double feasibility_tolerance =
261261 mipsolver.options_mip_ ->mip_feasibility_tolerance ;
262262 // Loop through the trivial heuristics
263- std::vector<double > solution (mipsolver.model_ -> num_col_ );
263+ std::vector<double > solution (mipsolver.numCol () );
264264 for (HighsInt try_heuristic = 0 ; try_heuristic < num_try_heuristic;
265265 try_heuristic++) {
266266 if (try_heuristic == 0 ) {
@@ -271,15 +271,15 @@ HighsModelStatus HighsMipSolverData::trivialHeuristics() {
271271 if (!all_integer_lower_non_positive) continue ;
272272 // Determine whether a zero row activity is feasible
273273 bool heuristic_failed = false ;
274- for (HighsInt iRow = 0 ; iRow < mipsolver.model_ -> num_row_ ; iRow++) {
274+ for (HighsInt iRow = 0 ; iRow < mipsolver.numRow () ; iRow++) {
275275 if (row_lower[iRow] > feasibility_tolerance ||
276276 row_upper[iRow] < -feasibility_tolerance) {
277277 heuristic_failed = true ;
278278 break ;
279279 }
280280 }
281281 if (heuristic_failed) continue ;
282- solution.assign (mipsolver.model_ -> num_col_ , 0 );
282+ solution.assign (mipsolver.numCol () , 0 );
283283 } else if (try_heuristic == 1 ) {
284284 // Second heuristic is to see whether all-lower for integer
285285 // variables (if distinct from all-zero) is feasible
@@ -320,7 +320,7 @@ HighsModelStatus HighsMipSolverData::trivialHeuristics() {
320320 }
321321
322322 HighsCDouble cdouble_obj = 0.0 ;
323- for (HighsInt iCol = 0 ; iCol < mipsolver.model_ -> num_col_ ; iCol++)
323+ for (HighsInt iCol = 0 ; iCol < mipsolver.numCol () ; iCol++)
324324 cdouble_obj += mipsolver.colCost (iCol) * solution[iCol];
325325 double obj = double (cdouble_obj);
326326 const double save_upper_bound = upper_bound;
@@ -692,8 +692,7 @@ void HighsMipSolverData::removeFixedIndices() {
692692}
693693
694694void HighsMipSolverData::init () {
695- postSolveStack.initializeIndexMaps (mipsolver.model_ ->num_row_ ,
696- mipsolver.model_ ->num_col_ );
695+ postSolveStack.initializeIndexMaps (mipsolver.numRow (), mipsolver.numCol ());
697696 mipsolver.orig_model_ = mipsolver.model_ ;
698697 feastol = mipsolver.options_mip_ ->mip_feasibility_tolerance ;
699698 epsilon = mipsolver.options_mip_ ->small_matrix_value ;
@@ -887,11 +886,11 @@ void HighsMipSolverData::runSetup() {
887886 }
888887 }
889888
890- rowintegral.resize (mipsolver.model_ -> num_row_ );
889+ rowintegral.resize (mipsolver.numRow () );
891890
892891 // compute the maximal absolute coefficients to filter propagation
893- maxAbsRowCoef.resize (mipsolver.model_ -> num_row_ );
894- for (HighsInt i = 0 ; i != mipsolver.model_ -> num_row_ ; ++i) {
892+ maxAbsRowCoef.resize (mipsolver.numRow () );
893+ for (HighsInt i = 0 ; i != mipsolver.numRow () ; ++i) {
895894 double maxabsval = 0.0 ;
896895
897896 HighsInt start = ARstart_[i];
@@ -1074,7 +1073,7 @@ void HighsMipSolverData::runSetup() {
10741073 debugSolution.debugOrigSolution );
10751074 debugSolution.debugSolObjective = 0 ;
10761075 HighsCDouble debugsolobj = 0.0 ;
1077- for (HighsInt i = 0 ; i != mipsolver.model_ -> num_col_ ; ++i)
1076+ for (HighsInt i = 0 ; i != mipsolver.numCol () ; ++i)
10781077 debugsolobj +=
10791078 mipsolver.colCost (i) * HighsCDouble (debugSolution.debugSolution [i]);
10801079 debugSolution.debugSolObjective = static_cast <double >(debugsolobj);
@@ -1301,7 +1300,7 @@ void HighsMipSolverData::performRestart() {
13011300 root_basis.valid = true ;
13021301 root_basis.useful = true ;
13031302
1304- for (HighsInt i = 0 ; i < mipsolver.model_ -> num_col_ ; ++i)
1303+ for (HighsInt i = 0 ; i < mipsolver.numCol () ; ++i)
13051304 root_basis.col_status [postSolveStack.getOrigColIndex (i)] =
13061305 basis.col_status [i];
13071306
@@ -2570,8 +2569,8 @@ void HighsMipSolverData::setupDomainPropagation() {
25702569 pseudocost = HighsPseudocost (mipsolver);
25712570
25722571 // compute the maximal absolute coefficients to filter propagation
2573- maxAbsRowCoef.resize (mipsolver.model_ -> num_row_ );
2574- for (HighsInt i = 0 ; i != mipsolver.model_ -> num_row_ ; ++i) {
2572+ maxAbsRowCoef.resize (mipsolver.numRow () );
2573+ for (HighsInt i = 0 ; i != mipsolver.numRow () ; ++i) {
25752574 double maxabsval = 0.0 ;
25762575
25772576 HighsInt start = ARstart_[i];
0 commit comments