Skip to content

Commit 5ea53cd

Browse files
authored
Merge branch 'main' into main
2 parents ed2cf25 + b7ea8ce commit 5ea53cd

File tree

10 files changed

+141
-28
lines changed

10 files changed

+141
-28
lines changed

.coin-or/projDesc.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot e
227227
Use explicit overrides to disable use of automated
228228
version reporting.
229229
-->
230-
<stableVersionNumber>6.9.1</stableVersionNumber>
231-
<releaseNumber>6.9.1</releaseNumber>
230+
<stableVersionNumber>6.9.2</stableVersionNumber>
231+
<releaseNumber>6.9.2</releaseNumber>
232232

233233
</developmentStatus>
234234

CHANGELOG.md

+51-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,54 @@
11
Pyomo CHANGELOG
22
===============
33

4+
-------------------------------------------------------------------------------
5+
Pyomo 6.9.2 (16 Apr 2025)
6+
-------------------------------------------------------------------------------
7+
8+
- General
9+
- Update Copyright to 2025 (#3515)
10+
- `capture_output`: do not output to captured file descriptors (#3537, #3560)
11+
- `calc_variable_from_constraint`: guard against expression overflow (#3541)
12+
- Standardize the usage of pyomo.environ imports (#3545)
13+
- Update ASL CMake builders (#3548)
14+
- Support passing LoggerAdapter objects to LogStream (#3547)
15+
- Core
16+
- Support multi-column DataFrames in Initializer (#3552)
17+
- Multiple dispatch for relational expression generation (#3483)
18+
- Type check `exception` args in component `__call__` implementations (#3538)
19+
- Documentation
20+
- Move RTD ads to the sidebar (#3536)
21+
- Standardize Example Imports (#3543)
22+
- LD-SDA Documentation (#3539)
23+
- Fix broken URLs in documentation (#3529, #3544)
24+
- Update future solver interface documentation (#3526)
25+
- Document `BlockData.clone` (#3542)
26+
- Solver Interfaces
27+
- Fix bug in `XpressPersistent.update_var` (#3566)
28+
- Avoid duplicate `AMPLFUNC` entries in `ipopt_v2` (#3554)
29+
- Update deprecation warnings in `contrib.solver` (#3553, #3555)
30+
- Support for upcoming knitro python package (#3478)
31+
- Future solver interface reorganization and updates (#3476)
32+
- Update HiGHS interface to allow keyboard interrupts (#3509, #3511)
33+
- Fix/extend MOSEK option handling (#3488)
34+
- Testing
35+
- Defer `pathlib` import, remove test output file (#3563)
36+
- Add IDAES Solvers to Mac; Update to Ubuntu 22.04 (#3556)
37+
- Clean up numeric_expr dispatcher test driver (#3551)
38+
- Testing and coverage fixes (#3549)
39+
- Resolve intermittent test failure (increase sleep time) (#3517)
40+
- Be more careful when/how we timeout conda install (#3514)
41+
- Contributed Packages
42+
- cspline_external: Add a function for cubic spline interpolation (#3216)
43+
- DoE: Correct initialization when using lower diagonal of FIM (#3532)
44+
- FBBT: Resolve bug registering native type handlers (#3567)
45+
- parmest/DoE: Ordering and param bug fixes (#3512)
46+
- PyNumero: Add support for greybox models (#3364)
47+
- PyROS: Modify Decision Rule Order Efficiency (#3562)
48+
- PyROS: Revise second-stage equality reformulation under discrete
49+
(scenario-based) uncertainty (#3533)
50+
- PyROS: Add Uncertain Parameter Reduction (#3503)
51+
452
-------------------------------------------------------------------------------
553
Pyomo 6.9.1 (5 Mar 2025)
654
-------------------------------------------------------------------------------
@@ -34,7 +82,7 @@ Pyomo 6.9.0 (21 Feb 2025)
3482
- Resolve error parenthesizing pow mantissa (#3472)
3583
- Resolve OSX error accessing closed filehandle (#3467)
3684
- Allow construction of CUID from another CUID (#3464)
37-
- Clean up `identify_variables` / `identify_mutable_parameters`;
85+
- Clean up `identify_variables` / `identify_mutable_parameters`;
3886
deprecate `SimpleExpressionVisitor` (#3436)
3987
- Solver Interfaces
4088
- Solver refactor: BUGFIX, f-string in contrib/solver (#3481)
@@ -48,11 +96,11 @@ Pyomo 6.9.0 (21 Feb 2025)
4896
- 2025 Testing update: Black 25.1.0, testing Qt without X11 (#3463)
4997
- Testing: exclude Xpress 9.5.1 on Windows/GHA/Python3.{0,1} (#3455)
5098
- CY25 CI Infrastructure and typo fixes (#3453)
51-
- Verify we are testing all NEOS solvers (#3433)
99+
- Verify we are testing all NEOS solvers (#3433)
52100
- Contributed Packages
53101
- GDPOpt: Add Logic-Based Discrete-Steepest Descent Algorithm (#3331)
54102
- PyROS: Fix/Tweak Documentation and Solver Output Logging (#3475)
55-
- PyROS: Fix Treatment of Fixed Model Variables and Initialization of
103+
- PyROS: Fix Treatment of Fixed Model Variables and Initialization of
56104
Auxiliary Uncertain Parameters (#3461)
57105
- PyROS: Improve handling of separation problem sub-solver errors (#3441)
58106
- PyROS: Extend valid types for solver argument `uncertain_params` (#3439)

RELEASE.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
We are pleased to announce the release of Pyomo 6.9.1.
1+
We are pleased to announce the release of Pyomo 6.9.2.
22

33
Pyomo is a collection of Python software packages that supports a
44
diverse set of optimization capabilities for formulating and analyzing
@@ -8,7 +8,9 @@ The following are highlights of the 6.9 release series:
88

99
- Removed support for Python 3.8
1010
- New Logic-Based Discrete-Steepest Descent Algorithm in GDPOpt
11+
- New External Function for Cubic Spline Interpolation
1112
- New solver interfaces:
13+
- Support for upcoming knitro Python package
1214
- v2: Ongoing solver interface refactor
1315
- ...and of course numerous minor bug fixes and performance enhancements
1416

doc/OnlineDocs/explanation/solvers/pyros.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ Observe that the log contains the following information:
964964
965965
==============================================================================
966966
PyROS: The Pyomo Robust Optimization Solver, v1.3.6.
967-
Pyomo version: 6.9.2.dev0 (devel {pyros-effective-uncertain-params})
967+
Pyomo version: 6.9.2
968968
Commit hash: 41cd797e0
969969
Invoked at UTC 2025-03-13T16:20:31.105320+00:00
970970

pyomo/contrib/solver/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@
1515
moved_module(
1616
f'pyomo.contrib.solver.{_module}',
1717
f'pyomo.contrib.solver.common.{_module}',
18-
version='6.9.2.dev0',
18+
version='6.9.2',
1919
)
2020

2121
moved_module(
2222
'pyomo.contrib.solver.solution',
2323
'pyomo.contrib.solver.common.solution_loader',
24-
version='6.9.2.dev0',
24+
version='6.9.2',
2525
)
2626

2727
for _module in ('ipopt', 'gurobi_direct', 'sol_reader'):
2828
moved_module(
2929
f'pyomo.contrib.solver.{_module}',
3030
f'pyomo.contrib.solver.solvers.{_module}',
31-
version='6.9.2.dev0',
31+
version='6.9.2',
3232
)
3333

3434
moved_module(
3535
'pyomo.contrib.solver.gurobi',
3636
'pyomo.contrib.solver.solvers.gurobi_persistent',
37-
version='6.9.2.dev0',
37+
version='6.9.2',
3838
)
3939

4040
del _module, moved_module

pyomo/core/expr/numeric_expr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
relocated_module_attribute(
105105
'register_arg_type',
106106
'pyomo.core.expr.expr_common',
107-
version='6.9.2.dev0',
107+
version='6.9.2',
108108
f_globals=globals(),
109109
)
110110

pyomo/solvers/amplfunc_merge.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
relocated_module_attribute(
1515
'amplfunc_string_merge',
1616
'pyomo.solvers.amplfunc_merge.unique_paths',
17-
version='6.9.2.dev0',
17+
version='6.9.2',
1818
f_globals=globals(),
1919
)
2020

pyomo/solvers/plugins/solvers/mosek_direct.py

+21-14
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,28 @@ def _process_stream(msg):
163163
for key, option in self.options.items():
164164
try:
165165
param = key.split('.')
166-
if param[0] == 'mosek':
167-
param.pop(0)
168-
param = getattr(mosek, param[0])(param[1])
169-
if 'sparam' in key.split('.'):
170-
self._solver_model.putstrparam(param, option)
171-
elif 'dparam' in key.split('.'):
172-
self._solver_model.putdouparam(param, option)
173-
elif 'iparam' in key.split('.'):
174-
if isinstance(option, str):
175-
option = option.split('.')
176-
if option[0] == 'mosek':
177-
option.pop('mosek')
178-
option = getattr(mosek, option[0])(option[1])
179-
else:
166+
if key == param[0]:
167+
self._solver_model.putparam(key, option)
168+
else:
169+
if param[0] == 'mosek':
170+
param.pop(0)
171+
assert (
172+
len(param) == 2
173+
), "unrecognized MOSEK parameter name '{}'".format(key)
174+
param = getattr(mosek, param[0])(param[1])
175+
if 'sparam.' in key:
176+
self._solver_model.putstrparam(param, option)
177+
elif 'dparam.' in key:
178+
self._solver_model.putdouparam(param, option)
179+
elif 'iparam.' in key:
180+
if isinstance(option, str):
181+
option = option.split('.')
182+
if option[0] == 'mosek':
183+
option.pop(0)
184+
option = getattr(mosek, option[0])(option[1])
180185
self._solver_model.putintparam(param, option)
186+
else:
187+
raise ValueError(f"unrecognized MOSEK parameter name '{key}'")
181188
except (TypeError, AttributeError):
182189
raise
183190
try:

pyomo/solvers/tests/checks/test_MOSEKDirect.py

+56
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,62 @@ def test_conic_duals(self):
313313
results.Solution.constraint['x11']['Dual'][i], check[i], 5
314314
)
315315

316+
def test_solver_parameters(self):
317+
import mosek
318+
319+
solver = pyo.SolverFactory('mosek_direct')
320+
model = self._test_model()
321+
solver.solve(
322+
model,
323+
options={
324+
'dparam.optimizer_max_time': 1.0,
325+
'iparam.intpnt_solve_form': mosek.solveform.dual,
326+
'mosek.iparam.intpnt_max_iterations': 10,
327+
'MSK_DPAR_INTPNT_CO_TOL_REL_GAP': '1.0e-7',
328+
'MSK_IPAR_PRESOLVE_USE': '0',
329+
'sparam.param_comment_sign': '##',
330+
},
331+
)
332+
# Check if iparams were set correctly
333+
self.assertEqual(
334+
solver._solver_model.getintparam(mosek.iparam.intpnt_solve_form),
335+
mosek.solveform.dual,
336+
)
337+
self.assertEqual(
338+
solver._solver_model.getintparam(mosek.iparam.intpnt_max_iterations), 10
339+
)
340+
self.assertEqual(
341+
solver._solver_model.getintparam(mosek.iparam.presolve_use),
342+
mosek.presolvemode.off,
343+
)
344+
# Check if dparams were set correctly
345+
self.assertEqual(
346+
solver._solver_model.getdouparam(mosek.dparam.optimizer_max_time), 1.0
347+
)
348+
self.assertEqual(
349+
solver._solver_model.getdouparam(mosek.dparam.intpnt_co_tol_rel_gap), 1.0e-7
350+
)
351+
# Check if sparam is set correctly
352+
self.assertEqual(
353+
solver._solver_model.getstrparam(mosek.sparam.param_comment_sign)[1], '##'
354+
)
355+
# Check for TypeErrors
356+
with self.assertRaises(TypeError) as typeCheck:
357+
solver.solve(model, options={'mosek.dparam.intpnt_co_tol_rel_gap': '1.4'})
358+
with self.assertRaises(TypeError) as typeCheck:
359+
solver.solve(model, options={'iparam.log': 1.2})
360+
# Check for AttributeError
361+
with self.assertRaises(AttributeError) as assertCheck:
362+
solver.solve(model, options={'wrong.name': '1'})
363+
with self.assertRaises(AttributeError) as typeCheck:
364+
solver.solve(model, options={'mosek.iparam.log': 'mosek.wrong.input'})
365+
# Check for wrong parameter name (but valid MOSEK attribute)
366+
with self.assertRaises(ValueError) as typeCheck:
367+
solver.solve(model, options={'mosek.mark.up': 'wrong.val'})
368+
# Check for parameter names with wrong length
369+
with self.assertRaises(AssertionError) as typeCheck:
370+
solver.solve(model, options={'mosek.iparam.log.level': 10})
371+
316372

317373
if __name__ == "__main__":
318374
unittest.main()

pyomo/version/info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# main and needs a hard reference to "suitably new" development.
2727
major = 6
2828
minor = 9
29-
micro = 2
29+
micro = 3
3030
releaselevel = 'invalid'
3131
# releaselevel = 'final'
3232
serial = 0

0 commit comments

Comments
 (0)