Fire Model Prob
dissmodel.models.ca.fire_model_prob.FireModelProb
Bases: CellularAutomaton
Probabilistic forest fire cellular automaton.
Extends the basic fire model with two stochastic processes:
- Spontaneous combustion — a forest cell can catch fire randomly, even without burning neighbors.
- Regrowth — a burned cell can recover and become forest again.
This creates a dynamic equilibrium between forest growth and fire, producing complex spatial patterns over time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gdf
|
GeoDataFrame
|
GeoDataFrame with geometries and a |
required |
**kwargs
|
Any
|
Extra keyword arguments forwarded to
:class: |
{}
|
Examples:
>>> from dissmodel.geo import regular_grid
>>> from dissmodel.core import Environment
>>> gdf = regular_grid(dimension=(10, 10), resolution=1, attrs={"state": 0})
>>> env = Environment(end_time=20)
>>> fire = FireModelProb(gdf=gdf)
Source code in dissmodel/models/ca/fire_model_prob.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
rule(idx)
Apply the probabilistic fire transition rule to cell idx.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
idx
|
any
|
Index of the cell being evaluated. |
required |
Returns:
| Type | Description |
|---|---|
int
|
New state for the cell:
|
Source code in dissmodel/models/ca/fire_model_prob.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
setup(prob_combustion=0.001, prob_regrowth=0.1)
Configure the model and build the neighborhood.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prob_combustion
|
float
|
Probability of spontaneous combustion per step, by default 0.001. |
0.001
|
prob_regrowth
|
float
|
Probability of regrowth from burned to forest per step, by default 0.1. |
0.1
|
Source code in dissmodel/models/ca/fire_model_prob.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |