Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] How do you use the replaceStop Function in TraCI?

Hello Everyone

I am currently trying to figure out how I can model buses going around a looping route and change their route to go to a fuel station with TraCI when their fuel capacity gets to a certain level. I was looking at several different functions in the TraCI API that could help with this and one of the ones I took note of was replaceStop(). I noticed some of the arguments in the function, but some of them didn't make sense to me. For instance:
  • What is the NextStopIndex? Is this the same as BusStop ID?
  • What is the LandIndex is this the same as Lane ID or is this the number at the end of the LaneID? For example: on edge -7855681#1_0, is the LaneIndex 0 in this case?
  • How is the Flag argument defined? Is it only binary with 0 or 1? What exactly do these values represent?
  • Do both the arguments 'until' and 'duration' need to be specified or does only one of the two need to be specified?
I also have a predetermined looping bus route that is in a rou.xml file format. I was wondering once the bus replaces its current upcoming bus stop to the fueling station and performs the fueling activity, what will happen to the bus next? Will the bus move to the next bus stop that it was supposed to go to on its route? Or will it move ahead to the next bus stop in its schedule if it has fallen behind in its schedule?

Thank you
Ifezue

Back to the top