embrs.fire_simulator.fire#

Core fire simulation model.

class embrs.fire_simulator.fire.FireSim(fuel_map: ndarray, fuel_res: float, topography_map: ndarray, topography_res: float, wind_vec: Wind, roads: list, fire_breaks: list, time_step: int, cell_size: float, duration_s: float, initial_ignition: list, size: tuple, display_freq_s=300)#

Fire simulator class utilizing a probabilistic fire model.

Based on the work of Trucchia et. al. The basis of the simulator is a hexagonal grid, each cell in the grid is a Cell object that contains all the pertinent fire spread parameters for that cell. The simulator takes into account the effects of fuel, slope, and wind on the fire propagation.

Parameters:
  • fuel_map (np.ndarray) – 2D array that represents the spatial distribution of fuel types in the sim. Each element must be one of the 13 Anderson FBFMs. Note: array is flipped across the horizontal axis after input.

  • fuel_res (float) – Resolution of the fuel map in meters. How many meters each row/column represents in space

  • topography_map (np.ndarray) – 2D array that represents the elevation in meters at each point in space. Note: array is flipped across the horizontal axis after input.

  • topography_res (float) – Resolution of the topography map in meters. How many meters each row/column represents in space.

  • wind_vec (Wind) – Wind object defining the wind conditions for the simulation.

  • roads (list) – List of points that will be considered roads for the simulation. Format for each element in list: ((x,y), fuel_content). Where (x,y) is a tuple containing the spatial in the sim measured in meters, and fuel_content is the amount of fuel to be modeled at that point (between 0 and 1)

  • fire_breaks (list) – List of dictionaries representing fire-breaks where each dictionary has a “geometry” key with a shapely.LineString value and a “fuel_value” key with a float value which represents the amount of fuel modeled along the shapely.LineString.

  • time_step (int) – Time step of the simulation, defines the amount of time each iteration will model.

  • cell_size (float) – Size of each cell in the simulation, measured as the distance in meters between two parallel sides of the regular hexagon cells.

  • duration_s (float) – Duration of time (in seconds) the simulation should run for, the sim will run for this duration unless the fire is extinguished before the duration has passed.

  • initial_ignition (list) – List of shapely polygons that represent the regions of the sim that should start as initially on fire.

  • size (tuple) – Size of the simulation backing array (rows, cols)

  • display_freq_s (int, optional) – The amount of time (in seconds) between updating the real-time visualizer, only used if real-time visualization is selected, defaults to 300

property agent_list: list#

List of AgentBase objects representing agents registered with the sim.

property agents_added: bool#

True if agents have been registered in sim’s agent list, returns False otherwise

capture_cell_changes(curr_cell: Cell)#

Update data structures with values relating to a burning cell’s fuel.

Data structures are later used by update_fuel_contents

Parameters:

curr_cell (Cell) – Burning cell to grab values from

property curr_updates: list#

List of cells updated during the most recent iteration.

Cells are in their log format as generated by to_log_format()

iterate()#

Step forward the fire simulation a single time-step

log_changes()#

Log the changes in state from the current iteration

update_fuel_contents()#

Update the fuel content of all the burning cells based on the mass-loss algorithm in (Coen 2005)

property updated_cells: dict#

Dictionary containing cells updated since last time real-time visualization was updated. Dict keys are the ids of the Cell objects.

Classes

FireSim(fuel_map, fuel_res, topography_map, ...)

Fire simulator class utilizing a probabilistic fire model.