Skip to content

Commit

Permalink
Merge branch 'main' into rc_spoke_bugfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven authored Nov 22, 2024
2 parents b639a05 + 42fc896 commit 05eb632
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions doc/src/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ In its current state, the user might opt-in to presolve for two reasons:
2. For problems where a "fixer" extension or spoke is used, determining tight bounds on the
non-anticipative variables may improve the fixer's performance.

.. Note::
Like many solvers, the presolver will convert infinite bounds to 1e+100.

.. Note::
This capability requires the auto-persistent pyomo solver interface (APPSI) extensions
for Pyomo to be built on your system. This can be achieved by running ``pyomo build-extensions``
Expand Down
5 changes: 3 additions & 2 deletions mpisppy/opt/presolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

from mpisppy import MPI

_INF = 1e+100

class _SPPresolver(abc.ABC):
"""Defines a presolver for distributed stochastic optimization problems
Expand Down Expand Up @@ -379,15 +380,15 @@ def _lb_generator(var_iterable):
for v in var_iterable:
lb = v.lb
if lb is None:
yield -np.inf
yield -_INF
yield lb


def _ub_generator(var_iterable):
for v in var_iterable:
ub = v.ub
if ub is None:
yield np.inf
yield _INF
yield ub


Expand Down

0 comments on commit 05eb632

Please sign in to comment.