- Docker
- SAFR: This repository. It contains the code for the server and client of the SA/C2 application.
- Nats-forwarder: This tool forwards all new data in SAS to Kafka so that SAFR and EWS can receive this data. Moreover, it sends the simulated resources from agent-smith and messages from EWS to SAS.
- Early Warning System (EWS): This tool keeps track of plumes and resources. Whenever a resource enters or leaves a hazardous area, a warning message is send.
- Agent-smith: branch: assistance_resource_simulation This tool simulates 9 FRs in three categories: blue, white, and red. These categories are translated into FR types by the nats-forwarder. (blue = medical, white = firefighter, red = police)
I recommend using Windows Terminal and opening 6 panes (alt+shift+D).
The items marked DEV
are for development purposes. If you choose to use these, make sure to comment out the c2app
service in the docker compose file (./c2app/docker/simulation/docker-compose.yml
), otherwise SAFR is started twice which leads to weird errors.
# Pane 1: Start kafka and OSRM
cd ./c2app/docker/simulation
docker compose up -d
# DEV: Pane 2: Start the server
cd ./c2app/packages/server
npm start
# DEV: Pane 3: Start the client
cd ./c2app/packages/server
npm start
# Pane 4: Start NATS/MQTT forwarding
cd ./nats-forwarder/kafka-to-nats
npm run build:serve
# Pane 5: Start EWS
cd ./ews/
npm run build
npm run ews
# Pane 6: Start agent-smith
cd ./agent-smith/packages/ass
npm run build
node ./dist/run.js
# OPTIONALLY: Pane 7: Send cht.start message
# During integration test this message will be send externally!
cd ./nats-forwarder/kafka-to-nats
node ./dist/send_cht_start.js
- A cht.start message comes in
- A template plume gets calculated automatically
- Click on the hazard symbol
- Fill in extra information in the right sidebar and click
recalculate
- A new plume gets calculated and will be displayed on the map
- In the meantime, 9 FRs walk around Rotterdam
# Remove simulated resources and their messages
cd ./nats-forwarder/kafka-to-nats
node ./dist/sas_cleanup.js
This will delete all the simulated resources generated by agent-smith
and accompanying messages generated by ews
from the SAS database.