Skip to content

Commit

Permalink
fixes add constraint in DW Formulation
Browse files Browse the repository at this point in the history
  • Loading branch information
hlefebvr committed Nov 15, 2023
1 parent 7e34e8d commit 98277d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/optimizers/dantzig-wolfe/Formulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,13 @@ void idol::DantzigWolfe::Formulation::add(const idol::Ctr &t_ctr, idol::CtrType
const auto sub_problem_id = t_ctr.get(m_decomposition_by_ctr);

if (sub_problem_id != MasterId) {
m_sub_problems[sub_problem_id].add(t_ctr, TempCtr(Row(t_row), t_type));

remove_column_if(sub_problem_id, [&](const Var& t_alpha, const Solution::Primal& t_generator) {
return t_row.is_violated(t_generator, t_type);
});

m_sub_problems[sub_problem_id].add(t_ctr, TempCtr(Row(t_row), t_type));

return;
}

Expand Down

0 comments on commit 98277d4

Please sign in to comment.