Create scenarios in the Calculator
Calculator scenarios let you compare named input variations while keeping one model definition. Each scenario is an editable set of overrides for selected model preconditions. The Calculator submits all configured scenarios together and displays each returned result.
Before you start
The model must declare its inputs in defineModel({ preconditions: { ... } }). Run the model once so the Calculator can discover those preconditions. If no inputs are discovered, + Add scenario stays disabled.
Create a scenario
- Open Scenarios in the model setup panel and select + Add scenario.
- Enter a unique name that describes the alternative, such as
Lower growth. - Select one or more model inputs that this scenario should vary, then select Add scenario.
- Edit the values shown in the new scenario card.
- Select Run model. The Calculator sends all scenario cards together to the engine's
runScenarios()API.
When you create a scenario, its selected fields start with the model's declared default values, even if you have changed those fields under Model inputs. Edits in the scenario card are independent. When you run it, the scenario's selected values override the current base values for those fields; all other inputs continue to use the current Model inputs values.
For example, if the model declares a 2% growth rate and you change Model inputs to 4%, a new Lower growth scenario still starts at 2%. Change it to 1% and run it; the scenario uses 1% growth and the current base values for every other input.
Input types and run settings
Scenario fields use the editor that matches each declared input. Curves appear as grouped date/value editors with the model's declared points as their starting values. A text-file input has its own file picker in the scenario card; local file selections are not copied from Model inputs, so choose a file for each scenario that uses one. Numbers, dates, and currencies use their corresponding controls.
Run settings remain shared. Every scenario uses the currently selected Run input options, including currency and calculation mode. In Monte Carlo mode, the selected trial count and seed apply to each scenario. The engine returns one result per scenario in the batch; use the result tabs above the reports to inspect each one. The raw output includes all scenario results and the batch timings.
Manage scenarios
You can create up to five scenario cards in the Calculator. Use the trash icon in a card's upper-right corner to remove it. Editing a card does not update its results until you select Run model. That reruns all scenario cards through one batch call; the result tabs switch which returned result the reports display.
Scenario cards exist only in the current page state: they are not written into model source or saved with a model, and they disappear when you reload the page. They are also cleared when you change the model code or selected modules. Recreate them after making those changes.
For JavaScript batch scenarios and their input-reference Map overrides, see Scenarios in the reference.