Skip to content

Commit 7ca6ea8

Browse files
Merge branch 'main' into pyros-sep-priorities-update
2 parents 599f5e4 + a8d0bfa commit 7ca6ea8

File tree

39 files changed

+1704
-571
lines changed

39 files changed

+1704
-571
lines changed

.github/workflows/typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,6 @@ EOF = "EOF"
7171
lst = "lst"
7272
# Abbreviation of gamma (used in stochpdegas1_automatic.py)
7373
gam = "gam"
74+
# Regex search term from contrib/solver/solvers/ipopt
75+
ond = "ond"
7476
# AS NEEDED: Add More Words Below

doc/OnlineDocs/explanation/analysis/parmest/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Python package dependencies
2121
IPOPT
2222
-----
2323

24-
IPOPT can be downloaded from https://projects.coin-or.org/Ipopt.
24+
The IPOPT project homepage is https://github.com/coin-or/Ipopt
2525

2626
Testing
2727
-------

doc/OnlineDocs/explanation/analysis/sensitivity_toolbox.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Sensitivity Toolbox
33

44
The sensitivity toolbox provides a Pyomo interface to sIPOPT and k_aug to very quickly compute approximate solutions to nonlinear programs with a small perturbation in model parameters.
55

6-
See the `sIPOPT documentation <https://projects.coin-or.org/Ipopt/wiki/sIpopt>`_ or the `following paper <https://link.springer.com/article/10.1007/s12532-012-0043-2>`_ for additional details:
6+
See the `sIPOPT documentation <https://coin-or.github.io/Ipopt/SPECIALS.html#SIPOPT>`_ or the `following paper <https://link.springer.com/article/10.1007/s12532-012-0043-2>`_ for additional details:
77

88
H. Pirnay, R. Lopez-Negrete, and L.T. Biegler, Optimal Sensitivity based on IPOPT, Math. Prog. Comp., 4(4):307--331, 2012.
99

@@ -185,7 +185,7 @@ Installing sIPOPT and k_aug
185185
The sensitivity toolbox requires either sIPOPT or k_aug to be installed and available in your system PATH. See the sIPOPT and k_aug documentation for detailed instructions:
186186

187187
* https://coin-or.github.io/Ipopt/INSTALL.html
188-
* https://projects.coin-or.org/Ipopt/wiki/sIpopt
188+
* https://coin-or.github.io/Ipopt/SPECIALS.html#SIPOPT
189189
* https://coin-or.github.io/coinbrew/
190190
* https://github.com/dthierry/k_aug
191191

examples/doc/samples/case_studies/rosen/Rosenbrock.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Ipopt 3.9.2:
77
******************************************************************************
88
This program contains Ipopt, a library for large-scale nonlinear optimization.
99
Ipopt is released as open source code under the Eclipse Public License (EPL).
10-
For more information visit http://projects.coin-or.org/Ipopt
10+
For more information visit https://github.com/coin-or/Ipopt
1111
******************************************************************************
1212

1313
This is Ipopt version 3.9.2, running with linear solver ma27.

examples/pyomo/suffixes/ipopt_warmstart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# A Suffix example for ipopt.
1313
# Translated to Pyomo from AMPL model source at:
14-
# https://projects.coin-or.org/Ipopt/wiki/IpoptAddFeatures
14+
# http://web.archive.org/web/20120610123756/https://projects.coin-or.org/Ipopt/wiki/IpoptAddFeatures
1515
#
1616
# This Pyomo example is formulated as a python script.
1717
# To run this script execute the following command:

pyomo/common/numeric_types.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ def value(obj, exception=True):
382382
tmp = obj(exception=True)
383383
if tmp is None:
384384
raise ValueError(
385-
"No value for uninitialized NumericValue object %s" % (obj.name,)
385+
"No value for uninitialized %s object %s"
386+
% (type(obj).__name__, obj.name)
386387
)
387388
return tmp
388389
except TemplateExpressionError:

pyomo/contrib/appsi/solvers/highs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ def _solve(self, timer: HierarchicalTimer):
272272
if config.warmstart:
273273
self._warm_start()
274274
timer.start('optimize')
275-
ostreams[-1].write("RUN!\n")
276275
if self.version()[:2] >= (1, 8):
277276
self._solver_model.HandleKeyboardInterrupt = True
278277
self._solver_model.run()

pyomo/contrib/cp/transform/logical_to_disjunctive_walker.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
from pyomo.gdp.disjunct import AutoLinkedBooleanVar, Disjunct, Disjunction
3030

3131

32+
def _dispatch_boolean_const(visitor, node):
33+
return False, 1 if node.value else 0
34+
35+
3236
def _dispatch_boolean_var(visitor, node):
3337
if node not in visitor.boolean_to_binary_map:
3438
binary = node.get_associated_binary()
@@ -197,6 +201,7 @@ def _dispatch_atmost(visitor, node, *args):
197201
_operator_dispatcher[EXPR.AtMostExpression] = _dispatch_atmost
198202

199203
_before_child_dispatcher = {}
204+
_before_child_dispatcher[EXPR.BooleanConstant] = _dispatch_boolean_const
200205
_before_child_dispatcher[BV.ScalarBooleanVar] = _dispatch_boolean_var
201206
_before_child_dispatcher[BV.BooleanVarData] = _dispatch_boolean_var
202207
_before_child_dispatcher[AutoLinkedBooleanVar] = _dispatch_boolean_var
@@ -264,5 +269,9 @@ def finalizeResult(self, result):
264269
# This LogicalExpression must evaluate to True (but note that we cannot
265270
# fix this variable to 1 since this logical expression could be living
266271
# on a Disjunct and later need to be relaxed.)
267-
self.constraints.add(result >= 1)
272+
expr = result >= 1
273+
if expr.__class__ is bool:
274+
self.constraints.add(Constraint.Feasible if expr else Constraint.Infeasible)
275+
else:
276+
self.constraints.add(expr)
268277
return result

0 commit comments

Comments
 (0)