Skip to content

Calibrate a model

Fit model parameters to historical data on the Optimization tab. Use a chain of optimizer Runs in one Group. You end with fitted parameters and a full re-run at those values. Names are examples.

Before you start, have:

  • A model with its optimizers already defined in Stella. Experimenter selects and runs them. It does not create them.
  • A historical data file, Historical.csv. See Imports & Exports for the format.

The Optimization tab. The Order pane holds the Calibration Group with four optimizer Runs. The Chain box is ticked on the last three. Markers 1 to 3: Order Add, Optimizations tab, Payoffs tab.

1. Name the comparison run

Group settings stay gray until the Group holds a Run (Add a step to this Group first.). Add one Run first.

  1. Select the Group in Order.
  2. Set Default comparison run to ../Historical.csv.
  3. Set Comparison run name to Historical.

At the start of the scope, Experimenter writes the file into the model copy under that name. Each payoff element scores against it. With no file set, payoffs score whatever the model already holds under that name, and Validate gives an error when the saved run is absent or empty. Under more than one Dataset, a missing comparison is an error. See Create datasets for sequencing.

2. Set up the Files table

On the Files tab:

  1. Import Parameters.csv with the Set parameters behavior. Each Run then starts from the values the last Run fitted.
  2. Export Parameters.csv at interval One Set of Values, scoped to the parameters you fit, such as param_alpha and param_beta.
  3. Add the model’s other drivers as configure-only imports.

The imported and exported Parameters.csv pair is the carrier. It passes fitted values from one Run to the next.

3. Add the optimizer Runs

In Order, click Add and choose Add run, once per optimization. Then select each Run, open the Optimizations tab, and tick Active on the optimizer that Run uses. A staged fit alternates two objectives:

  1. fit-output with optimizer Output
  2. fit-employment with optimizer Employment
  3. fit-output-2 with optimizer Output
  4. fit-employment-2 with optimizer Employment

To override a tolerance or a parameter bound for one Run, see Value overrides.

4. Chain the Group

  1. Move the four Runs into one Group.
  2. Tick Chain on the second, third, and fourth Run.

A chained Run runs in the model folder of the Run above it, so it starts from what earlier Runs fitted. Each unbroken run of chained Runs shares one folder, named for its first Run. An unchained Run gets a fresh copy, which cannot carry a fit forward. The first Run of a Group has no Run above it, so its box does not respond. The chain resets at the Group boundary, so two Groups never affect each other. Only Optimization Runs can chain. Experimenter keeps the carrier between steps and fails a Run when the engine does not rewrite the carrier. See Groups.

5. Run and read the result

  1. Press ⌘S.
  2. Select the Group, then click Run.

Progress streams to the Monitor. When the chain ends:

  • The exported Parameters.csv holds the final fitted values, one row.
  • The Group’s Output.csv holds one full re-run at the fitted values, with Historical included. A later stage reads the same fit.
  • Results are in <model folder>/Output/<experiment>/<group>/. See Outputs & Manifest.

See also