Difference between revisions of "Fire model tutorial"

From Nova Documentation
Jump to: navigation, search
(Created page with "In this tutorial we will use the Firespread model found in the Model Library as our example, however our implementation will differ slightly from the one in the Model Library....")
(No difference)

Revision as of 18:47, 4 January 2015

In this tutorial we will use the Firespread model found in the Model Library as our example, however our implementation will differ slightly from the one in the Model Library. Recall that this model views each cell either as a tree or firewall. Trees can be in one of 3 possible states: unburned, burning or burned. The firewall is represented as the fourth cell state. At each iteration each tree cell determines its next state based on the state of its 8 (Moore[1] neighbors, and are summarized with the following rules:

  • If the current cell is unburned, determine if any of its neighbors are burning. If so, then the current cell will randomly either burn or remain unburned;
  • If the current cell is burning, it becomes burned;
  • If the current cell is burned, it remains burned
  • A cell that is part of the firewall remains unchanged.
This model has a main level and one submodel called Treecell. The latter will be the Capsule type used to populate the Forest CellMatrix. Create this submodel by clicking the New Sub Model button on the toolbar. Save the project as Firespread, so that the main model has that name.
  1. Moore neighborhoods consist of the 8 immediate neighbors of a cell in a cartesian lattice; the Von Neumann neighborhood only contains neighbors directly above, below, or to the left or right.