Forest fire model

[1]:
from SOC.models import Forest
/progs/miniconda3/lib/python3.7/site-packages/statsmodels/tools/_testing.py:19: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
  import pandas.util.testing as tm
[2]:
T chance_of_thunder = 0.001
model = Forest(p=0.04, f=chance_of_thunder, L=50, save_every = 1)

model.plot_state(False)
[2]:
_images/ForestFire_2_0.png
_images/ForestFire_2_1.png
[3]:
model.run(1000, wait_for_n_iters=1000)
Waiting for wait_for_n_iters=1000 iterations before collecting data. This should let the system thermalize.

  • 0 - ash
  • 1 - tree
  • 2 - burning
[4]:
model.animate_states(notebook=True, interval=100)