-
-
Nikaas home: a live 3D twin of the building, already evacuating. Photograph the exit map, get everyone out faster.
-
The digital twin: compare "nearest exit" with the Nikaas plan, block an exit, add wheelchair users, and watch the evacuation timer.
-
Four views: the live 3D twin, the plan comparison, validated results (44.6% faster, SFPE match to 0.05 s) and the live phone drill.
Inspiration
Crowd disasters in India happen at exits and on the way to them: the 2019 Surat coaching-centre fire (22 students died after the escape stair burned), the 2017 Elphinstone Road footbridge crush (23 died) and the June 2025 crush outside Chinnaswamy Stadium (11 died). Buildings are certified with static evacuation maps that say one thing: go to the nearest exit. When everyone does, one door jams while others stand empty, and when the nearest exit is on fire the map is simply wrong. Nobody measures how long a full building takes to leave, or which door becomes the bottleneck.
What it does
Nikaas is an open-source evacuation digital twin.
- Photo to twin: a photo or PDF of a building's floor plan becomes a graph of rooms, doors, corridors and stairs, checked by 8 automatic plan checks and fixed in an editor.
- Validated simulator: a flow-limited simulator built on the SFPE fire-engineering hydraulic model times the evacuation. It reproduces the SFPE Engineering Guide's Example 1 (245.25 s vs the published 245.2 s).
- Optimised plan with a proof: an optimiser gives every room the exit that empties the building fastest and re-plans in seconds when an exit or stair is blocked. A quickest-flow linear program gives a proven lower bound, so we show how close each plan is to the best possible.
- Building-safety platform: QR check-in with no app to install, push alerts with each phone's own route, a control room that sees who is inside, safe or asking for help, sensor and camera hazards, and phones taped beside doors as live exit signs. People who cannot use stairs are routed to a refuge.
Results (all from the repo's runs/ files)
- 528-person lab block: everyone out in 166.75 s instead of 301.25 s (44.6% faster), only 3.71 s above the proven lower bound.
- Not one lucky run: with random start delays and ±20% occupancy, faster in 200 of 200 randomised runs on the lab block.
- 5-floor tower (450 people): 375.25 s to 206.0 s. Stadium scaled to 2,001 people: 348.5 s to 203.0 s.
How we built it
Python 3.11 (FastAPI, NumPy, SciPy) for the simulator, optimiser and lower bound; React 19 + TypeScript + Vite, three.js and pdf.js for the web app; Amazon Bedrock (Nova Pro) to read floor plans and Amazon Rekognition plus TensorFlow.js COCO-SSD for camera hazards; AWS Lambda, API Gateway, S3 and DynamoDB, deployed by GitHub Actions on every push, with 196 automated tests.
Challenges we ran into
- Making the numbers trustworthy: we validated the simulator against a published fire-engineering example before trusting any result, and added a proven lower bound so every plan can be judged against the best possible.
- Reading real floor plans: a photo-read plan can miss exits, so every plan goes through 8 automatic checks and an editor before any number is shown, and the warning stays visible.
- Multi-floor buildings: stairwells are shared between floors, so floors have to be released fairly instead of all at once.
Accomplishments that we're proud of
- A simulator that matches the SFPE worked example to within 0.05 s.
- 44.6% faster evacuation on a 528-person building, within 3.71 s of the proven best, and faster in every one of 200 randomised runs.
- A live drill where every phone in the room gets its own exit and is re-routed the moment a fire is set.
What we learned
- A plan is only as good as the floor plan it starts from, so checks and an editor matter as much as the optimiser.
- "Nearest exit" is a reasonable rule for one person and a bad one for a crowd.
What we don't claim
- Times are movement times; detection, alarm and reaction come on top.
- Demo-building occupancy and door widths are our assumptions; the 3D view is an illustration.
What's next
SMS alerts (code and tests exist), the NBC travel-distance check, a physical sensor board, and a full-size stadium run.
Built With
- amazon-bedrock
- amazon-dynamodb
- amazon-rekognition
- amazon-web-services
- aws-lambda
- fastapi
- github-actions
- numpy
- python
- react
- scipy
- tensorflow.js
- three.js
- typescript
- vite