Skip to content
Chain calibration into a policy run

Chain calibration into a policy run

Build a Sequence that calibrates a model and then simulates a policy on the fitted parameters. One click runs both stages. You end with one Output.csv that covers every stage. Names are examples.

The calibration stage compares against a saved run, so the model needs a Model.isdb that holds it. A Sequence whose members only simulate needs none.

A Sequence is an outline of members on one model. A member points at one Group or Run on another tab of the Experiment. A member nested one level under another starts from the folder that member left, not from the Template. See The outline.

1. Build the two stages first

A Sequence points at existing items and does not copy them. Make both before you start.

  1. On the Optimization tab, build a Group named Calibrate. Tick Chain on each Run after the first, so the Group resolves to one model folder that a nested member can continue from. See Calibrate with optimization groups.
  2. On the Run tab, build a Group named Simulate with a baseline Run and a policy Run. See Build a Run.

Run each Group on its own tab first. A Group that fails alone fails in the Sequence.

2. Create the Sequence

  1. Open the Sequence tab.
  2. Click Add under Order, then Add member. The picker lists the other tabs. Expand one and pick Calibrate.
  3. Add Simulate the same way.

The Sequence tab. The Order pane lists the members with Active, Export, and Level columns. A nested member shows Level 1. Marker 2 marks Add under Order.

3. Nest the Simulate member

  1. Select Simulate.
  2. Click the indent button (▶), or press Tab with the stage list in focus.

Simulate is now at level 1, under Calibrate. It starts from the folder Calibrate leaves, so the fit reaches it. A member left at level 0 still runs, but starts from a fresh Template copy. An unticked Active box skips a member.

4. Save and run

  1. Press ⌘S.
  2. Click Run. A Sequence always runs whole.

Members run in order. Progress streams to the Monitor.

5. Read the output

Each member writes to a numbered folder:

<model>/Output/<experiment>/<sequence>/Base/00-Calibrate/…
<model>/Output/<experiment>/<sequence>/Base/01-Simulate/…

Base is the lane for the Experiment’s own inputs. Click Open Output in the Monitor to open the one Output.csv that remains, at the top of the Sequence folder. It is a long table that covers every member.

  • The Calibrate rows are a full simulation at the fitted values. They are not a short list of fitted parameters.
  • To leave a member’s rows out of the file, untick its Export box. The member still runs.

A Sequence writes to <Output folder>/<Experiment name>/<Sequence name>/. Before, it wrote to <Output folder>/<Experiment name>/. Folders already on disk stay where they are. Move them, or point scripts at the new folder.

For the full layout, see Outputs & Manifest.

See also