Skip to content

Commit

Permalink
fix seg fault when lb not accessible in MibS
Browse files Browse the repository at this point in the history
  • Loading branch information
hlefebvr committed Oct 21, 2024
1 parent 3a25419 commit e9c35f4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,14 @@ idol::SolutionReason idol::impl::MibSFromFile::get_reason() const {
}

double idol::impl::MibSFromFile::get_best_bound() const {
return m_broker->getBestNode()->getQuality();
if (get_status() == Optimal) {
return get_best_obj();
}
const auto *node = m_broker->getBestNode();
if (node) {
return node->getQuality();
}
return -Inf;
}

void idol::impl::MibSFromFile::make_variable_index_in_mps() {
Expand Down

0 comments on commit e9c35f4

Please sign in to comment.