eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.5k stars 1.41k forks source link

Missing set and change methods to routes #15393

Open afreymann opened 2 weeks ago

afreymann commented 2 weeks ago

Adding a route via traci is fine and works perfektly. However using the traci.route.add methods, only the route id and the edges can be (see https://sumo.dlr.de/docs/TraCI/Change_Route_State.html)

However I want to set additional values such as the repeat or cycleTime (see also https://sumo.dlr.de/docs/Definition_of_Vehicles%2C_Vehicle_Types%2C_and_Routes.html#routes)

Is there any other way to set repeat and cycleTime via traci?

SUMO-version: 1.20

operating system: Linux

namdre commented 2 weeks ago

No, this isn't possible. However, since you are already in a programming environment with TraCI it should be trivial to copy the route edges a few times and thereby emulate the behavior of the "repeat" attribute. Likewise, you can copy the list of stops and increase the 'until' values to mimic the operation of the "cycleTime" attribute. (Admittedly, it would be more convenient if the attributes were available in the API.

afreymann commented 2 weeks ago

thank you very much for the answere. I will try copying the route egdes.

Thanks