Skip to content

Infeasible constraint ignored #517

@MiftariB

Description

@MiftariB

Version Checks (indicate both or one)

  • I have confirmed this bug exists on the lastest release of Linopy.

  • I have confirmed this bug exists on the current master branch 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

Details linopy 0.5.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions