You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same issue doesn't happen if we use edit variable in a constraint instead of constant.
I tried debugging the issue, and saw that set_constant_ method is returning from https://github.com/Nocte-/rhea/blob/0.3/rhea/simplex_solver.cpp#L184 without adding any row to infeasible_rows_, and therefore dual_optimize function is not called.
Here is the sample project which is reproducing the problem: https://github.com/har-gup/rhea-constant-issue.
The same issue doesn't happen if we use edit variable in a constraint instead of constant.
I tried debugging the issue, and saw that set_constant_ method is returning from https://github.com/Nocte-/rhea/blob/0.3/rhea/simplex_solver.cpp#L184 without adding any row to infeasible_rows_, and therefore dual_optimize function is not called.
@Nocte- If we change following lines https://github.com/Nocte-/rhea/blob/0.3/rhea/simplex_solver.cpp#L164 and https://github.com/Nocte-/rhea/blob/0.3/rhea/simplex_solver.cpp#L202 to
auto delta = -(constant - evs.prev_constant);
, andexpr.add(expr.coefficient(evs.marker) * delta);
respectively, the way it is in suggest_value_ function https://github.com/Nocte-/rhea/blob/0.3/rhea/simplex_solver.cpp#L265 then it works fine.The text was updated successfully, but these errors were encountered: