Reference: components
Submodel
Updated 3 November 2026 · 1 min read
A submodel is a whole model put inside this one, in its own box. Its names get its name in front, and its constants come with it.
Add one#
Click Submodel in the components list. Choose a model, a template, a worked example or one of your own, give it a name, and add it. It arrives below what is already on the canvas, in a box with its name as the label.
Names#
Every stock, flow, variable and constant inside gets the submodel’s name in front, so two copies never clash. In a submodel called North, the outbreak’s Infected becomes North: Infected on the canvas and NorthInfected in formulas. Keep submodel names short: every name inside starts with it.
Connecting it#
A submodel goes in open, with everything showing, and connects to the rest of the model the usual ways:
- Use its values by name in your formulas.
- Draw flows to and from its stocks.
- Change its constants like any others.
If its source model has inputs and outputs marked, it goes in folded as a module instead.
Time units#
A submodel’s rates are read in the outer model’s time unit. If the two count time differently, days in one and years in the other, the dialog warns you, and you should check its rates after adding it.
What can’t go in#
Models that read inputs over time, like the carbon and warming example with its emissions history, can’t be put inside another model yet.
See also
- Two towns, one outbreakPut a model inside another twice, connect the copies with a flow, and watch the second outbreak follow the first.
- Module and boxesA model with inputs and outputs, used as one block; and folding any box.
- Make a model reusable as a moduleMark inputs and outputs, then drop the model into others as a single block.
- ArrayA stock repeated n times, as a chain or side by side.