https://github.com/chadsr/mesafireevacuation
Agent Based Fire Evacuation Model built using Project Mesa
https://github.com/chadsr/mesafireevacuation
abm agent-based-modeling agent-based-simulation fire-evacutation fire-simulation mesa project-mesa python3
Last synced: about 1 month ago
JSON representation
Agent Based Fire Evacuation Model built using Project Mesa
- Host: GitHub
- URL: https://github.com/chadsr/mesafireevacuation
- Owner: chadsr
- License: mit
- Created: 2018-02-08T08:47:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T12:11:30.000Z (over 2 years ago)
- Last Synced: 2025-04-19T09:58:36.009Z (about 2 months ago)
- Topics: abm, agent-based-modeling, agent-based-simulation, fire-evacutation, fire-simulation, mesa, project-mesa, python3
- Language: Python
- Homepage:
- Size: 1.03 MB
- Stars: 38
- Watchers: 2
- Forks: 9
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fire Evacuation ABM
[](https://github.com/Chadsr/MesaFireEvacuation/actions/workflows/tests.yml)
The [accompanying paper](./docs/Influence_of_Human_Behaviour_in_the_Evacuation_of_a_Burning_Building.pdf) includes both specification and experimental results. To view the code exactly as it was in the paper, please see [here](https://github.com/Chadsr/MesaFireEvacuation/tree/2597862708a57785b1cb67d4bf527e5896d30a7b).
## Setup
*You will need to install [Poetry](https://python-poetry.org/docs/) using your preferred method, first, then:*```
cd MesaFireEvacutation/
poetry install
```## Usage
### Visualised Run```
poetry run python run.py
```Runs the model with a visual interface, in which parameters can be changed.
### Batch Run
```
poetry run python run_batch.py
```Runs the model with num_iterations of all collaboration factor values with the given num_humans.
## Examples
### Realistic Vision

As we can see from the figure above, there is an incapacitated agent within the smoke. This agent can not be seen by our healthy agent and will therefore not be helped. We can also observe that the fire is still visible through the smoke, due to its high visibility value.
This functionality is implemented using [Bresenham's line algorithm](https://en.wikipedia.org/wiki/Bresenham's_line_algorithm), to create a primitive form of CPU-bound ray-tracing.