Example 2: FireSpread
A simple system dynamics model can be used to show state changes with influence from neighbors.
Viewing this model in Nova
To run this model:
- Launch Nova
- Select Menu Item File | Browse Model Library
- Open folder 4-Spatial Models and double-click Firespread
The model displays in Nova as shown
About this model
Each cell in this model is one of three states: burnable-green (0), burning-red (1) or burned-black (2). If a burnable cell has a burning neighbor, it will become burning in the next generation with some probability. Each burning cell burns for exactly 1 generation, and then changes to burned. Each cell can also be part of a firewall (state 3). Firewalls (blue) remain in a fixed state and can prevent fires from spreading.
In this model, Forest is a CellMatrix that contains a
50 x 50 grid where each quadrant can be one of the three states described above. Each tree within the Forest is defined in the sublayer Treecell. We can see this when we examine the properties of the Forest.
This model also contains a few different components and plugins, including the Prob Burning slider. Sliders can be extremely useful for user control of parameter values within a model. You can move the value of Prob Burning by simply sliding it with your mouse. We can trace the input of this slider into the Forest CellMatrix and see that it determines the value of the PrBurning input pin at the Treecell sublayer. In this case, the slider directly controls the input parameter value - setting the slider to a value of 0.33 gives the PrBurning input pin at the sublayer that value.
Additionally, this model uses the Tabulator and Raster plugins. We will now look at the Forest Viewer Raster plugin. Notice that this plugin interacts with the input and output of the Forest CellMatrix. The grid structure of Forest is determined by Raster through the Init input parameter. We can see the grid structure in the Model Canvas. Mouse over and click on various parts of the Forest Viewer in the model canvas. You can see that you can interact and determine the structure of the grid input. Lastly, the structure of Forest Viewer for the next time increment is determined via the output of Forest. Right click and go to Properties of the Raster plugin to see how you can change the format of the grid structure - including colors, size, and interactivity. The button Interactive must be on (checked) in order for user interactivity of the plugin in the Model Canvas.
50 x 50 size of the Forest CellMatrix is equal to the
50 x 50 size of the Forest Viewer Raster plugin. The Raster plugin determines the Init input of the CellMatrix which determines the input of the Raster for the next time increment.
The Treecell sublayer contains ways to calculate the state of the current tree. Neighbors of the current tree are calculated from mycoords term, the nbrs term, and the Next_Burning_1 codeChip. The terms are properties (yellow) which means their values are fixed throughout the simulation. The New_State flow determines the state of the tree sequence.
Running the model
To run this model follow these steps at the toplayer:
Running this model:
- Click on the Capture button in the tool bar.
- Click Load next to “Capture.”
- Click Exec to run the model through multiple iterations. Click Stop to stop the run before completion.
- To run the model step by step, click Capture, Load, Init, then Step.
- To rerun the model you may omit the Capture, Load steps.
- To have the model run more slowly adjust the speed slider above the Dashboard.