Open Ogaday opened 6 months ago
Looking into this briefly, I believe this is an issue in the LP writer. It appears to be converting Piecewise
to SOS
rather than any of the piecewise options, which I believe would be the preferred option (e.g., Pwl).
@michaelbynum , @jsiirola - Thoughts?
Note - the issue starts in line 40, aka:
x11: S2::
x9:1
x5:2
x6:3
x7:4
Summary
I'm having trouble with Piecewise constraints and the GLPK solver.
I've reproduced the problem with a simple example from Pyomo's github. See below for error message.
Steps to reproduce the issue
Error Message
tmp2n5b9j40.pyomo.lp
:Information on your system
Pyomo version: pyomo 6.7.1 Python version: Python 3.10.8 Operating system: Ubuntu 22.04.4 LTS on Windows 10 x86_64 (WSL) / Kernel: 5.15.146.1-microsoft-standard-WSL2 How Pyomo was installed (PyPI, conda, source): PyPI/Poetry Solver (if applicable): GLPK 5.0
Solver installed via
apt
:Additional information
Changing the solver to
cbc
, or settingpw_repn="DCC"
both seem to solve the issue. Is this behaviour expected? My optimisation knowledge is fairly shallow. If there are some combinations of solvers and arguments that aren't feasible could this be documented?Thanks in advance!