linopy
linopy copied to clipboard
Infeasible constraint ignored
Version Checks (indicate both or one)
-
[x] I have confirmed this bug exists on the lastest release of Linopy.
-
[ ] I have confirmed this bug exists on the current
masterbranch of Linopy.
Issue Description
The infeasible constraints that only use parameters are ignored by the solving phase that returns that the solution is optimal.
Reproducible Example
import linopy
model = linopy.Model()
x = model.add_variables([0], [10], name="x")
model.add_constraints(linopy.LinearExpression(12, model)==linopy.LinearExpression(13, model))
model.add_objective(x, "minimize")
model.solve()
Expected Behavior
It should return infeasible
Installed Versions
linopy 0.5.8