This class models a forest as a rectangular lattice of trees in the fire experiment. Time is discrete, and each tree at any time is in one of three states: healthy, on fire, or burnt. If a tree is on fire at a given time, then any of the four neighboring green trees can catch fire at the next time, with specified probabilities. Trees catch on fire independently. A tree on fire at a given time t is burnt at the next time. Once a tree is burnt, it remains burnt. The class has methods for getting and setting the number of rows, the number of columns, and the probabilities of fire spread in the four directions. The class also has methods for getting the number of green trees, the number of burnt trees, and the number of trees on fire.
The text area below gives the code for this object, so that you can browse the constructors, methods, and properties of the object. Of course, this source file is part of devices.zip, which contains all source and resource files for the objects in the devices package.