Skip to content

Commit

Permalink
fix abort when barrier infeasible
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Dec 6, 2023
1 parent b20cf3d commit fc22d85
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/ClpPredictorCorrector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,8 @@ int ClpPredictorCorrector::solve()
// save last gap
checkGap = complementarityGap_;
numberFixed = updateSolution(nextGap);
if (numberFixed<0)
break;
numberFixedTotal += numberFixed;
} /* endwhile */
delete[] saveX;
Expand Down Expand Up @@ -3677,12 +3679,18 @@ int ClpPredictorCorrector::updateSolution(CoinWorkDouble /*nextGap*/)
}
//objectiveValue();
if (solutionNorm_ > 1.0e40) {
std::cout << "primal off to infinity" << std::endl;
abort();
handler_->message(CLP_GENERAL, messages_)
<< "Barrier declaring infeasible"
<< CoinMessageEol;
problemStatus_=1;
return -1;
}
if (objectiveNorm_ > 1.0e40) {
std::cout << "dual off to infinity" << std::endl;
abort();
handler_->message(CLP_GENERAL, messages_)
<< "Barrier declaring infeasible"
<< CoinMessageEol;
problemStatus_=1;
return -1;
}
handler_->message(CLP_BARRIER_STEP, messages_)
<< static_cast< double >(actualPrimalStep_)
Expand Down

0 comments on commit fc22d85

Please sign in to comment.