forked from Pyomo/mpi-sppy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into lshaped_fix
- Loading branch information
Showing
76 changed files
with
2,215 additions
and
996 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: mpi-sppy (Pyomo released) | ||
name: test_ef_ph (Pyomo released) | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,9 @@ name: schur-complement | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# aph (pyomo released) | ||
|
||
name: mmw tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: test_env | ||
python-version: 3.8 | ||
auto-activate-base: false | ||
- name: Install dependencies | ||
run: | | ||
conda install mpi4py numpy setuptools | ||
pip install pyomo xpress cplex scipy | ||
- name: setup the program | ||
run: | | ||
python setup.py develop | ||
- name: run tests | ||
timeout-minutes: 10 | ||
run: | | ||
cd mpisppy/tests | ||
python test_mmw.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ MPI is used. | |
hubs.rst | ||
spokes.rst | ||
extensions.rst | ||
mmw.rst | ||
pysp.rst | ||
ef.rst | ||
secretmenu.rst | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.. _MMW confidence interval: | ||
|
||
MMW confidence interval | ||
======================= | ||
|
||
If we want to assess the quality of a given candidate solution ``xhat``, we could | ||
try and evaluate the optimality gap, i.e. the gap between the value of the objective function | ||
at ``xhat`` and the value of the solution to our problem. | ||
The class ``MMWConfidenceIntervals`` compute an estimator of the optimality gap | ||
as described in [mmw1999]_ (Section 3.2) and an asymptotic confidence interval for | ||
this gap. | ||
|
||
We will document two steps in the process : finding a candidate solution ``xhat``, | ||
and evaluating it | ||
|
||
|
||
Finding a candidate solution | ||
---------------------------- | ||
|
||
Computing this confidence interval means that we need to find a solution to | ||
an approximate problem, and evaluate how good a solution to this approximate problem ``xhat`` is. | ||
In order to use MMW, ``xhat`` must be written using one of two functions | ||
``ef_ROOT_nonants_npy_serializer`` or ``write_spin_the_wheel_first_stage_solution``. | ||
These functions write ``xhat`` to a file and can be read using ``read_xhat``. | ||
|
||
Computing a confidence interval | ||
------------------------------- | ||
|
||
The first step in computing a confidence interval is creating a ``MMWConfidenceIntervals`` object | ||
that takes as an argument an ``xhat`` and options. | ||
This object has a ``run`` method that returns a gap estimator and a confidence interval on the gap. | ||
|
||
Example | ||
------- | ||
|
||
An example of use, with the ``farmer`` problem, can be found in the main of ``mmwci.py``. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.