Skip to content

Commit

Permalink
Merge branch 'main' into gurobipy_addconstr_deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
quantresearch1 authored Aug 20, 2024
2 parents d6573a4 + 5609a8a commit bfdd222
Show file tree
Hide file tree
Showing 40 changed files with 9,212 additions and 375 deletions.
4 changes: 2 additions & 2 deletions .coin-or/projDesc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot e
Use explicit overrides to disable use of automated
version reporting.
-->
<stableVersionNumber>6.7.3</stableVersionNumber>
<releaseNumber>6.7.3</releaseNumber>
<stableVersionNumber>6.8.0</stableVersionNumber>
<releaseNumber>6.8.0</releaseNumber>

</developmentStatus>

Expand Down
59 changes: 50 additions & 9 deletions .github/workflows/release_wheel_creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
PYOMO_SETUP_ARGS: "--with-cython --with-distributable-extensions"

jobs:

native_wheels:
name: Build wheels (${{ matrix.wheel-version }}) on ${{ matrix.os }} for native and cross-compiled architecture
runs-on: ${{ matrix.os }}
Expand All @@ -31,14 +29,26 @@ jobs:
include:
- wheel-version: 'cp38*'
TARGET: 'py38'
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
- wheel-version: 'cp39*'
TARGET: 'py39'
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
- wheel-version: 'cp310*'
TARGET: 'py310'
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
- wheel-version: 'cp311*'
TARGET: 'py311'
GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions"
- wheel-version: 'cp312*'
TARGET: 'py312'
GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions"

exclude:
- wheel-version: 'cp311*'
os: windows-latest
- wheel-version: 'cp312*'
os: windows-latest

steps:
- uses: actions/checkout@v4
- name: Build wheels
Expand All @@ -47,13 +57,13 @@ jobs:
output-dir: dist
env:
CIBW_ARCHS_LINUX: "native"
CIBW_ARCHS_MACOS: "native arm64"
CIBW_ARCHS_WINDOWS: "native ARM64"
CIBW_SKIP: "*-musllinux*"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_WINDOWS: "AMD64 ARM64"
CIBW_BUILD: ${{ matrix.wheel-version }}
CIBW_SKIP: "*-musllinux*"
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_BUILD: pip install cython pybind11
CIBW_CONFIG_SETTINGS: '--global-option="--with-cython --with-distributable-extensions"'
CIBW_ENVIRONMENT: PYOMO_SETUP_ARGS="${{ matrix.GLOBAL_OPTIONS }}"
- uses: actions/upload-artifact@v4
with:
name: native_wheels-${{ matrix.os }}-${{ matrix.TARGET }}
Expand All @@ -72,14 +82,19 @@ jobs:
include:
- wheel-version: 'cp38*'
TARGET: 'py38'
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
- wheel-version: 'cp39*'
TARGET: 'py39'
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
- wheel-version: 'cp310*'
TARGET: 'py310'
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
- wheel-version: 'cp311*'
TARGET: 'py311'
GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions"
- wheel-version: 'cp312*'
TARGET: 'py312'
GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions"
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
Expand All @@ -93,17 +108,43 @@ jobs:
output-dir: dist
env:
CIBW_ARCHS_LINUX: "aarch64"
CIBW_SKIP: "*-musllinux*"
CIBW_BUILD: ${{ matrix.wheel-version }}
CIBW_SKIP: "*-musllinux*"
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_BUILD: pip install cython pybind11
CIBW_CONFIG_SETTINGS: '--global-option="--with-cython --with-distributable-extensions"'
CIBW_ENVIRONMENT: PYOMO_SETUP_ARGS="${{ matrix.GLOBAL_OPTIONS }}"
- uses: actions/upload-artifact@v4
with:
name: alt_wheels-${{ matrix.os }}-${{ matrix.TARGET }}
path: dist/*.whl
overwrite: true

pure_python:
name: pure_python_wheel
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine wheel setuptools pybind11
- name: Build pure python wheel
run: |
python setup.py --without-cython sdist --format=gztar bdist_wheel
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: purepythonwheel
path: dist/*.whl
overwrite: true

generictarball:
name: ${{ matrix.TARGET }}
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ defaults:
env:
PYTHONWARNINGS: ignore::UserWarning
PYTHON_CORE_PKGS: wheel
PYPI_ONLY: z3-solver
PYPY_EXCLUDE: scipy numdifftools seaborn statsmodels
PYPI_ONLY: z3-solver linear-tree
PYPY_EXCLUDE: scipy numdifftools seaborn statsmodels linear-tree
CACHE_VER: v221013.1
NEOS_EMAIL: [email protected]
SRC_REF: ${{ github.head_ref || github.ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ defaults:
env:
PYTHONWARNINGS: ignore::UserWarning
PYTHON_CORE_PKGS: wheel
PYPI_ONLY: z3-solver
PYPY_EXCLUDE: scipy numdifftools seaborn statsmodels
PYPI_ONLY: z3-solver linear-tree
PYPY_EXCLUDE: scipy numdifftools seaborn statsmodels linear-tree
CACHE_VER: v221013.1
NEOS_EMAIL: [email protected]
SRC_REF: ${{ github.head_ref || github.ref }}
Expand Down
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,69 @@ Pyomo CHANGELOG
===============


-------------------------------------------------------------------------------
Pyomo 6.8.0 (20 Aug 2024)
-------------------------------------------------------------------------------

SIGNIFICANT CHANGE NOTICE

- Internal data storage for Constraint objects (see #3293)
- No longer release cythonized wheel for Python 3.11+ (see #3355)

CHANGELOG

- General
- Add ParameterizedQuadraticRepn and corresponding walker (#3324)
- Update Pyomo for NumPy 2.0 compatibility (#3292, #3353)
- Add ParameterizedLinearRepn and corresponding walker (#3268)
- Update Release Process Workflow for changes in `pip` (#3355)
- Core
- Handle uninitialized variable in `propagate_solution` of scaling
transformation (#3275)
- Add `context` option to `SuffixFinder` (#3348)
- Remove the `_suppress_ctypes` attribute from Block (#3347)
- Improve `Set` initialization performance (#3302)
- Update Constraint to only store the original expression (not
lower/body/upper) (#3293)
- Kernel: fix bug in conic geomean (#3310)
- Fix bug with IndexedSet objects and the within argument (#3288)
- Support validate/filter for IndexedSet components using index (#3338)
- Solver Interfaces
- Resolve NLv2 incompatibility with multithreading (#3332)
- Resolve writer performance degradation (#3343)
- Fix bug with inconsistent use of `result` and `results` (#3337)
- LegacySolverWrapper: restore 'options' attribute (#3334)
- Fix bug in XpressDirect._load_slacks (#3318)
- NLv2: support expressions with nested external functions (#3319)
- Ignore errors on ASL solver version check (#3298)
- Add SAS solver interface (#2886, #3309)
- Testing
- Omnibus testing / platform portability fixes (#3335)
- Change BARON download URL (#3328)
- Disable interface/testing for NEOS/octeract (#3322)
- Fix typo in Jenkins driver (#3312)
- Jenkins: update logic for recording variables (#3311)
- Unpin Codecov / Update coverage (#3303)
- GDP
- Don't transform known-to-be infeasible Disjuncts in multiple BigM (#3314)
- Contributed Packages
- alternative_solutions: Add a new contrib package for generating
alternative solutions (#3270)
- APPSI: Allow maingo_solvermodel to be imported without maingopy (#3330)
- APPSI: Sort indices while removing constraints to fix bug in HiGHs
interface (#3281)
- CP: Add beforeChild handling for bools in logical expressions (#3315)
- DoE: Refactor to improve API and maintainability (#3317)
- incidence_analysis: Raise error in `generate_strongly_connected_components`
instead of asserting (#3305)
- parmest: Add missing main call for example file (#3349)
- piecewise: Add incremental PW linear to MIP transformation (#3287)
- piecewise: Add nonlinear-to-piecewise-linear transformation (#3333)
- PyNumero: Support user-provided CyIpopt callbacks with 13 arguments (#3289)
- PyNumero: Support PyomoNLP scaling factors on sub-blocks (#3295)
- PyROS: Temporarily Adjust NL Writer Feasibility Tolerance (#3280)
- viewer: Add option to specify the model by variable name (#3271)

-------------------------------------------------------------------------------
Pyomo 6.7.3 (29 May 2024)
-------------------------------------------------------------------------------
Expand Down
27 changes: 11 additions & 16 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
We are pleased to announce the release of Pyomo 6.7.3.
We are pleased to announce the release of Pyomo 6.8.0.

Pyomo is a collection of Python software packages that supports a
diverse set of optimization capabilities for formulating and analyzing
optimization models.

The following are highlights of the 6.7 release series:

- Added support for Python 3.12
- Removed support for Python 3.7
- New writer for converting linear models to matrix form
- Improved handling of nested GDPs
- Redesigned user API for parameter estimation
- New packages:
- iis: new capability for identifying minimal intractable systems
- latex_printer: print Pyomo models to a LaTeX compatible format
- contrib.solver: preview of redesigned solver interfaces
- simplification: simplify Pyomo expressions
- New solver interfaces
- MAiNGO: Mixed-integer nonlinear global optimization
- ...and of course numerous minor bug fixes and performance enhancements
The following are highlights of the 6.8 release series:

- Support for Numpy2
- Refactor of Design of Experiments (`contrib.doe`)
- New packages:
- alternative_solutions: alternative (near) optimal solutions
- New solver interfaces:
- SAS: Statistical Analysis System
- v2: Ongoing solver interface refactor
- ...and of course numerous minor bug fixes and performance enhancements

A full list of updates and changes is available in the
[`CHANGELOG.md`](https://github.com/Pyomo/pyomo/blob/main/CHANGELOG.md).
Expand Down
6 changes: 5 additions & 1 deletion examples/pyomo/tutorials/set.dat
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ set S[5] := 2 3;
set T[2] := 1 3;
set T[5] := 2 3;

set T_indexed_validate[2] := 1;
set T_indexed_validate[3] := 1 2;
set T_indexed_validate[4] := 1 2 3;

set X[2] := 1;
set X[5] := 2 3;
set X[5] := 2 3;
9 changes: 7 additions & 2 deletions examples/pyomo/tutorials/set.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
24 Set Declarations
25 Set Declarations
A : Size=1, Index=None, Ordered=Insertion
Key : Dimen : Domain : Size : Members
None : 1 : Any : 3 : {1, 2, 3}
Expand Down Expand Up @@ -80,6 +80,11 @@
Key : Dimen : Domain : Size : Members
2 : 1 : Any : 2 : {1, 3}
5 : 1 : Any : 2 : {2, 3}
T_indexed_validate : Size=3, Index=B, Ordered=Insertion
Key : Dimen : Domain : Size : Members
2 : 1 : Any : 1 : {1,}
3 : 1 : Any : 2 : {1, 2}
4 : 1 : Any : 3 : {1, 2, 3}
U : Size=1, Index=None, Ordered=Insertion
Key : Dimen : Domain : Size : Members
None : 1 : Any : 5 : {1, 2, 6, 24, 120}
Expand All @@ -94,4 +99,4 @@
2 : 1 : S[2] : 1 : {1,}
5 : 1 : S[5] : 2 : {2, 3}

24 Declarations: A B C D E F G H Hsub I J K K_2 L M N O P R S X T U V
25 Declarations: A B C D E F G H Hsub I J K K_2 L M N O P R S X T T_indexed_validate U V
12 changes: 11 additions & 1 deletion examples/pyomo/tutorials/set.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,17 @@ def T_validate(model, value):
return value in model.A


model.T = Set(model.B, validate=M_validate)
model.T = Set(model.B, validate=T_validate)


#
# Validation also provides the index within the IndexedSet being validated:
#
def T_indexed_validate(model, value, i):
return value in model.A and value < i


model.T_indexed_validate = Set(model.B, validate=T_indexed_validate)


##
Expand Down
7 changes: 3 additions & 4 deletions pyomo/contrib/doe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,23 @@


@deprecated(
"Use of MeasurementVariables in Pyomo.DoE is no longer supported.",
version='6.7.4.dev0',
"Use of MeasurementVariables in Pyomo.DoE is no longer supported.", version='6.8.0'
)
class MeasurementVariables:
def __init__(self, *args):
raise RuntimeError(deprecation_message)


@deprecated(
"Use of DesignVariables in Pyomo.DoE is no longer supported.", version='6.7.4.dev0'
"Use of DesignVariables in Pyomo.DoE is no longer supported.", version='6.8.0'
)
class DesignVariables:
def __init__(self, *args):
raise RuntimeError(deprecation_message)


@deprecated(
"Use of ModelOptionLib in Pyomo.DoE is no longer supported.", version='6.7.4.dev0'
"Use of ModelOptionLib in Pyomo.DoE is no longer supported.", version='6.8.0'
)
class ModelOptionLib:
def __init__(self, *args):
Expand Down
6 changes: 6 additions & 0 deletions pyomo/contrib/piecewise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@
from pyomo.contrib.piecewise.transform.convex_combination import (
ConvexCombinationTransformation,
)
from pyomo.contrib.piecewise.transform.nonlinear_to_pwl import (
DomainPartitioningMethod,
NonlinearToPWL,
)
from pyomo.contrib.piecewise.transform.nested_inner_repn import (
NestedInnerRepresentationGDPTransformation,
)
from pyomo.contrib.piecewise.transform.disaggregated_logarithmic import (
DisaggregatedLogarithmicMIPTransformation,
)
from pyomo.contrib.piecewise.transform.incremental import IncrementalMIPTransformation
from pyomo.contrib.piecewise.triangulations import Triangulation
Loading

0 comments on commit bfdd222

Please sign in to comment.