This project is a comprehensive simulation platform for fire evacuation in buildings, focusing on the design and analysis of pathfinding algorithms. It integrates a modular simulation engine, multiple algorithmic strategies, and both headless and web-based visualization tools.
- Introduction
- System Architecture
- Simulation Engine
- Pathfinding Algorithms
- Visualization Modules
- Web Prototype
- Experimental Scenarios
- Design and Analysis of Algorithms
- Usage Guide
- References
Modern buildings require robust evacuation strategies to ensure occupant safety during emergencies such as fires. Static evacuation plans are often insufficient due to dynamic hazards and crowd behavior. This project addresses these challenges by simulating fire spread and evaluating a wide range of pathfinding algorithms in realistic, multi-floor building environments.
The system is organized into three main modules:
- Building Simulation: Models the building as a 3D grid, simulates fire spread, and manages agent movement.
- Pathfinding Algorithms: Implements and compares 17 algorithms, including classical, advanced, dynamic, and bio-inspired methods.
- Visualization: Provides both Matplotlib-based and web-based (Angular + Three.js) visualizations for simulation and analysis.
matplotlib_prototype/: Python simulation and visualization engine.web_prototype/: Angular web app for interactive 3D visualization.docs/: Documentation and comparative analysis.daa.tex: Main LaTeX report (Design and Analysis of Algorithms theme).
- 3D grid: Each cell is walkable, wall, fire, stairs, or exit.
- Multi-floor support: Stairs connect floors, exits are evacuation goals.
- Probabilistic model: Fire spreads to adjacent cells based on a configurable rate.
- Dynamic update: Fire positions are updated each simulation step, affecting available paths.
- Agents represent evacuees with position, status, and path.
- Agents recalculate paths if blocked by fire.
Implemented in matplotlib_prototype/src/algorithms/:
- Classical: A*, Dijkstra, BFS, DFS
- Advanced: Jump Point Search, Theta*, Bidirectional, Fringe Search
- Dynamic: D*, D* Lite, LPA*, Anytime A*, ARA*
- Bio-inspired: Ant Colony Optimization, Genetic Algorithms, Swarm Intelligence
Each algorithm is encapsulated in a class with a unified interface for easy comparison.
- 3D rendering of building, fire, and agent paths.
- Animation of agent movement and fire spread.
- Interactive 3D visualization.
- Real-time simulation controls.
- Service-based architecture for building, pathfinding, and visualization.
- Located in
web_prototype/. - Angular app with modular components for simulation and analysis.
- Services for building data, pathfinding, and fallback/3D visualization.
- Scenario 1: Simple building, static fire.
- Scenario 2: Complex building, static fire.
- Scenario 3: Dynamic fire spread.
- Scenario 4: Multiple evacuees.
Each scenario tests algorithm performance on path length, computation time, memory usage, adaptability, and success rate.
- A*: Optimal with admissible heuristic, high memory usage.
- Dijkstra: Guarantees shortest path, slower in large graphs.
- JPS: Fast in open grids, complex implementation.
- D Lite/LPA**: Efficient in dynamic environments, higher initial cost.
- ACO/GA/Swarm: Adaptable, good for multiple agents, require tuning.
- Time and space complexity for each algorithm is analyzed in the LaTeX report (
daa.tex). - Trade-offs between computation time, path optimality, and adaptability are discussed.
- Use A* or JPS for simple, static scenarios.
- Use D* Lite or LPA* for dynamic, changing environments.
- Use ACO or Swarm Intelligence for multiple agents and congestion reduction.
- Install dependencies from
matplotlib_prototype/requirements.txt. - Run
main.pyormain_headless.pyfor simulation. - Visualizations are saved as PNG or displayed interactively.
- Install Node.js dependencies in
web_prototype/. - Run
ng serveto start the Angular app. - Access the simulation via browser for interactive 3D visualization.
- See the bibliography in
daa.texfor academic references on algorithms and evacuation modeling.
This documentation provides a technical overview and analysis of the Fire Evacuation System Simulation project, focusing on the design and analysis of algorithms for emergency evacuation.