Skip to content

Commit

Permalink
Merge pull request #4 from Pyomo/main
Browse files Browse the repository at this point in the history
Update doe-review with pyomo/main
  • Loading branch information
jialuw96 authored Oct 4, 2021
2 parents cd1e4ba + f0bc6b5 commit 4685d98
Show file tree
Hide file tree
Showing 305 changed files with 11,272 additions and 7,611 deletions.
6 changes: 3 additions & 3 deletions .coin-or/projDesc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ optimization models.
<!--Fill in your text below (outside the comment block). -->

<projectManager>
Carl D. Laird, Chair, Pyomo Management Committee, cdlaird at sandia dot gov
Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot edu
</projectManager>

<!-- Fill in the URLS you would like use for your main -->
Expand Down Expand Up @@ -227,8 +227,8 @@ Carl D. Laird, Chair, Pyomo Management Committee, cdlaird at sandia dot gov
Use explicit overrides to disable use of automated
version reporting.
-->
<stableVersionNumber>6.0.1</stableVersionNumber>
<releaseNumber>6.0.1</releaseNumber>
<stableVersionNumber>6.1.2</stableVersionNumber>
<releaseNumber>6.1.2</releaseNumber>

</developmentStatus>

Expand Down
4 changes: 3 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ omit =
# The [run] section must be at the end, as the build harness will add a
# "data_file" directive to the end of this file.
[run]
concurrency = multiprocessing,thread
concurrency =
multiprocessing
thread
parallel = True
source =
pyomo
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ env:
PYTHONWARNINGS: ignore::UserWarning
PYTHON_CORE_PKGS: wheel
PYPI_ONLY: z3-solver
CACHE_VER: v210630.0
CACHE_VER: v210812.0
NEOS_EMAIL: [email protected]

jobs:
build:
name: ${{ matrix.TARGET }}/${{ matrix.python }}${{ matrix.other }}
runs-on: ${{ matrix.os }}
timeout-minutes: 90
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -361,7 +361,8 @@ jobs:
}
if (-not (Test-Path "$INSTALLER" -PathType Leaf)) {
echo "...downloading GAMS"
Invoke-WebRequest -Uri "$URL" -OutFile "$INSTALLER"
Invoke-WebRequest -Uri "$URL" -OutFile "$INSTALLER" `
-RetryIntervalSec 30 -MaximumRetryCount 8 -TimeoutSec 150
}
echo "...installing GAMS"
if ( "${{matrix.TARGET}}" -eq "win" ) {
Expand Down Expand Up @@ -411,7 +412,8 @@ jobs:
}
if (-not (Test-Path "$INSTALLER" -PathType Leaf)) {
echo "...downloading BARON ($URL)"
Invoke-WebRequest -Uri "$URL" -OutFile "$INSTALLER"
Invoke-WebRequest -Uri "$URL" -OutFile "$INSTALLER" `
-RetryIntervalSec 30 -MaximumRetryCount 8 -TimeoutSec 150
}
echo "...installing BARON"
if ( "${{matrix.TARGET}}" -eq "win" ) {
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ env:
PYTHONWARNINGS: ignore::UserWarning
PYTHON_CORE_PKGS: wheel
PYPI_ONLY: z3-solver
CACHE_VER: v210630.0
CACHE_VER: v210812.0
NEOS_EMAIL: [email protected]

jobs:
build:
name: ${{ matrix.TARGET }}/${{ matrix.python }}${{ matrix.other }}
runs-on: ${{ matrix.os }}
timeout-minutes: 90
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -380,7 +380,8 @@ jobs:
}
if (-not (Test-Path "$INSTALLER" -PathType Leaf)) {
echo "...downloading GAMS"
Invoke-WebRequest -Uri "$URL" -OutFile "$INSTALLER"
Invoke-WebRequest -Uri "$URL" -OutFile "$INSTALLER" `
-RetryIntervalSec 30 -MaximumRetryCount 8 -TimeoutSec 150
}
echo "...installing GAMS"
if ( "${{matrix.TARGET}}" -eq "win" ) {
Expand Down Expand Up @@ -430,7 +431,8 @@ jobs:
}
if (-not (Test-Path "$INSTALLER" -PathType Leaf)) {
echo "...downloading BARON ($URL)"
Invoke-WebRequest -Uri "$URL" -OutFile "$INSTALLER"
Invoke-WebRequest -Uri "$URL" -OutFile "$INSTALLER" `
-RetryIntervalSec 30 -MaximumRetryCount 8 -TimeoutSec 150
}
echo "...installing BARON"
if ( "${{matrix.TARGET}}" -eq "win" ) {
Expand Down
84 changes: 84 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,90 @@
Pyomo CHANGELOG
===============

-------------------------------------------------------------------------------
Pyomo 6.1.2 20 Aug 2021
-------------------------------------------------------------------------------

- General
- Add test for missing/extra __init__.py files (#2090)
- Update deprecation warnings to only be emitted once per context (#2095)
- Core
- Replace Set.card() with Set.at() (#2096)
- DAE
- Remove use of OrderedSet.__getitem__ from contset.py (#2091)
- Contributed Packages
- APPSI: Build/install APPSI extension outside of source tree (#2092)
- MindtPy: Support gurobi_persistent in LP/NLP-based B&B algorithm (#2071)

-------------------------------------------------------------------------------
Pyomo 6.1.1 17 Aug 2021
-------------------------------------------------------------------------------

- General
- Adding missing __init__.py files across Pyomo (#2086)

-------------------------------------------------------------------------------
Pyomo 6.1 17 Aug 2021
-------------------------------------------------------------------------------

- General
- Support using TicTocTimer as a context manager (#2012)
- Add optional dependency target in setup.py (#2017)
- Added utilities for subsets of model components (#1998)
- Improvements in deprecation warning system (#2045, #2058, #2056)
- Resolve TeeStream deadlock issues (#2072)
- Move PYOMO_CONFIG_DIR into pyomo.common.envvar (#2065)
- Add a DynamicImplicitDomain domain validator (#2043)
- Generate standard repn misidentifies nonlinear expr (#2074)
- Add Module() validator to the config system (#2062)
- Core
- Yield Iterator from IndexedComponent (#2007)
- Use yield from in pyomo.core (#1984)
- Improvements to sorted_robust and string formatting (#2020, #2024)
- Integrating numpy with the Pyomo expression system (#2027, #2034, #2070)
- Resolve Set bugs (#2048)
- Prevent attaching global Sets to Blocks (#2042)
- Correct scalar mutable param getitem implementation (#2066)
- Fix Var bounds with unitted mutable Params (#2067)
- Improve @disable_methods decorator (#2069)
- Allow native numeric types in relational expressions (#2073)
- Fixing symbol names in Initializer deprecation layer (#2079)
- Deprecate OrderedSet.__getitem__ in favor of OrderedSet.card() (#2053)
- Documentation
- Create a list of related packages (#2016)
- Solver Interfaces
- Clean up dependencies and solver.available() IO (#2011)
- Update Baron writer to recognize priority Suffix (#2035)
- Add OCTERACT to the list of known NEOS solvers (#2064)
- Resolve tee issues with Xpress 8.9+ (#2059)
- Increase timeout for ASL version request (#2083)
- Testing
- Miscellaneous testing fixes (#2023)
- Improve management of tempfiles in tests (#2036)
- Update GHA to ubuntu-latest; resolve ampl/mp build error (#2015)
- Move constrained_layout tests to 'expensive' suite (#2018)
- Update xpress, appsi tests to manage CWD (#2031)
- Improve comparison of Book examples to baselines (#2044)
- Add retry/timeout to powershell downloads (#2077)
- GDP Updates
- gdp.hull: Only create one disaggregated variable for all Disjuncts in
which a Var does not appear (#2005)
- Contributed Packages
- FBBT: descend_into option for FBBT (#2025)
- FBBT: Interval arithmetic edge cases for FBBT (#2026)
- FBBT: Improved handling for product expressions (#2038)
- incidence_analysis: methods for generating and solving strongly
connected components of a square model (#2009)
- incidence_analysis: Add Dulmage-Mendelsohn partition (#2063)
- PETSc: Remove PETSc solver (#1986)
- PyROS: Pyomo Robust Optimization Solver (#2006, #2061)
- sensitivity_toolbox: Add kaug dsdp mode (#1613)
- APPSI: API Cleanup (#1944), bug-fix in update_variables (#2051)
- MindtPy: Increase code coverage (#2021)
- MindtPy: Replace is not by != (#2081)
- PyNumero: ExternalGreyBox subclass to embed implicit functions (#2022)


-------------------------------------------------------------------------------
Pyomo 6.0.1 4 Jun 2021
-------------------------------------------------------------------------------
Expand Down
20 changes: 7 additions & 13 deletions RELEASE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
We are pleased to announce the release of Pyomo 6.0.1.
We are pleased to announce the release of Pyomo 6.1.2.

Pyomo is a collection of Python software packages that supports a
diverse set of optimization capabilities for formulating and analyzing
Expand All @@ -9,18 +9,12 @@ The following are highlights of the 6.0 release series:

- Improved stability and robustness of core Pyomo code and solver interfaces
- Integration of Boolean variables into GDP
- New packages: APPSI, structural model analysis, external grey box models

Note: As a major release, Pyomo 6.0 has certain backwards
incompatibilities with the 5.x series and the 2nd Edition of the Pyomo
Book. Most notably:

- Removed support for Python 2.7 or 3.5
- Moved PySP into a separate package at https://github.com/Pyomo/pysp
- Renamed "Simple" components to "Scalar" components
- Removed support for implicit ranged inequalities (a <= m.x <= b)
- Removed support for component reconstruct method
- Removed support for casting relational expressions to bool
- Integration of NumPy support into the Pyomo expression system
- New packages:
- APPSI (Auto-Persistent Pyomo Solver Interfaces)
- External grey box models
- PyROS (Pyomo Robust Optimization Solver)
- Structural model analysis

A full list of updates and changes is available in the CHANGELOG.txt

Expand Down
1 change: 1 addition & 0 deletions doc/OnlineDocs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
# -- Options for intersphinx ---------------------------------------------

intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'pandas': ('https://pandas.pydata.org/docs/', None),
Expand Down
20 changes: 10 additions & 10 deletions doc/OnlineDocs/contributed_packages/pyros.rst
Original file line number Diff line number Diff line change
Expand Up @@ -360,17 +360,17 @@ PyROS will return one of six termination conditions upon completion. These termi
+---------------------------------------------------+----------------------------------------------------------------+
| **Termination Condition** | **Description** |
+---------------------------------------------------+----------------------------------------------------------------+
| ``grcsTerminationCondition.robust_optimal`` | The final solution is robust optimal |
| ``pyrosTerminationCondition.robust_optimal`` | The final solution is robust optimal |
+---------------------------------------------------+----------------------------------------------------------------+
| ``grcsTerminationCondition.robust_feasible`` | The final solution is robust feasible |
| ``pyrosTerminationCondition.robust_feasible`` | The final solution is robust feasible |
+---------------------------------------------------+----------------------------------------------------------------+
| ``grcsTerminationCondition.robust_infeasible`` | The posed problem is robust infeasible |
| ``pyrosTerminationCondition.robust_infeasible`` | The posed problem is robust infeasible |
+---------------------------------------------------+----------------------------------------------------------------+
| ``grcsTerminationCondition.max_iter`` | Maximum number of GRCS iteration reached |
| ``pyrosTerminationCondition.max_iter`` | Maximum number of GRCS iteration reached |
+---------------------------------------------------+----------------------------------------------------------------+
| ``grcsTerminationCondition.time_out`` | Maximum number of time reached |
| ``pyrosTerminationCondition.time_out`` | Maximum number of time reached |
+---------------------------------------------------+----------------------------------------------------------------+
| ``grcsTerminationCondition.subsolver_error`` | Unacceptable return status(es) from a user-supplied sub-solver|
| ``pyrosTerminationCondition.subsolver_error`` | Unacceptable return status(es) from a user-supplied sub-solver|
+---------------------------------------------------+----------------------------------------------------------------+


Expand Down Expand Up @@ -409,19 +409,19 @@ If we choose to designate all variables as either design or state variables, wit
>>> # === Query results ===
>>> time = results_1.time
>>> iterations = results_1.iterations
>>> termination_condition = results_1.grcs_termination_condition
>>> termination_condition = results_1.pyros_termination_condition
>>> objective = results_1.final_objective_value
>>> # === Print some results ===
>>> single_stage_final_objective = round(objective,-1)
>>> print("Final objective value: %s" % single_stage_final_objective)
Final objective value: 48367380.0
>>> print("PyROS termination condition: %s" % termination_condition)
PyROS termination condition: grcsTerminationCondition.robust_optimal
PyROS termination condition: pyrosTerminationCondition.robust_optimal

PyROS Results Object
"""""""""""""""""""""""""""
The results object returned by PyROS allows you to query the following information from the solve call:
total iterations of the algorithm ``iterations``, CPU time ``time``, the GRCS algorithm termination condition ``grcs_termination_condition``,
total iterations of the algorithm ``iterations``, CPU time ``time``, the GRCS algorithm termination condition ``pyros_termination_condition``,
and the final objective function value ``final_objective_value``. If the option ``load_solution`` = ``True`` (default), the variables in the model will be
loaded to the solution determined by PyROS and can be obtained by querying the model variables. Note that in the results obtained above, we set ``load_solution`` = ``False``.
This is to ensure that the next set of runs shown here can utilize the original deterministic model, as the initial point can affect the performance of sub-solvers.
Expand Down Expand Up @@ -505,7 +505,7 @@ We can then loop through this array and call PyROS within a loop to identify rob
... "solve_master_globally": True,
... "decision_rule_order": 1
... })
... if results.grcs_termination_condition != pyros.grcsTerminationCondition.robust_optimal:
... if results.pyros_termination_condition != pyros.pyrosTerminationCondition.robust_optimal:
... print("This instance didn't solve to robust optimality.")
... robust_optimal_objective.append("-----")
... else:
Expand Down
5 changes: 5 additions & 0 deletions doc/OnlineDocs/library_reference/common/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Domain validators
InEnum
Path
PathList
DynamicImplicitDomain

.. autoclass:: ConfigBase
:members:
Expand All @@ -49,6 +50,10 @@ Domain validators
:members:
:undoc-members:

.. autoclass:: DynamicImplicitDomain
:members:
:undoc-members:

.. autofunction:: PositiveInt
.. autofunction:: NegativeInt
.. autofunction:: NonNegativeInt
Expand Down
6 changes: 6 additions & 0 deletions doc/OnlineDocs/library_reference/common/deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pyomo.common.deprecation
========================

.. automodule:: pyomo.common.deprecation
:members:
:member-order: bysource
6 changes: 6 additions & 0 deletions doc/OnlineDocs/library_reference/common/fileutils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pyomo.common.fileutils
======================

.. automodule:: pyomo.common.fileutils
:members:
:member-order: bysource
6 changes: 6 additions & 0 deletions doc/OnlineDocs/library_reference/common/formatting.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pyomo.common.formatting
=======================

.. automodule:: pyomo.common.formatting
:members:
:member-order: bysource
3 changes: 3 additions & 0 deletions doc/OnlineDocs/library_reference/common/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ or rely on any other parts of Pyomo.
config.rst
dependencies.rst
deprecation.rst
fileutils.rst
formatting.rst
tempfiles.rst
timing.rst
7 changes: 7 additions & 0 deletions doc/OnlineDocs/library_reference/common/tempfiles.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

pyomo.common.tempfiles
======================

.. automodule:: pyomo.common.tempfiles
:members:
:member-order: bysource
1 change: 1 addition & 0 deletions doc/OnlineDocs/library_reference/solvers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Solver Interfaces
gams.rst
cplex_persistent.rst
gurobi_persistent.rst
xpress_persistent.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
XpressPersistent
================

.. autoclass:: pyomo.solvers.plugins.solvers.xpress_persistent.XpressPersistent
:members:
:inherited-members:
:show-inheritance:
6 changes: 3 additions & 3 deletions doc/OnlineDocs/related_packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ Domain-Specific Applications
+==========================+=========================================================+=============================================+
| Chama | https://github.com/sandialabs/chama | Sensor placement optimization |
+--------------------------+---------------------------------------------------------+---------------------------------------------+
| Egret | https://github.com/grid-parity-exchange/egret | Formulation and solution of Unit Commitment|
| Egret | https://github.com/grid-parity-exchange/egret | Formulation and solution of unit commitment|
| | | and optimal power flow problems |
+--------------------------+---------------------------------------------------------+---------------------------------------------+
| IDAES | https://github.com/idaes/idaes-pse | Institute for the Design of Advanced |
| | | Energy Systems |
+--------------------------+---------------------------------------------------------+---------------------------------------------+
| Prescient | https://github.com/grid-parity-exchange/prescient | Parallel solution of structured |
| | | NLPs. |
| Prescient | https://github.com/grid-parity-exchange/prescient | Production Cost Model for power systems |
| | | simulation and analysis |
+--------------------------+---------------------------------------------------------+---------------------------------------------+
| PyPSA | https://github.com/pypsa/pypsa | Python for Power system Analysis |
+--------------------------+---------------------------------------------------------+---------------------------------------------+
Expand Down
Loading

0 comments on commit 4685d98

Please sign in to comment.