A comprehensive framework for modeling interdependencies, vulnerabilities, and attack scenarios in critical infrastructure systems.
This project simulates resource flows (electricity, water, supplies, personnel, data) between interconnected facilities through various infrastructure networks. It models building operations, resource consumption/production, and infrastructure status while accounting for cascading effects during normal operations and crisis scenarios.
models.py- Core simulation components (resources, layers, edges)buildings.py- Building classes with unique resource requirements and outputsinfrastructure.py- Infrastructure network types with singleton patterncsv_world_import.py- World management and CSV import/export utilitiessimulation.py- Simulation scenarios and attack/recovery implementationstestUI.py- Visualization interface using NetworkXgraphsGUI.py- More complex visualization interface using pyQT
- Diverse building types (hospitals, power plants, data centers, etc.)
- Multiple infrastructure network types with varying capacities
- Resource production, consumption, and transportation simulation
- Building and infrastructure damage/recovery modeling
- Attack simulation with variable severity levels
- Status tracking for all components
- CSV import/export for scenario management
- Visualization capabilities
- Clone the repository
- Install dependencies:
pip install pandas networkx matplotlib - Run
python simulation.pyto execute a sample simulation - Or run
python csv_world_import.pyto load from CSV files - Or run
testUI.pyto run sample simulation with UI - Or run
graphsGUI.pyto run a simulation with more advanced UI
- Add new building types in
buildings.py - Create custom scenarios in
simulation.py - Define custom attacks and recoveries using the World class methods
- Let user create custom buildings, infrastructure and resources
- Python 3.x
- pandas
- networkx
- matplotlib
- pyQT