Closed kasop1 closed 6 days ago
Please look at traci.vehicle.getBestLanes for this purpose. "best lanes" contains the lanes the vehicle plans to use.
Is “getBestLanes” determined at the time of vehicle insertion? Or does the value of “getBestLanes” change at each simulation step based on the amount of traffic in the road? If so, when is the final BestLanes determined?
The best lanes are updated as the vehicle travels through the network.
Does this mean that it may change for each simulation step? In other words, does it take into account the traffic conditions of My Step?
There are several events the best lanes are recomputed, e.g. a lane change. So yes, traffic conditions impact the best lanes obviously.
bestLanes correspond to the strategic planning. At the moment, they are only influenced by the route, stops and arrivalLane attribute. There are plans to add a limited measure of influence by traffic conditions (#7157).
However, the point in time at which bestLanes are computed absolutely depends on the traffic conditions (every time the vehicle enters a new lane via longitudinal or lateral movement).
Let's say I'm driving through a multi-lane intersection, and the subsequent exit edge is also multi-lane, is there a way to get the lane ID of the lane I'm exiting before I enter the intersection? I know how to get the edge ID.
Thank you in advance.