Skip to content

ishabansod/Complex-Sys-Sim-Wildfire

Repository files navigation

Complex-Sys-Sim-Wildfire

About

Simulating forest fires using 2D cellular automata to understand the dynamics, scaling laws, critical exponents and transitions.

This project is a (partial) implementation of the paper - A cellular automata model for forest fire spread prediction

Requirements

Please install the following packages before running the code

  1. Python 3+ (tested with v3.11)
  2. NumPy, SciPy, Matplotlib, Pandas,
  3. math, random, time, os, scipy
  4. openpyxl, powerlaw

How to run

Initialize simulation:

rows = 100
cols = 100
n_simulations = 100

sim = WildFireSimulation(rows, cols)
  1. To see animation for one run
visualizer = Visualize('Fire_data_n100.xlsx')
visualizer.animate(sim, steps=200)
  1. To see the effect of varying parameters
    • create a MakePlots object, run a loop over ranges of parameters and call sensitivity_analysis function
plotter = MakePlots(sim)
    parameters = ['percentage_tree_1', 'wind_speed', 'alpha']
    values = [[0, 10, 20],
             [2, 4, 6],
             [0.06, 0.07, 0.08]] # change corresponding param value ranges
    for i, parameter in enumerate(parameters):
        print(parameter, "-----", values[i])
        plotter.sensitivity_analysis(sim, parameter, values[i], n_simulations)
  1. To see the power-law behaviour
    • create a visualize object with the dataset you want to look at
    • then call the function scaling behavior
visualizer = Visualize('Fire_data_n100.xlsx') # change file-name here
visualizer.scaling_behavior()
  1. To see the effect of clustering
    • run the clustering_analysis method of the MakePlotter class
    • parameters of the sweep are editable inside of make_plots.py
    • data analysis is done in clustering_plots.ipynb notebook
plotter = MakePlots(sim)
plotter.clustering_analysis()

References

  1. A cellular automata model for forest fire spread prediction
  2. Forest fire spread using cellular automata
  3. Parallel CellularAutomaton Wildfire
  4. Introduction of self-organised critical forest fire model
  5. Design and implementation of an integrated GIS-based cellular automata model to characterise forest fire behaviour

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •