A Monte-Carlo disaster-response simulator that evaluates emergency response performance through predictive modeling. Built with Java 21 / Spring Boot 3 / SQL / Leaflet + Chart.js and served through a vanilla HTML/CSS/JS frontend.
The platform lets trainers and students run realistic disaster scenarios (Hurricane / Earthquake / Wildfire), deploy resources in real time, and measure outcomes through:
- Live KPIs — community resilience, projected casualties, resource utilization, population at risk, infrastructure damage
- Geographic visualization — Leaflet map with color-coded risk zones (real lat/lon coordinates)
- Predictive analytics — Monte Carlo trials producing P10/P50/P90 casualty forecasts and 95% confidence intervals for resilience scores
- Readiness reports — performance rating, historical comparison, percentile rank, and actionable recommendations (exportable as Markdown)
| Layer | Technology |
|---|---|
| Backend | Java 21, Spring Boot 3.3 (Web + JDBC) |
| Database | MySQL 8 (resilient_pulse schema, auto-created) |
| Frontend | Static HTML/CSS/JS served by Spring Boot |
| Charts | Chart.js 4 (CDN) |
| Map | Leaflet 1.9 + OpenStreetMap (CDN) |
| Build | Maven (bundled wrapper mvnw.cmd — downloads Maven 3.9.9 automatically) |
- Java 21 on the PATH (
java -version) - MySQL 8 running locally (Windows service
MySQL80) - Internet access on first build (Maven + dependencies + CDN libraries)
-
Set your MySQL credentials (only the password is usually needed):
set DB_PASSWORD=your_mysql_root_password rem optional, defaults to root: set DB_USERNAME=root
-
Start the app:
run.bat
(or directly:
mvnw.cmd spring-boot:run)
The database resilient_pulse, all 6 tables, and the sample data (Hurricane / Earthquake / Wildfire scenarios) are created automatically on first startup.
| Module | What it does |
|---|---|
| Home | Concept overview of "Active Training" and the BI-driven approach |
| Sim-Creator | Create scenarios, load existing ones, upload resources via CSV (resource_type, resource_name, quantity, capacity, location), add resources/zones manually |
| Live Simulation | Deploy ambulances / fire trucks / police, order zone evacuations, allocate medical supplies; KPIs update in real time via the Monte Carlo engine |
| Dashboard | 5 KPIs, Leaflet map with color-coded risk zones, time-elapsed gauge, key-metrics polar chart, resource-consumption pie, zone-condition matrix, critical alerts |
| Analysis & Reports | Readiness report (rating, historical comparison, recommendations, .md export), performance radar, resilience trend, Monte Carlo analysis with P10/P50/P90 + 95% CI |
| Endpoint | Description |
|---|---|
GET/POST /api/scenarios, GET /api/scenarios/{id} |
List / create / load scenarios |
POST /api/scenarios/{id}/resources |
Add a resource manually |
POST /api/scenarios/{id}/resources/upload |
Upload resources CSV (multipart file) |
POST /api/scenarios/{id}/zones |
Add a geographic zone |
POST /api/simulation/start |
Start a simulation ({scenarioId}) |
POST /api/simulation/action |
Execute an action (resources / evacuations) |
GET /api/simulation/state |
Current simulation state |
GET /api/reports/current |
Generate + persist readiness report |
GET /api/reports/history?scenarioId= |
Historical simulation results |
GET /api/reports/montecarlo?trials=50 |
Monte Carlo outcome analysis |
src/main/java/com/resilientpulse/
├── ResilientPulseApplication.java (Spring Boot entry point)
├── controller/ ScenarioController · SimulationController · ReportController
├── service/ ScenarioService · SimulationService · ReportService
├── engine/SimulationEngine.java Monte Carlo simulation core
├── repository/ JdbcTemplate repositories for all 6 tables
└── model/ Scenario · Resource · Zone · RandomEvent · SimulationResult · ActionRequest · SimulationState
src/main/resources/
├── application.properties MySQL connection + init config
├── schema.sql DDL for 6 tables (idempotent)
├── data.sql Sample Hurricane / Earthquake / Wildfire scenarios
└── static/ index.html · css/style.css · js/{app,simcreator,simulation,dashboard,reports}.js
- Simulation state is kept per browser session (HTTP session).
- Frontend libraries (Leaflet, Chart.js, marked) are loaded from public CDNs without SRI pinning — fine for local training use; pin versions/hashes before any public deployment.
Built by Atchaya Rengaraj · Java 21 · Spring Boot 3 · SQL · Leaflet · Chart.js