Skip to content

Commit d53af9b

Browse files
committed
Merge branch 'main' into only-mbm-bound-constraints
2 parents b1d713b + 99b5f48 commit d53af9b

File tree

19 files changed

+861
-199
lines changed

19 files changed

+861
-199
lines changed

.coin-or/projDesc.xml

Lines changed: 2 additions & 2 deletions
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.4.2</stableVersionNumber>
231-
<releaseNumber>6.4.2</releaseNumber>
230+
<stableVersionNumber>6.4.3</stableVersionNumber>
231+
<releaseNumber>6.4.3</releaseNumber>
232232

233233
</developmentStatus>
234234

CHANGELOG.txt

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,93 @@
22
Pyomo CHANGELOG
33
===============
44

5+
-------------------------------------------------------------------------------
6+
Pyomo 6.4.3 28 Nov 2022
7+
-------------------------------------------------------------------------------
8+
9+
- General
10+
- Update PauseGC to work in nested contexts (#2507)
11+
- Simplify deepcopy/pickle logic to speed up model clone (#2510)
12+
- Fix generate_standard_repn to handle unexpected NPV expressions (#2511)
13+
- Add thread safe proxies for PauseGC, TempFileManager singletons (#2514)
14+
- Fix ConstructionTimer bug for components indexed by nonfinite sets (#2518)
15+
- Add calculate_variable_from_constraint differentiation mode option (#2549)
16+
- Update URL for downloading GSL and GJH (#2556, #2588)
17+
- Update logic for retrying failed downloads (#2569)
18+
- Add support and testing for Python 3.11 (#2596, #2618)
19+
- Update deprecation utilities to improve user messages (#2606)
20+
- Core
21+
- Refactor expression hierarchy, add RelationalExpression base class (#2499)
22+
- Support cloning individual blocks (#2504)
23+
- Block performance improvements (#2508)
24+
- Add support for creating a slice to a single ComponentData object (#2509)
25+
- Fix missing import of value in pyomo.core.base.external (#2525)
26+
- Improve handling of restricted words on Blocks (#2535)
27+
- Improve Reference() performance (#2537)
28+
- Fix mapping gradient/hessian for external functions with string args (#2539)
29+
- Fix bug for sum_product(Var, Param, Param) (#2551)
30+
- Add deprecation path for expression objects moved to relational_expr (#2554)
31+
- Exception when setting value of Expression to non-numeric expression (#2567)
32+
- Improve deepcopy performance (#2628)
33+
- Documentation
34+
- Fix examples in working_models.rst (#2502)
35+
- Solver Interfaces
36+
- Improve SCIP results object (#2462)
37+
- Improve warning message when LP writer raises KeyError (#2497)
38+
- Fix Gurobi work limit bug (#2530)
39+
- Updates and fixes for the NLv2 writer (#2540, #2622, #2568)
40+
- Fix Xpress when stopped due to MAXTIME or MAXNODES (#2553)
41+
- Add support for MOSEK 10 affine conic constraints (#2557)
42+
- Fix missing explicit space in GAMS put command (#2578)
43+
- Fix GAMS logfile storage location (#2580)
44+
- LP writer performance improvements (#2583, #2585)
45+
- Update handling of MOSEK Env and Python module (#2591)
46+
- Release MOSEK license when optimize raises a mosek.Error (#2593)
47+
- Update list of allowable characters in CPLEX filenames (#2597)
48+
- Testing
49+
- Update performance driver to be usable outside of Pyomo (#2505)
50+
- Update the performance test driver (#2538)
51+
- Reduce amount of environment code cached in GitHub actions (#2565)
52+
- Update GitHub actions versions from v2 to v3 (#2566)
53+
- Allow nan to compare equal in assertStructuredAlmostEqual() (#2582)
54+
- Add test utilities for comparing expressions (#2590)
55+
- Skip a test in MOSEK 10 due to a bug in warm starting MIQPs (#2614)
56+
- Update skipped CBC test that works with CBC 2.10.6 (#2615)
57+
- Add SCIP to GitHub actions environment (#2602)
58+
- GDP
59+
- Use OrderedSet instead of list in GDPTree to improve performance (#2516)
60+
- Reduce calls to logical_to_linear in GDP transformations (#2519)
61+
- Add utility for gathering BigM values after transformation (#2520)
62+
- Add tighter logical constraints in transformations of nested GDPs (#2550)
63+
- Fix pickling of transformed GDP models (#2576)
64+
- Add multiple-bigM transformation (#2592)
65+
- Improve performance of BigM transformation (#2605)
66+
- Remove weakref mapping Disjunctions to their algebraic_constraint (#2617)
67+
- Contributed Packages
68+
- APPSI: Fix exception raised by appsi_gurobi during Python shutdown (#2498)
69+
- APPSI: Improve handling of Gurobi results (#2517)
70+
- APPSI: Add interface to HiGHS solver (#2561)
71+
- APPSI: Only release Gurobi license after deleting all instances (#2599)
72+
- APPSI: Patch IntEnum to preserve pre-3.11 formatting (#2607)
73+
- CP: New package for constraint programming (#2570, #2612)
74+
- GDPopt: Add warning when reporting results from LBB (#2534)
75+
- GDPopt: Delete dummy objective when we're done using it (#2552)
76+
- GDPopt: Add enumerate solution approach (#2559, #2575)
77+
- IIS: Add package for computing the IIS of an infeasible Pyomo model (#2512)
78+
- MindtPy: Fix bug in termination condition (#2587)
79+
- MindtPy: Fix bug in checking absolute and relative gap (#2608)
80+
- MPC: Data structures/utils for rolling horizon dynamic optimization (#2477)
81+
- Parmest: Solve square problem to initialize regression problem (#2438)
82+
- Parmest: Return ContinuousSet values from theta_est() (#2464)
83+
- PyNumero: Fix NumPy deprecation warnings (#2521)
84+
- PyNumero: Add interfaces to SciPy square solvers (#2523)
85+
- PyNumero: Check AmplInterface availability in SciPy solver tests (#2594)
86+
- PyNumero: Add ProjectedExtendedNLP class (#2601)
87+
- PyNumero: Add interface to SciPy scalar Newton solver (#2603)
88+
- PyROS: Rewrite UncertaintySet docstrings/improve validation (#2488)
89+
- PyROS: Updates to subproblem initialization and solver call routines (#2515)
90+
- PyROS: Fix collection of sub-solver solve times (#2543)
91+
592
-------------------------------------------------------------------------------
693
Pyomo 6.4.2 17 Aug 2022
794
-------------------------------------------------------------------------------

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ including:
2626
- Generalized disjunctive programming
2727
- Differential algebraic equations
2828
- Mathematical programming with equilibrium constraints
29+
- Constraint programming
2930

3031
Pyomo supports analysis and scripting within a full-featured programming
3132
language. Further, Pyomo has also proven an effective framework for

RELEASE.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
We are pleased to announce the release of Pyomo 6.4.2.
1+
We are pleased to announce the release of Pyomo 6.4.3.
22

33
Pyomo is a collection of Python software packages that supports a
44
diverse set of optimization capabilities for formulating and analyzing
@@ -9,11 +9,14 @@ The following are highlights of the 6.0 release series:
99
- Improved stability and robustness of core Pyomo code and solver interfaces
1010
- Integration of Boolean variables into GDP
1111
- Integration of NumPy support into the Pyomo expression system
12-
- Added support for Python 3.10
12+
- Added support for Python 3.10, 3.11
1313
- Removed support for Python 3.6
1414
- New packages:
1515
- APPSI (Auto-Persistent Pyomo Solver Interfaces)
16+
- CP (Constraint programming models and solver interfaces)
1617
- External grey box models
18+
- IIS (Standard interface to solver IIS capabilities)
19+
- MPC (Data structures/utils for rolling horizon dynamic optimization)
1720
- PyROS (Pyomo Robust Optimization Solver)
1821
- Structural model analysis
1922
- Rewrite of the TrustRegion Solver

pyomo/common/autoslots.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,26 @@
2020
)
2121

2222
def _deepcopy_tuple(obj, memo, _id):
23-
_unchanged.append(True)
24-
ans = tuple(fast_deepcopy(x, memo) for x in obj)
25-
if _unchanged.pop():
26-
# It appears to be faster *not* to cache the fact that this
27-
# particular tuple was unchanged by the deepcopy
28-
# memo[_id] = obj
23+
ans = []
24+
unchanged = True
25+
for item in obj:
26+
new_item = fast_deepcopy(item, memo)
27+
ans.append(new_item)
28+
if new_item is not item:
29+
unchanged = False
30+
if unchanged:
31+
# Python does not duplicate "unchanged" tuples (i.e. allows the
32+
# original objecct to be returned from deepcopy()). We will
33+
# preserve that behavior here.
34+
#
35+
# It also appears to be faster *not* to cache the fact that this
36+
# particular tuple was unchanged by the deepcopy (Note: the
37+
# standard library also does not cache the unchanged tuples in
38+
# the memo)
39+
#
40+
# memo[_id] = obj
2941
return obj
30-
memo[_id] = ans
42+
memo[_id] = ans = tuple(ans)
3143
return ans
3244

3345
def _deepcopy_list(obj, memo, _id):
@@ -55,7 +67,6 @@ def _deepcopier(obj, memo, _id):
5567
dict: _deepcopy_dict,
5668
}
5769

58-
_unchanged = [None]
5970

6071
def fast_deepcopy(obj, memo):
6172
"""A faster implementation of copy.deepcopy()
@@ -70,12 +81,9 @@ def fast_deepcopy(obj, memo):
7081
return obj
7182
_id = id(obj)
7283
if _id in memo:
73-
ans = memo[_id]
84+
return memo[_id]
7485
else:
75-
ans = _deepcopy_mapper.get(obj.__class__, _deepcopier)(obj, memo, _id)
76-
if ans is not obj:
77-
_unchanged[-1] = False
78-
return ans
86+
return _deepcopy_mapper.get(obj.__class__, _deepcopier)(obj, memo, _id)
7987

8088

8189
class AutoSlots(type):

0 commit comments

Comments
 (0)