Skip to content

Commit 1058480

Browse files
committed
Understand why presolve cannot be used for AC calculation
1 parent b3fee7c commit 1058480

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
@@ -1300,9 +1300,12 @@ HighsStatus Highs::optimizeModel() {
13001300
// return HighsStatus::kOk;
13011301
}
13021302

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

0 commit comments

Comments
 (0)