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
If I create a Var that has an empty domain created by intersecting Binary and $\{2, 3\}$ (the model is structurally infeasible), the LP writer croaks somewhere in figuring out the domain (I think).
Traceback (most recent call last):
File "/home/esjohn/src/pyomo/pyomo/core/base/set.py", line 729, in _get_discrete_interval
step = min(abs(r.step) for r in ranges if r.step != 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: min() arg is an empty sequence
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/esjohn/src/pyomo/just_checking.py", line 11, in <module>
SolverFactory('gurobi').solve(m, tee=True)
File "/home/esjohn/src/pyomo/pyomo/opt/base/solvers.py", line 598, in solve
self._presolve(*args, **kwds)
File "/home/esjohn/src/pyomo/pyomo/solvers/plugins/solvers/GUROBI.py", line 249, in _presolve
ILMLicensedSystemCallSolver._presolve(self, *args, **kwds)
File "/home/esjohn/src/pyomo/pyomo/opt/solver/shellcmd.py", line 223, in _presolve
OptSolver._presolve(self, *args, **kwds)
File "/home/esjohn/src/pyomo/pyomo/opt/base/solvers.py", line 704, in _presolve
self._convert_problem(
File "/home/esjohn/src/pyomo/pyomo/opt/base/solvers.py", line 756, in _convert_problem
return convert_problem(
^^^^^^^^^^^^^^^^
File "/home/esjohn/src/pyomo/pyomo/opt/base/convert.py", line 97, in convert_problem
problem_files, symbol_map = converter.apply(*tmp, **tmpkw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/esjohn/src/pyomo/pyomo/solvers/plugins/converter/model.py", line 78, in apply
(problem_filename, symbol_map_id) = instance.write(
^^^^^^^^^^^^^^^
File "/home/esjohn/src/pyomo/pyomo/core/base/block.py", line 1940, in write
(filename, smap) = problem_writer(self, filename, solver_capability, io_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/esjohn/src/pyomo/pyomo/repn/plugins/lp_writer.py", line 208, in __call__
info = self.write(model, FILE, **io_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/esjohn/src/pyomo/pyomo/repn/plugins/lp_writer.py", line 241, in write
return _LPWriter_impl(ostream, config).write(model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/esjohn/src/pyomo/pyomo/repn/plugins/lp_writer.py", line 522, in write
if v.is_binary():
^^^^^^^^^^^^^
File "/home/esjohn/src/pyomo/pyomo/core/base/var.py", line 190, in is_binary
return domain.get_interval() == (0, 1, 1)
^^^^^^^^^^^^^^^^^^^^^
File "/home/esjohn/src/pyomo/pyomo/core/base/set.py", line 704, in get_interval
return self._get_discrete_interval()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/esjohn/src/pyomo/pyomo/core/base/set.py", line 738, in _get_discrete_interval
return (vals[0], vals[0], 0)
~~~~^^^
IndexError: list index out of range
Information on your system
Pyomo version: main
Python version: 3.11
Operating system:
How Pyomo was installed (PyPI, conda, source):
Solver (if applicable):
The text was updated successfully, but these errors were encountered:
Summary
If I create a$\{2, 3\}$ (the model is structurally infeasible), the LP writer croaks somewhere in figuring out the domain (I think).
Var
that has an empty domain created by intersectingBinary
andSteps to reproduce the issue
Error Message
Information on your system
Pyomo version: main
Python version: 3.11
Operating system:
How Pyomo was installed (PyPI, conda, source):
Solver (if applicable):
The text was updated successfully, but these errors were encountered: