This project contains a mathematical optimization model to schedule shifts for track maintanance workers. It is based on the SCIP solver and uses Python to model the problem.
A mathematical formulation of the problem is available here: Resource_Allocation.pdf
This project has been initiated during the Hack4Rail 2025, a joint hackathon organised by the railway companies SBB, ÖBB, and DB in partnership with the OpenRail Association.
Install uv first:
curl -LsSf https://astral.sh/uv/install.sh | shInstall dependencies:
uv syncSmall example:
uv run src/dispatch_small.pyBigger two week example:
uv run src/dispatch_two_weeks.py(You can abort after about 2 minutes and get a good but not quite optimal solution.)
Here is an example output: example_run_two_weeks.txt
The content of this repository is licensed under the Apache 2.0 license.
