-
Notifications
You must be signed in to change notification settings - Fork 274
Open
Description
Describe the bug
Two sided constraint is infeasible when the equivalent version using two one sided constraints is not.
When I define the below two sided constraint the problem is infeasible
In this problem,
ramp_rate_delta is a positive parameter
meter_power_current and meter_power_previous are continuous variables
slack_below and slack_above are continuous non negative variables
model.addCons(
-ramp_rate_delta
<= ((
meter_power_current
- meter_power_previous
+ slack_below
- slack_above)
<= ramp_rate_delta
),
name=f"ramp_rate_cons_{step}",
)
However, when I formulate this using two single sided constraints the problem is feasible
below_cons = model.addCons(
-ramp_rate_delta
<=
meter_power_current
- meter_power_previous
+ slack_below
)
above_cons = model.addCons(
meter_power_current
- meter_power_previous
- slack_above
<= ramp_rate_delta
)
To Reproduce
Unsure if this helps, but I have saved the model file for both formulations and attached in zip file
Expected behavior
The two seemingly equivalent formulations to both be feasible
System
- OS: macOS tahoe
- Version 26
- SCIP version
- installed using
uv add pyscipopt
Metadata
Metadata
Assignees
Labels
No labels