Skip to content

Commit eba2504

Browse files
authored
Merge pull request #2507 from ERGO-Code/fix-2501
Understand why presolve cannot be used for AC calculation
2 parents f4a67f7 + 1058480 commit eba2504

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

highs/lp_data/Highs.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,9 +1302,12 @@ HighsStatus Highs::optimizeModel() {
13021302
// return HighsStatus::kOk;
13031303
}
13041304

1305-
if (!basis_.valid && solution_.value_valid) {
1306-
// There is no valid basis, but there is a valid solution, so use
1307-
// it to construct a basis
1305+
const bool can_use_basis =
1306+
!this->model_.lp_.isMip() || options_.solve_relaxation;
1307+
if (can_use_basis && !basis_.valid && solution_.value_valid) {
1308+
// Solver may be able to make use of basis, and there is no valid
1309+
// basis, but there is a valid solution, so use it to construct a
1310+
// basis
13081311
return_status =
13091312
interpretCallStatus(options_.log_options, basisForSolution(),
13101313
return_status, "basisForSolution");

0 commit comments

Comments
 (0)