Skip to content

Commit

Permalink
Make numerical factor flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraBuettner committed Dec 10, 2024
1 parent 53933a4 commit 2e9fd14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etrago/execute/mga.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def mga_electrolysis_expansion(
objective = m.objective
if not isinstance(objective, (LinearExpression, QuadraticExpression)):
objective = objective.expression
numerical_factor = 1e-5
m.add_constraints(
objective + fixed_cost <= (1 + slack) * optimal_cost, name="budget"
numerical_factor*(objective + fixed_cost) <= numerical_factor*((1 + slack) * optimal_cost), name="budget"
)

# parse optimization sense
Expand Down

0 comments on commit 2e9fd14

Please sign in to comment.