How-to guides
Find which constants matter
Updated 3 November 2026 · 2 min read
A sweep runs the model once for each of several values of one constant, across its whole range, and draws every run of one output together. It answers the first question to ask of any model: which of these numbers actually matters?
Run a sweep#
- Open Analysis in the side panel.
- Under Sensitivity, choose what to Vary and what to Watch.
- Set the number of runs with the slider. Nine is the default; more give a smoother picture and take longer.
- Press Run the sweep.
- 1The constant to vary, across its whole range.
- 2The output to draw from each run.
- 3Runs them all at once on SepalSolver.
The constant goes from the bottom of its range to the top in equal steps. Every other constant keeps its value.
Read it#
Sweeping the outbreak’s contact rate from 0.05 to 1 a day, watching the number ill:
| Contact rate | Peak ill | On day |
|---|---|---|
| 0.05 | 10 (no outbreak) | 0 |
| 0.169 | 133 | 150 |
| 0.287 | 1,561 | 47 |
| 0.406 | 2,810 | 29 |
| 0.644 | 4,429 | 17 |
| 1.0 | 5,758 | 10 |
The answer isn’t a straight line, and the sweep shows where it bends. Below about 0.143, which is one over the 7 days a person is ill, an outbreak can’t take hold at all. Just above it the epidemic is slow and small. Past 0.4 the peak keeps growing but more and more slowly, because the town is running out of people to infect.
That shape tells you where the model is sensitive. Near the threshold, a small error in the contact rate changes everything. Far above it, a 20% error moves the peak by a few hundred people. Knowing which side of a threshold you are on tells you how hard to work at measuring a number.
Sweep or fit?#
A sweep shows how the output depends on a constant. A fit finds the value of a constant that matches data. Sweep first: if the output hardly moves across a constant’s range, no data about that output will pin it down, and fitting it is a waste of a fit.
See also
- Fit constants to measurementsChoose what to fit, run the fit, and read the ± and R² that come back.
- Compare scenariosRun the same model under different futures and see them on one chart.
- Feedback loopsWhere behaviour comes from: loops that reinforce and loops that balance.
- Two towns, one outbreakPut a model inside another twice, connect the copies with a flow, and watch the second outbreak follow the first.