diff --git a/lib/include/idol/optimizers/mixed-integer-optimization/padm/Formulation.h b/lib/include/idol/optimizers/mixed-integer-optimization/padm/Formulation.h index 5c058931..6341ed8b 100644 --- a/lib/include/idol/optimizers/mixed-integer-optimization/padm/Formulation.h +++ b/lib/include/idol/optimizers/mixed-integer-optimization/padm/Formulation.h @@ -47,11 +47,11 @@ class idol::ADM::Formulation { void update_penalty_parameters(const std::vector& t_primals, PenaltyUpdate& t_penalty_update); struct CurrentPenalty { - Ctr constraint; - Var variable; - double max_violation; - double penalty; - CurrentPenalty(Ctr t_constraint, Var t_variable, double t_max_violation, double t_penalty) + const Ctr constraint; + const Var variable; + const double max_violation; + double& penalty; + CurrentPenalty(Ctr t_constraint, Var t_variable, double t_max_violation, double& t_penalty) : constraint(std::move(t_constraint)), variable(t_variable), max_violation(t_max_violation), penalty(t_penalty) {} };