Pyomo/pyomo

NL writer linear presolver not detecting infeasibility

bknueven opened this issue · 1 comments

Summary

Trying out the linear presolver in WaterTAP, I found one of our tests failed to fail. It induces failure by specifying the infeasible model below. Turning off the linear presolver gives the expected result.

Steps to reproduce the issue

from pyomo.environ import *

m = ConcreteModel()
m.x = Var()
m.c = Constraint(expr = m.x == 5)
m.d = Constraint(expr = m.x >= 10) 

results = SolverFactory("ipopt_v2").solve(m, tee=True)

print(results)
Problem: 
- Lower bound: -inf
  Upper bound: inf
  Number of objectives: 0
  Number of constraints: nan
  Number of variables: nan
  Sense: unknown
Solver: 
- Status: ok
  Termination condition: optimal
  Termination message: TerminationCondition.convergenceCriteriaSatisfied
Solution: 
- number of solutions: 0
  number of solutions displayed: 0

Information on your system

Pyomo version: 0e749d0
Python version: 3.11.8
Operating system: macOS
How Pyomo was installed (PyPI, conda, source): source
Solver (if applicable): Ipopt

Additional information

I think this is partially due to bad logic in the interface...