This page documents OpenDC2. OpenDC3 can still run OpenDC2 experiment files with opendc --legacy run, but new features are only added to OpenDC3. See the OpenDC3 documentation, or Migrating to OpenDC3.
Running OpenDC2
OpenDC2 runs experiment files with the OpenDCExperimentRunner. OpenDC2 needs Java 21 or
newer.
Getting OpenDC2
The last release of OpenDC2 is v2.4u. Download
OpenDCExperimentRunner.zip or OpenDCExperimentRunner.tar and unpack it. It contains a bin folder with the
runner, and a lib folder with the libraries it needs.
Fixes made after this release are on the
OpenDC2-maintenance branch. To build the runner
from that branch:
git clone --branch OpenDC2-maintenance https://github.com/atlarge-research/opendc.git
cd opendc
./gradlew :opendc-experiments:opendc-experiments-base:installDist
The runner is then in opendc-experiments/opendc-experiments-base/build/install/OpenDCExperimentRunner/.
Running an experiment
OpenDCExperimentRunner/bin/OpenDCExperimentRunner --experiment-path experiment.json
| Option | Description |
|---|---|
--experiment-path | The experiment file to run. The default is resources/experiment.json. |
-strict | Stop with an error when the experiment or a topology has an unknown key. By default, unknown keys are ignored. |
All paths in an experiment, such as those of the topologies and traces, are relative to the directory the runner is started from. The results are written to the folder set in the experiment, see Output.
Running from IntelliJ
- Open the
OpenDC2-maintenancecheckout in IntelliJ. It is imported as a Gradle project. - Open
opendc-experiments/opendc-experiments-base/src/main/kotlin/org/opendc/experiments/base/runner/ExperimentCli.kt. - Click the run arrow next to
fun main, and choose Modify Run Configuration.... - Set Program arguments to
--experiment-path experiment.json, and Working directory to the folder with your experiment files. - Run or debug the configuration. The results are written to the working directory.
To run M3SA after a simulation, see M3SA.