Skip to content

Commit

Permalink
fixes tolerance in cut separation
Browse files Browse the repository at this point in the history
  • Loading branch information
hlefebvr committed Oct 10, 2023
1 parent 9311cac commit 13f6726
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ void idol::impl::CutSeparation::operator()(CallbackEvent t_event) {

m_separation_problem->set_obj_expr(std::move(objective));

idol_Log(Debug, "Start solving separation problem");
m_separation_problem->optimize();
idol_Log(Debug, "Stop solving separation problem");

const auto status = m_separation_problem->get_status();

Expand All @@ -63,10 +65,13 @@ void idol::impl::CutSeparation::operator()(CallbackEvent t_event) {

m_separation_problem->set_solution_index(k);

if (k == 0 && m_separation_problem->get_best_obj() >= 1e-3) {
if (k == 0 && m_separation_problem->get_best_obj() >= -1e-3) {
std::cout << "STOP" << std::endl;
break;
}

idol_Log(Debug, "Violation: " << m_separation_problem->get_best_obj() << ".")

const auto& solution = save_primal(*m_separation_problem);

TempCtr cut(m_cut.row().fix(solution), m_cut.type());
Expand Down

0 comments on commit 13f6726

Please sign in to comment.