Skip to content

Commit 15ecad0

Browse files
author
kyle cooper
committed
toc
1 parent 53d2847 commit 15ecad0

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Table of Contents
2222
* [Install latest trunk version from git](#install-latest-trunk-version-from-git)
2323
* [Install from source](#install-from-source)
2424
* [CLI](#cli)
25-
* [listitems](#listitems)
26-
* [solve](#solve)
27-
* [testsolve](#testsolve)
28-
* [Output](#output)
29-
* [Table of options for solve and testsolve](#table-of-options-for-solve-and-testsolve)
30-
* [Table of algorithm-specific parameters](#table-of-algorithm-specific-parameters)
31-
* [Programming guide](#programming-guide)
25+
* [listitems](#listitems)
26+
* [solve](#solve)
27+
* [testsolve](#testsolve)
28+
* [Output](#output)
29+
* [Table of options for solve and testsolve](#table-of-options-for-solve-and-testsolve)
30+
* [Table of algorithm-specific parameters](#table-of-algorithm-specific-parameters)
31+
* [Implementing problems, testers, and algorithms in PyMOSO](#implementing-problems-testers-and-algorithms-in-pymoso)
3232
* [Implementing a problem in PyMOSO](#implementing-a-problem-in-pymoso)
3333
* [Template for implementing problems (myproblem.py)](#template-for-implementing-problems-myproblempy)
3434
* [Using rng](#using-rng)
@@ -118,19 +118,19 @@ Help:
118118
test problems.
119119
```
120120
For now, PyMOSO has three commands: `listitems`, `solve`, and `testsolve`, which we explain below.
121-
#### listitems
121+
### listitems
122122
The command `listitems` shows the PyMOSO objects (problems, testers, solvers) included in the default installation. The identifiers can be used as arguments to `solve` and `testsolve`. PyMOSO objects implemented by users will not show up when using `listitems`.
123-
#### solve
123+
### solve
124124
The `solve` command is intended for practitioners seeking to a solve a simulation optimization problem. Three arguments are required: `<problem>`, `<solver>`, and `<x>...`. For `<problem>`, users may specify an identifier for a built-in problem. A list of such identifiers can be viewed using `listitems`. Alternatively, users may implement their own problem as a PyMOSO oracle (see the code examples below) and specify the file name.
125125
For example,
126126
`pymoso solve myproblem.py RPERLE 40 40`
127127
The `<solver>` argument again either an identifier to a built-in algorithm, or a file name for a user-implemented algorithm. The `<x>...` is a feasible starting point for the algorithm, with each component of the starting point separated by a space. Any number of the options listed above can also be specified before the arguments. At the end of this section, we list the options and provide more detailed explanations. The `<x>` argument cannot take negative numbers from the command line. Use PyMOSO in a Python program if a negative starting point is required (see examples below).
128-
#### testsolve
128+
### testsolve
129129
The `testsolve` command is intended for researchers creating new simulation optimization algorithms. Two arguments are required: `<tester>` and `<solver>`. Similar to `solve`, `<tester>` and `<solver>` may be specified as identifiers to built-in testers or as Python files containing user-implemented objects. Specifying `<x>...` is optional: testers may implement a method to generate feasible starting points. If not, then `<x>...` can be provided.
130-
#### Output
130+
### Output
131131
Both `solve` and `testsolve` create a subdirectory within the working directory in which the generated results are saved. In the case of `solve`, the directory typically contains two files: a file containing metadata such as the arguments and options specified, date, run time, and more. The second file contains the solution generated by the chosen solver. If applicable, an error file may be generated. If an error is generated, users may send the metadata file, the error file, and any user-implemented PyMOSO objects to us for assistance. In the case of `testsolve`, the file containing the solution will instead contain multiple solutions, with the last row containing the end solution returned by the algorithm. The intermediate solutions are provided to give a researchers a sense of how the algorithm progresses. If the `--isp` option is specified to generate multiple independent sample path solutions, there will a solution file for every independent sample path. If the `--metric` options is specified, the metric defined in the `<tester>` will be computed on the solutions and saved in a separate file. All available options to `solve` or `testsolve` are specified below.
132132

133-
#### Table of options for solve and testsolve
133+
### Table of options for solve and testsolve
134134
| Option | Description |
135135
| ----------- | ----------- |
136136
|`--budget=B`| The simulation budget limits the number of simulations the algorithm can use to generate a solution. `B` should be a natural number. |
@@ -144,7 +144,7 @@ Both `solve` and `testsolve` create a subdirectory within the working directory
144144
|`--param <param> <val>`| Specify a parameter by name and value. These are algorithm-specific parameters.|
145145

146146

147-
#### Table of algorithm-specific parameters
147+
### Table of algorithm-specific parameters
148148
| Algorithm | Parameter | Default | Description |
149149
| --------- | --------- | ------- | ----------- |
150150
| `RPERLE`, `RMINRLE`, `RPE`, `RSPLINE` | `mconst` | `2` | Sets the initial sample size, and subsequent schedule of sample sizes. |
@@ -153,7 +153,7 @@ Both `solve` and `testsolve` create a subdirectory within the working directory
153153
| `RPERLE`, `RMINRLE` | `betadel` | `0.5` | Roughly, affects how likely it is for RLE to keep its given solution. See http://www.optimization-online.org/DB_HTML/2018/06/6649.html. |
154154
| `RPERLE` and `RPE` | `betaeps` | `0.5` | Roughly, affects how likely PE will perform a search from a point. See http://www.optimization-online.org/DB_HTML/2018/06/6649.html. |
155155

156-
## Programming guide
156+
## Implementing problems, testers, and algorithms in PyMOSO
157157
### Implementing a problem in PyMOSO
158158
Users can implement their own problems in PyMOSO using `myproblem.py` below as the template. The function signatures of `__init__` and `g` must remain the same as shown. Furthermore, in `__init__`, the only changes will be to set `self.num_obj` and `self.dim` as appropriate. The `g` function needs to implement a single simulation observation at `x`, a Python tuple of length `self.dim` representing some point. The function `g` can be a wrapper to external simulation or other programs, but must return two values:
159159
1. `True` or `False` depending on if `x` is feasible to the problem.

0 commit comments

Comments
 (0)