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

Fix typos in documentation #466

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions doc/src/aph.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ APH
===

The code is based on "Algorithm 2: Asynchronous projective hedging
(APH) -- Algorithm 1 specialize to the setup S1-S4" from "Asynchronous
(APH) -- Algorithm 1 specialized to the setup S1-S4" from "Asynchronous
Projective Hedging for Stochastic Programming"
http://www.optimization-online.org/DB_HTML/2018/10/6895.html

Expand Down Expand Up @@ -100,7 +100,7 @@ farmer
^^^^^^

The scripts for this example are currently in the paper repo in
`AsyncPH/experiments/challange/farmer`; the driver is
`AsyncPH/experiments/challenge/farmer`; the driver is
`farmer_driver.py`. The driver references the model, which is in the
`mpi-sppy` repo. The `aph05.bash` script is intended
to have a dispatch fraction of 1/2 (hence the 05 for 0.5 in the name).
Expand All @@ -119,7 +119,7 @@ A Peek Under the Hood

The APH implementation has a listener thread that continuously does
MPI reductions and a worker thread that does most of the work. A wrinkle
is that the listenter thread does a `side gig` if enough ranks have reported
is that the listener thread does a `side gig` if enough ranks have reported
(the "async_frac_needed" option) because after it has
done the reductions to get u and v and needs to do some calculations, and
then reductions to compute tau and theta.
Expand Down
12 changes: 6 additions & 6 deletions doc/src/confidence_intervals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ If we want to assess the quality of a given candidate solution ``xhat_one``
(a first stage solution), we could try and evaluate the optimality gap, i.e.
the gap between the value of the objective function
at ``xhat_one`` and the value of the solution to the problem.
The class ``MMWConfidenceIntervals`` compute an estimator of the optimality gap
The class ``MMWConfidenceIntervals`` computes an estimator of the optimality gap
as described in [mmw1999]_ (Section 3.2) and an asymptotic confidence interval for
this gap.

Expand Down Expand Up @@ -40,7 +40,7 @@ Evaluating a candidate solution
To evaluate a candidate solution with some scenarios, one might
create a ``Xhat_Eval`` object and call its ``evaluate`` method
(resp. ``evaluate_one`` for a single scenario). It takes as
an argument ``xhats``, a dictionary of noon-anticipative policies for all
an argument ``xhats``, a dictionary of non-anticipative policies for all
non-leaf nodes of a scenario tree. While for a 2-stage problem, ``xhats`` is
just the candidate solution ``xhat_one``, for multistage problem the
dictionary can be computed using the function ``walking_tree_xhats``
Expand All @@ -57,16 +57,16 @@ This object has a ``run`` method that returns a gap estimator and a confidence i
Examples
--------

There are example scrips for sequential sampling in both ``farmer`` and ``aircond``.
There are example scripts for sequential sampling in both ``farmer`` and ``aircond``.

Using stand alone ``mmw_conf.py``
Using stand-alone ``mmw_conf.py``
---------------------------------

(The stand-alone module is currently for use with 2-stage problem only; for multi-stage problems, instantiate an ``MMWConfidenceItervals`` object directly)
(The stand-alone module is currently for use with 2-stage problem only; for multi-stage problems, instantiate an ``MMWConfidenceIntervals`` object directly)

``mmw_conf`` uses the ``MMWConfidenceIntervals`` class from ``mmw_ci`` in order to construct a confidence interval on the optimality gap of a particular candidate solution ``xhat`` of a model instance.

To use the stand along program a model compatible with ``Amalgamator`` and ``.npy`` file with a candidate solution to an instance of the model are required.
To use the stand-alone program a model compatible with ``Amalgamator`` and ``.npy`` file with a candidate solution to an instance of the model are required.

First, ensure that the model to be used is compatible with the
``Amalgamator`` class. This requires the model to have each of the
Expand Down
4 changes: 2 additions & 2 deletions doc/src/drivers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ Extending Examples
Many developers
will need to add extensions. Here are few examples:

* In the ``farmer_cylinders.py`` example, there is a block of code to add a ``--crops-mult`` argument that is passed to the scenario create in the ``scenario_creator_kwargs`` dictionary.
* In the ``farmer_cylinders.py`` example, there is a block of code to add a ``--crops-mult`` argument that is passed to the scenario creator in the ``scenario_creator_kwargs`` dictionary.

* In the ``hydro_cylinders.py`` example (which has three stages). The branching factors are obtained from the command line and passed to the scenario constructor via ``scenario_creator_kwargs`` and also passed to ``sputils.create_nodenames_from_BFs`` to create a node list.

* The ``uc_cylinders.py`` example adds arguments that are used to provide data or trigger the inclusion of extensions. The extension specifications and arguments are added to the dictionaries (e.g., ``hub_dict``) create by ``vanilla.py``.
* The ``uc_cylinders.py`` example adds arguments that are used to provide data or trigger the inclusion of extensions. The extension specifications and arguments are added to the dictionaries (e.g., ``hub_dict``) created by ``vanilla.py``.

Not Using Examples Utilities
----------------------------
Expand Down
4 changes: 2 additions & 2 deletions doc/src/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Examples
========

If you installed directly from github, the top
If you installed directly from GitHub, the top
level directory ``examples``
contains some sub-directories with examples.

If you did not get the code from github (e.g., if
If you did not get the code from GitHub (e.g., if
you installed with pip), you will need to
get the examples from:
https://github.com/Pyomo/mpi-sppy/tree/master/examples
Expand Down
2 changes: 1 addition & 1 deletion doc/src/install_mpi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Here are two methods that seem to work well for installation, at least when cons

* ``conda install openmpi; conda install mpi4py`` (in that order)

#. If you already have an existing version of MPI, it may be better compile mpi4py against it. This can be done by installing mpi4py though pip.
#. If you already have an existing version of MPI, it may be better compile mpi4py against it. This can be done by installing mpi4py through pip.

* ``pip install mpi4py``

Expand Down
8 changes: 4 additions & 4 deletions doc/src/scenario_creator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This function instantiates models for scenarios and usually attaches
some information about the scenario tree. It is required, but can have
any name, and its first argment must be the scenario name. The other
any name, and its first argument must be the scenario name. The other
two arguments are optional. The `scenario_creator_kwargs` option specifies data that is
passed through from the calling program.
`scenario_creator_kwargs` must be a dictionary, and might give, e.g., a data
Expand Down Expand Up @@ -51,7 +51,7 @@ illustrated in the netdes example:

::

# Add all index of model.x using wild cards
# Add all indexes of model.x using wild cards
sputils.attach_root_node(model, model.FirstStageCost, [model.x[:,:], ])

Scenario Probability
Expand All @@ -70,13 +70,13 @@ The function ``attach_root_node`` takes an optional argument ``nonant_ef_suppl_l
multipliers by algorithms such as PH, but will be given non-anticipativity
constraints when an EF is formed, either to solve the EF or when bundles are
formed. For some problems, with the appropriate solver, adding redundant nonanticipativity constraints
for auxilliary variables to the bundle/EF will result in a (much) smaller pre-solved model.
for auxiliary variables to the bundle/EF will result in a (much) smaller pre-solved model.

Multi-stage
-----------

When there are scenario tree nodes other than root, their names,
although strings, must indicates their position in the tree,
although strings, must indicate their position in the tree,
like "ROOT_3_0_1". A given non-root node, which is the child number `k` of
a node with name `parentname`, should be named `parentname_k`.
The node constructor, ``scenario_tree.ScenarioNode`` takes as
Expand Down
Loading