This is a small library generating routes (Fahrstraßen) for a given yaramo railway topology.
Just install it with pip:
pip3 install git+https://github.com/arneboockmeyer/railway-route-generator from railwayroutegenerator.routegenerator import RouteGenerator # topology is a yaramo.models.Topology object RouteGenerator(topology).generate_routes() print(topology.routes)Further examples can be found in the demo repository.