Skip to content

Commit

Permalink
try fix update penalty
Browse files Browse the repository at this point in the history
  • Loading branch information
hlefebvr committed Oct 11, 2024
1 parent 61f18ad commit 2554381
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ class idol::ADM::Formulation {
void update_penalty_parameters(const std::vector<Solution::Primal>& 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) {}
};

Expand Down

0 comments on commit 2554381

Please sign in to comment.