Profile
Back to NewsBack
GitHub Trending 4 min
Reader Mode
OpenRailAssociation/osrd: An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation

OpenRailAssociation/osrd: An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation

OSRD Logo    Public Money Public Code

Contributors badge LGPL License badge Build Status REUSE status Openrail Incubation Stage

What is OSRD?

OSRD (Open Source Railway Designer) is an open source web application for railway infrastructure design, capacity analysis, timetabling and simulation and short term path request.

It's free and open-source forever!

Learn more about the project on osrd.fr.

Demo

Access the demo at demo.osrd.fr.

[!IMPORTANT]
This environment is not intended for use in production. It is refreshed daily, and the data entered is accessible to everyone.

⚠️ Development status

OSRD is still in active development. User and programming interfaces are not entirely stable and are still occasionally modified. If you rely on OSRD, be prepared to deal with regular changes.

Languages

OSRD support multiple languages. Here is the translation status for the different languages. Integrated means that users can actually activate the language in the application. If you want to contribute to the translation, you can do so easily with Weblate.

| Language | Status | Integrated | |---------------|:---------------------------------------------------------------------------------------------------------------------------:|:--------------:| | 🇬🇧 English | Translation status</a> | ✅ | | 🇫🇷 French | Translation status</a> | ✅ | | 🇩🇪 German | Translation status</a> | ✅ | | 🇵🇹 Portuguese | Translation status</a> | ✅ | | 🇪🇸 Spanish | Translation status</a> | ❌ |

Getting Started

To compile and run the application with an example infrastructure:

# build and run the entire stack
docker compose up -d --build

import an small example infrastructure ("small_infra")

./scripts/load-railjson-infra.sh small_infra tests/data/infras/small_infra/infra.json

import rolling stocks with realistic characterics, representative of the industry

./scripts/load-railjson-rolling-stock.sh tests/data/rolling_stocks/realistic/*.json --force

import more rolling stocks

./scripts/load-railjson-rolling-stock.sh tests/data/rolling_stocks/*.json

open the web app

xdg-open http://localhost:4000/

Linux or WSL users can use ./osrd-compose host instead of docker compose to enable host networking: it can be useful to launch services in a debugger.

macOS users on Apple Silicon should make sure to set an arm64 image name for Postgres/PostGIS (to prevent slow amd64 emulation). This image name can be set by creating a .env with OSRD_POSTGIS_IMAGE='nickblah/postgis:16-postgis-3' in it, before running the first docker compose command.

The last-minute train (STDCM) module needs additional setup: start by creating a scenario, copy its ID from its URL, then run:

docker compose exec editoast editoast stdcm-search-env set-from-scenario <id>

If you need to use speed limits tags and loading gauge, run this:

echo '{ "LG1": [], "LG2": [] }' > /tmp/allowed_tracks.json
docker cp /tmp/allowed_tracks.json osrd-editoast:/tmp/
docker compose exec editoast editoast stdcm-search-env set-from-scenario <id> --speed-limit-tags "CC100|100" "CC90|90" "CC200|200" --default-speed-limit-tag "CC100" /tmp/allowed_tracks.json

Alternative with nix and process-compose (experimental)

The project also attempts to maintain a flake.nix to have a full development environment. To use it, install nix package manager, and enable flakes as explained in the flakes docs.

Then, use this command to enter a nix shell:

nix develop

Finally, in the nix shell, you can start the stack with the following commands:

export OSRD_PATH="$(pwd)"

Launch all the external services, still relies on Docker

./osrd-compose up --detach postgres rabbitmq valkey openfga jaeger s3

Launch the OSRD stack

process-compose
[!WARNING]
Most scripts in the scripts/ folder depends on using the Docker stack. So
use them with precaution if you start the stack with process-compose: they
may work, or crash, or produce weird behaviors.

Working on a single component

Each component has a _justfile_ to run usual development tasks. Install just and run it to see available recipes. All the components include:

  • run
  • install
  • test
  • format
  • lint
  • fix-lint

Deployment

To deploy the application on a server, check out the deployment guide.

Get in touch

Send an email at , open an issue, or join the #public-general:osrd.fr matrix channel.

Sponsors

Ministère de l'Aménagement du Territoire et de la Décentralisation European Union SNCF Réseau

License

OSRD is licensed under the GNU Lesser General Public License v3.0, see LICENSE.

Copyright © 2022 The OSRD Contributors

Chat with me