Example 2: FireSpread

From Nova Documentation
Jump to: navigation, search

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:

  1. Launch Nova
  2. Select Menu Item File | Browse Model Library
  3. Open folder 4-Spatial Models and double-click Firespread

The model displays in Nova as shown

Error creating thumbnail: File missing

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.

Forest properties - contains instances of Treecell sublayer

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.

Slider value determines the sublayer parameter

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.

Raster plugin takes input and output of Forest

Note: the 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.

Treecell sublayer

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.

The Treecell sublayer

Running the model

To run this model follow these steps at the toplayer:

Running this model:

  1. Click on the Capture button in the tool bar.
  2. Click Load next to “Capture.”
  3. Click Exec to run the model through multiple iterations. Click Stop to stop the run before completion.
  4. To run the model step by step, click Capture, Load, Init, then Step.
  5. To rerun the model you may omit the Capture, Load steps.
  6. To have the model run more slowly adjust the speed slider above the Dashboard.