Skip to main content
OpenDC2 is no longer being developed

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
OptionDescription
--experiment-pathThe experiment file to run. The default is resources/experiment.json.
-strictStop 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​

  1. Open the OpenDC2-maintenance checkout in IntelliJ. It is imported as a Gradle project.
  2. Open opendc-experiments/opendc-experiments-base/src/main/kotlin/org/opendc/experiments/base/runner/ExperimentCli.kt.
  3. Click the run arrow next to fun main, and choose Modify Run Configuration....
  4. Set Program arguments to --experiment-path experiment.json, and Working directory to the folder with your experiment files.
  5. Run or debug the configuration. The results are written to the working directory.

To run M3SA after a simulation, see M3SA.