Skip to content

Commit

Permalink
Merge branch 'main' of github.com:hlefebvr/idol
Browse files Browse the repository at this point in the history
  • Loading branch information
hlefebvr committed Oct 22, 2024
2 parents 4b289df + 6f19a82 commit ed7b96a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void idol::Optimizers::Bilevel::MibS::hook_optimize() {
m_use_cplex_for_feasibility,
get_param_logs());
}

m_mibs->solve();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,14 @@ idol::SolutionReason idol::impl::MibSFromAPI::get_reason() const {
}

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

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ void idol::impl::MibSFromFile::solve() {

Bilevel::write_to_file(m_model, m_description, filename);

m_osi_solver->messageHandler()->setLogLevel(0);

m_mibs.setSolver(m_osi_solver.get());

const auto time_limit = std::to_string(m_model.optimizer().get_remaining_time());
Expand Down Expand Up @@ -135,7 +137,14 @@ idol::SolutionReason idol::impl::MibSFromFile::get_reason() const {
}

double idol::impl::MibSFromFile::get_best_bound() const {
return m_broker->getBestEstimateQuality();
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 ed7b96a

Please sign in to comment.