Skip to content
Run your first Experiment

Run your first Experiment

Run the sample Experiment that ships with the app. Read its Output.csv, then repeat the Run from the command line. You need no model of your own and no Stella.

What the sample holds

The setup assistant copies the sample to ~/Documents/Experimenter Sample. The copy has this layout:

Experimenter Sample/
  Model/Oscillator.stmx       A damped spring oscillator.
  Experiment/Sample.expt      The Experiment.

Sample.expt uses the Experimenter engine. It has two Runs, Short and Long, that differ in stop time (20 and 40). The group Both holds them.

In the app

  1. Install and open Experimenter. See Install Experimenter.
  2. On the last page of the setup assistant, click Open sample Experiment. To see the page again, choose Help ▸ Setup Assistant…. Experimenter copies the sample and opens Sample.expt. It never overwrites a copy that exists.
  3. On the Run tab, select the group Both in Order.
  4. Click Run. The Monitor shows one job per Run.
  5. When both jobs end, click Open Output in the Monitor.

The Run tab with the model loaded. Marker 4 marks the Run button. Click it after you select the group Both in Order.

Read the output

The Run writes under Model/Output/ in the sample folder:

Model/Output/Sample/batch.json          The Batch record.
Model/Output/Sample/Both/Output.csv     The collected output.
Model/Output/Sample/Both/Short/model/   The throwaway copy that Short ran on.
Model/Output/Sample/Both/Long/model/    The same for Long.

Output.csv is a wide table. It has one row for each Run and variable, 16 rows here. The first columns are group, source, source_kind, engine, started_at, batch_id, record_hash and variable. The other columns are time steps. Open it in a spreadsheet or in R. For a variable such as Position, compare the Short and Long rows. See Outputs and Manifest.

The same Run from the command line

Copy the sample first, so the original stays clean. Then validate and run it. Quote the paths, because the folder name has a space.

cp -R ~/Documents/"Experimenter Sample" /tmp/sample
EXPT=/tmp/sample/Experiment/Sample.expt
APP=/Applications/Experimenter.app/Contents/MacOS/Experimenter

"$APP" validate "$EXPT"
"$APP" run "$EXPT" --group Both
"$APP" results /tmp/sample/Model/Output/Sample/Both
  • validate prints one warning, sim_specs stop 40 is after the model's sim stop 20, and exits 0. The Long Run overrides the stop time on purpose.
  • run without --group stops with exit status 2 and the message “the default group is empty”. Every Run is filed in a group, so name one.
  • run --group Both prints job Short: ok (attempt 1), job Long: ok (attempt 1) and the path of Output.csv, then exits 0.
  • results prints the status of each job, the values each job changed and the output files.

See Command line for every option of run.

Next