You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SimOpt is a testbed of simulation-optimization problems and solvers. Its purpose is to encourage the development and constructive comparison of simulation-optimization (SO) solvers (algorithms). We are particularly interested in the finite-time performance of solvers, rather than the asymptotic results that one often finds in related literature.
@@ -15,7 +15,7 @@ Several papers have discussed the development of SimOpt and experiments run on t
15
15
*[Pasupathy and Henderson (2011)](https://www.informs-sim.org/wsc11papers/363.pdf) describes an earlier interface for MATLAB implementations of problems and solvers.
16
16
*[Pasupathy and Henderson (2006)](https://www.informs-sim.org/wsc06papers/028.pdf) explains the original motivation for the testbed.
17
17
18
-
## Code
18
+
## Languages & Branches
19
19
### Python
20
20
- The [`master branch`](https://github.com/simopt-admin/simopt/tree/master) contains the source code for the latest stable release of the testbed
21
21
- The [`development branch`](https://github.com/simopt-admin/simopt/tree/development) contains the latest code for the testbed, but may contain more bugs than the master branch
@@ -29,63 +29,59 @@ Full documentation for the source code can be found on our **[readthedocs page](
-[Miniconda or Anaconda](https://www.anaconda.com/download)
35
-
- If you already have a compatible IDE (such as VS Code), we've found that Miniconda will work fine at 1/10 of the size of Anaconda. Otherwise, you may need the Spyder IDE that comes with the full Anaconda distribution.
36
-
- It is ***highly recommended*** to check the box during installation to add Python/Miniconda/Anaconda to your system PATH.
- If you know you have Python installed but are getting a `Command not found` error when trying to use Python commands, then you may need to [add Python to your PATH](https://realpython.com/add-python-to-path/).
-This is a lightweight IDE that is compatible with Miniconda.
36
+
-A Python-compatible IDE
37
+
-We recommend using [VS Code](https://code.visualstudio.com/download), a very popular & lightweight IDE.
40
38
-[Git](https://git-scm.com/downloads) (optional)
41
-
- If you don't have Git installed, you can download the code as a zip file instead
39
+
-Git is required if you wish to contribute back to the SimOpt project. If you simply want to run the SimOpt package, you can download the code as a zip file instead.
42
40
43
41
### Downloading Source Code
44
-
There are two ways to download a copy of the source code onto your machine:
42
+
There are two main ways to download a copy of the source code onto your machine:
43
+
45
44
1. Download the code in a zip file by clicking the green `<> Code` button above repo contents and clicking the `Download ZIP` option, then unzip the code to a folder on your computer. This does not require `git` to be installed but makes downloading updates to the repository more challenging.
1.[Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) the branch you'd like to download to a folder on your computer. This requires `git` to be installed but makes downloading updates to the repository much easier.
49
48
50
49
If you do not need the source code for SimOpt, you may install the library as a Python package instead. See the [Package](#package) and [Basic Example](#basic-example) sections for more details about this option.
51
50
52
-
The `notebooks` folder includes several useful Jupyter notebooks and scripts that are easy to customize. You can either run the scripts as standalone programs or open the notebooks in JupyterLab or VS Code. A description of the contents is provided below:
|`demo_model.py`| Run multiple replications of a simulation model and report its responses |
57
-
|`demo_problem.py`| Run multiple replications of a given solution for an SO problem and report its objective function values and left-hand sides of stochastic constraints |
58
-
|`demo_problem_solver.py`| Run multiple macroreplications of a solver on a problem, save the outputs to a `.pickle` file in the `experiments/outputs` folder, and save plots of the results to `.png` files in the `experiments/plots` folder |
59
-
|`demo_problems_solvers.py`| Run multiple macroreplications of groups of problem-solver pairs and save the outputs and plots |
60
-
|`demo_data_farming_model.py`| Create a design over model factors, run multiple replications at each design point, and save the results to a comma separated value (`.csv`) file in the `data_farming_experiments` folder |
61
-
|`demo_san-sscont-ironorecont_experiment`| Run multiple solvers on multiple versions of (s, S) inventory, iron ore, and stochastic activiy network problems and produce plots |
62
-
63
51
### Environment Setup
64
52
65
-
After downloading the source code, you will need to configure the conda environment to run the code. This can be done by running the following command in the terminal:
53
+
Navigate to the toplevel folder of the `simopt` repository and run the following command to set up a virtual environment:
66
54
67
-
#### Windows (Command Prompt)
68
-
```cmd
69
-
setup_simopt.bat
55
+
```bash
56
+
python -m venv .venv --prompt simopt
70
57
```
71
58
72
-
#### Windows (PowerShell)
73
-
```powershell
74
-
cmd /c setup_simopt.bat
75
-
```
59
+
Then, activate the virtual environment with the following command:
76
60
77
-
#### MacOS/Linux
78
61
```bash
79
-
chmod +x setup_simopt.sh && ./setup_simopt.sh
62
+
.venv\Scripts\activate
80
63
```
81
64
82
-
This script will create a new conda environment called `simopt` and install all necessary packages. To activate the environment, run the following command in the terminal:
65
+
Now all you need to do is install the required packages from the `pyproject.toml` file with the following command:
83
66
84
67
```bash
85
-
conda activate simopt
68
+
python -m pip install .[notebooks]
86
69
```
87
70
88
-
If you wish to update the environment with the latest compatible packages, you can simply rerun the setup script.
71
+
Now that the environment is set up, you can run the example notebooks below or follow the instructions below to launch the GUI.
72
+
73
+
### Example Notebooks
74
+
75
+
The `notebooks` folder includes several useful Jupyter notebooks and scripts that are easy to customize. You can either run the scripts as standalone programs or open the notebooks in JupyterLab or VS Code. A description of the contents is provided below:
|`demo_model.py`| Run multiple replications of a simulation model and report its responses |
80
+
|`demo_problem.py`| Run multiple replications of a given solution for an SO problem and report its objective function values and left-hand sides of stochastic constraints |
81
+
|`demo_problem_solver.py`| Run multiple macroreplications of a solver on a problem, save the outputs to a `.pickle` file in the `experiments/outputs` folder, and save plots of the results to `.png` files in the `experiments/plots` folder |
82
+
|`demo_problems_solvers.py`| Run multiple macroreplications of groups of problem-solver pairs and save the outputs and plots |
83
+
|`demo_data_farming_model.py`| Create a design over model factors, run multiple replications at each design point, and save the results to a comma separated value (`.csv`) file in the `data_farming_experiments` folder |
84
+
|`demo_san-sscont-ironorecont_experiment`| Run multiple solvers on multiple versions of (s, S) inventory, iron ore, and stochastic activiy network problems and produce plots |
89
85
90
86
## Graphical User Interface (GUI) - User Guide
91
87
@@ -177,14 +173,16 @@ The type of plots that are currently available in the GUI are: Mean Progress Cur
177
173
7. To return to the main page, click the red "x" in the top-left corner of the window.
178
174
179
175
## Package
176
+
> ℹ️ The `simoptlib` package does not contain the example notebooks or testing suite. If you wish to use either of those features, please download the source code instead.
177
+
180
178
The `simoptlib` package is available to download through the Python Packaging Index (PyPI) and can be installed from the terminal with the following command:
181
-
```
179
+
```bash
182
180
python -m pip install simoptlib
183
181
```
184
182
185
183
## Basic Example
186
184
After installing `simoptlib`, the package's main modules can be imported from the Python console (or in code):
187
-
```
185
+
```python
188
186
import simopt
189
187
from simopt import models, solvers, experiment_base
0 commit comments