You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
sudo apt install glpk-doc glpk-utils libglpk-dev python3-swiglpk
# glpk-doc is already the newest version (5.0-1).# glpk-utils is already the newest version (5.0-1).# libglpk-dev is already the newest version (5.0-1).# python3-swiglpk is already the newest version (4.65.1-1build2).
Additional information
Changing the solver to cbc, or setting pw_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!
The text was updated successfully, but these errors were encountered:
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).
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!
The text was updated successfully, but these errors were encountered: