Initial Calculator run settings
Use deccf.defineModel({calculator: {defaultRun: {...}}}) to choose the initial Run input settings for a new Calculator session. The model description retains this metadata. Existing saved settings and changes made in Run input take precedence. Selecting Restore default inputs restores the model's run defaults as well.
calculator.runInput and calculator.scenarios remain optional booleans, both defaulting to true. Hiding a page does not restrict direct calculation functions.
calculator.defaultRun is an optional plain object with these fields:
| Field | Accepted values | Default when omitted |
|---|---|---|
mode | "deterministic" or "monte-carlo" | "deterministic" |
trials | Integer from 1 through 4096 | 1000 |
seed | Safe integer | 7 |
sampling | "pseudo-random" or "sobol" | "pseudo-random" |
Sobol requires an explicitly supplied power-of-two trials count, such as 128. Invalid values, unsupported fields and non-object defaults are rejected with DECCF_INVALID_CALCULATOR. The returned model retains an immutable copy, so changing the original options afterward does not alter its defaults.
const model = deccf.defineModel({
name: 'Monte Carlo starting settings',
currency: deccf.currencies.USD,
timeline: deccf.periods.annual({from:'2026-01', count:1}),
calculator: {
defaultRun: {mode:'monte-carlo', trials:128, sampling:'sobol'},
},
});
return model;This example opens a fresh Calculator run with Monte Carlo, 128 simulations and Sobol selected. defaultRun configures the interactive controls; it does not start a calculation or change the behavior of deccf.run(model) or deccf.runMonteCarlo(model, options). Pass options explicitly when calling those functions in model code.