Hello,
this is a known issue when using traci.vehicle.setStop with cyclical
routes. https://github.com/eclipse/sumo/issues/6211
At the moment, all stops are added to the next suitable edge along the
route without regard to other stops. If the route passes the edge of stop_B
ahead of stop_A then their order will be B, A.
The only workaround is to delay setting the stop until the point where the
next possible edge is also the desired edge.
The result of getNextStops is the actual order in which stops will be
visited.

I recommend generating your bus schedule as xml file if it is static or to
use the taxi api if you need to schedule multiple stops dynamically in a
DRT-context (https://sumo.dlr.de/docs/Simulation/Taxi.html#traci)

regards,
Jakob

Am Mi., 23. Sept. 2020 um 13:32 Uhr schrieb Schneider, Tim <
[email protected]>:

> Dear SUMO users,
>
>
> colleagues of mine and I are trying to route buses in sumo manually using
> the traci.vehicle.setRoute(...) and the traci.vehicle.setBusStop(...)
> function.
>
> However, the order in which the buses are inserted in the list, we receive
> if we call traci.vehicle.getNextStops(...), differs in some cases
>
> from the insertion order in which we called traci.vehicle.setBusStop(...).
> We wonder: What are the underlying rules in this bus stop list
>
> resulting in that ordering?
>
>
> For example we call something like this:
>
> > traci.vehicle.setBusStop(vehicle_id, stop_A, duration)
>
> > traci.vehicle.setBusStop(vehicle_id, stop_B, duration)
>
> > traci.vehicle.setBusStop(vehicle_id, stop_C, duration)
>
> > traci.vehicle.setBusStop(vehicle_id, stop_D, duration)
>
>
> Then we call
>
> > traci.vehicle.getNextStopList(bus_id)
>
> and expect the returned list of tupels now to be in the order: stop_A,
> stop_B, stop_C, stop_D.
>
> However, instead we receive something like this (at least in some cases):
> stop_B, stop_A, stop_C, stop_D.
>
>
> Does someone knows the background of this? Does the ordering of the stops
> in the getNextStops list even make a difference?
>
> Unfortunately, we couldn't find information in the documentation about
> this.
>
>
> Thanks in advance and best regards
>
> Tim
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to