Transport simulation playground
- RabbitMQ must be running:
podman build --tag tsim-rabbitmq tsim-rabbitmq && and podman run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 -p 15674:15674 tsim-rabbitmq
- Open project in Rider
- Build and execute target "TSIM". This initializes the simulation database from "data/scenario.json" and writes the database to "simdb.sqlite" (for the moment hardcoded)
- Build and execute target "TSIM.WebServer". The database will be loaded and simulation can be observed in the browser. The trains are just programmed to try and stop at the closest station until better control architecture is implemented.
mkdir -p work
dotnet run --project TSIM -- work/simdb.sqlite \
--importscenario maps/cern1.json \
--simulate \
--rendersvg work/output.svg
dotnet run --project TSIM.SimServer
# + in another shell:
dotnet watch --project TSIM.WebServer run
# alternatively, to be reachable from the internet
dotnet run --project TSIM.WebServer --launch-profile Production --urls http://0.0.0.0:5000\;https://0.0.0.0:5001
Use the provided Jupyter notebook to load and visualize the generated simlog.csv.
dotnet test TSIM.Tests
osmosis --read-pbf praha-latest.osm.pbf
--tf accept-ways railway=subway
--tf reject-relations
--used-node
--write-xml praha-subway.osm
Then import OSM into QGIS... and do what?
See: https://dotnet.microsoft.com/download/dotnet/5.0
You will also need host Cairo and Pango libraries (e.g. dnf install cairo paingo
on RHEL/CentOS/Fedora)
TODO: add sources to repo
- edit source data
- manually merge cern1_track + cern1_stops into cern1.geojson
- re-run imporscenario