Giter Club home page Giter Club logo

tsim's Introduction

TSIM CI status

Transport simulation playground

screenshot

How to run (real-time mode)

  1. 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
  2. Open project in Rider
  3. 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)
  4. 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.

Other IDEs (VS Code), command line

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

Visualizing data post-mortem

Use the provided Jupyter notebook to load and visualize the generated simlog.csv.

How to run tests

dotnet test TSIM.Tests

Extracting dataset (Praha subway)

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?

Installing .NET Core

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)

Editing with QGIS

TODO: add sources to repo

  • edit source data
  • manually merge cern1_track + cern1_stops into cern1.geojson
  • re-run imporscenario

tsim's People

Contributors

mcejp avatar

Stargazers

 avatar

Watchers

 avatar

tsim's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.