Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added MAiNGO appsi-interface #3165

Merged
merged 45 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7d88fe4
Added MAiNGO appsi-interface
Feb 26, 2024
caa688e
Initial point calculation consistent with ALE syntax
Feb 28, 2024
365370a
Added warning for missing variable bounds
Feb 28, 2024
c440037
Added: NotImplementedError for SOS constraints
Feb 28, 2024
52a4cd9
Changed: Formulation of asinh, acosh, atanh
Feb 28, 2024
4431120
Added: Warning for non-global solutions
Feb 28, 2024
ff2c9bd
Changed: absolute to relative MIP gap
Feb 28, 2024
b833ac7
Added: Maingopy version
Feb 28, 2024
c937b63
Black Formatting
Feb 28, 2024
ccb7723
Fixed: Black Formatting
Feb 28, 2024
e28e14d
Added: pip install maingopy to test_branches.yml
Feb 28, 2024
c52bbc7
Added: pip install maingopy to test_pr_and_main.yml
Feb 28, 2024
5afab3c
Merge branch 'Pyomo:main' into maingo_interface
MAiNGO-github Mar 20, 2024
db5d6dc
Fixed maingopy import
Mar 20, 2024
096613b
Merge branch 'Pyomo:main' into maingo_interface
MAiNGO-github Mar 28, 2024
8b380ab
Merge branch 'Pyomo:main' into maingo_interface
MAiNGO-github Apr 2, 2024
6e182be
Add MAiNGO to test_perisistent_solvers.py
Apr 2, 2024
76ba0eb
Update pyomo/contrib/appsi/solvers/maingo.py
MAiNGO-github Apr 17, 2024
f9ada29
Restrict y to positive values (MAiNGO cannot handle 1/0)
Apr 17, 2024
42fcd17
Restrict y to positive values (MAiNGO cannot handle log(negative))
Apr 17, 2024
bec9be7
Exluded MAiNGO for checking unbounded termination criterion
Apr 17, 2024
6db9970
Create MAiNGOTest class with tighter tolerances to pass tests
Apr 17, 2024
de7fc5c
Exclude duals and RCs for tests with MAiNGO
Apr 17, 2024
334b067
MAiNGOTest class in __init__
Apr 17, 2024
a1e6b92
Add copyright statement
Apr 17, 2024
1fab90b
Set default for ConfigValues
Apr 17, 2024
5b70135
Remove check for Python version
Apr 17, 2024
55b7dff
Add missing functionalities and fix bugs
Apr 17, 2024
986e290
Merge branch 'Pyomo:main' into maingo_interface
MAiNGO-github Apr 17, 2024
f3cd7b8
Merge branch 'maingo_interface' of https://github.com/MAiNGO-github/p…
Apr 17, 2024
380f32c
Register MAiNGO in SolverFactory
Apr 18, 2024
cf560a6
Reformulate confusing comment
Apr 18, 2024
3e477c9
Skip tests with problematic log and 1/x
Apr 18, 2024
d892473
Add maingo to options
Apr 18, 2024
d026ee1
Rewrite check for MAiNGO
Apr 18, 2024
cf3c9da
Add ConfigDict for tolerances, change test tolerances
Apr 18, 2024
ebc3d90
Merge branch 'Pyomo:main' into maingo_interface
MAiNGO-github Apr 29, 2024
7126fb7
Modified two tests
Apr 30, 2024
673fd37
Modify test_persistent_solvers.py
Apr 30, 2024
0127d29
Set default mipgap higher
Apr 30, 2024
389740c
Modify test_fixed_binaries
Apr 30, 2024
547b301
Set epsilonA for one test
Apr 30, 2024
0c14380
Modify fixed_binary-test
Apr 30, 2024
f761085
Create basic autodoc for MAiNGO
mrmundt May 8, 2024
fbd9a0a
Update APPSI TOC
mrmundt May 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ jobs:
|| echo "WARNING: Gurobi is not available"
python -m pip install --cache-dir cache/pip xpress \
|| echo "WARNING: Xpress Community Edition is not available"
python -m pip install --cache-dir cache/pip maingopy \
|| echo "WARNING: MAiNGO is not available"
if [[ ${{matrix.python}} == pypy* ]]; then
echo "skipping wntr for pypy"
else
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ jobs:
|| echo "WARNING: Gurobi is not available"
python -m pip install --cache-dir cache/pip xpress \
|| echo "WARNING: Xpress Community Edition is not available"
python -m pip install --cache-dir cache/pip maingopy \
|| echo "WARNING: MAiNGO is not available"
if [[ ${{matrix.python}} == pypy* ]]; then
echo "skipping wntr for pypy"
else
Expand Down
14 changes: 14 additions & 0 deletions doc/OnlineDocs/library_reference/appsi/appsi.solvers.maingo.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MAiNGO
======

.. autoclass:: pyomo.contrib.appsi.solvers.maingo.MAiNGOConfig
:members:
:inherited-members:
:undoc-members:
:show-inheritance:

.. autoclass:: pyomo.contrib.appsi.solvers.maingo.MAiNGO
:members:
:inherited-members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions doc/OnlineDocs/library_reference/appsi/appsi.solvers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Solvers
appsi.solvers.cplex
appsi.solvers.cbc
appsi.solvers.highs
appsi.solvers.maingo
4 changes: 2 additions & 2 deletions pyomo/contrib/appsi/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1661,15 +1661,15 @@ def license_is_valid(self) -> bool:

@property
def options(self):
for solver_name in ['gurobi', 'ipopt', 'cplex', 'cbc', 'highs']:
for solver_name in ['gurobi', 'ipopt', 'cplex', 'cbc', 'highs', 'maingo']:
if hasattr(self, solver_name + '_options'):
return getattr(self, solver_name + '_options')
raise NotImplementedError('Could not find the correct options')

@options.setter
def options(self, val):
found = False
for solver_name in ['gurobi', 'ipopt', 'cplex', 'cbc', 'highs']:
for solver_name in ['gurobi', 'ipopt', 'cplex', 'cbc', 'highs', 'maingo']:
if hasattr(self, solver_name + '_options'):
setattr(self, solver_name + '_options', val)
found = True
Expand Down
5 changes: 4 additions & 1 deletion pyomo/contrib/appsi/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from pyomo.common.extensions import ExtensionBuilderFactory
from .base import SolverFactory
from .solvers import Gurobi, Ipopt, Cbc, Cplex, Highs
from .solvers import Gurobi, Ipopt, Cbc, Cplex, Highs, MAiNGO
from .build import AppsiBuilder


Expand All @@ -30,3 +30,6 @@ def load():
SolverFactory.register(name='highs', doc='Automated persistent interface to Highs')(
Highs
)
SolverFactory.register(
name='maingo', doc='Automated persistent interface to MAiNGO'
)(MAiNGO)
1 change: 1 addition & 0 deletions pyomo/contrib/appsi/solvers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
from .cplex import Cplex
from .highs import Highs
from .wntr import Wntr, WntrResults
from .maingo import MAiNGO
Loading
Loading