Hello,
there is currently no high-level TraCI function to perform this kind of regional tracking.
You can use low-level functions such as traci.edge.getLastStepVehicleIDs().
By putting the vehicles on your observation edges in a list (or set) in every time step and comparing with the set from the previous step you can detect which vehicles have left the observation region.
regards,
Jakob
Hi all,
I am trying to get the number of cars entering and
leaving a region (defined by a set of traffic lights) at each simulation
step using TraCI. For example, in the attached figure, find out how
many cars enter and exit by n0, n1, ... w0 and w1.
I thought about using induction loops, but I believe it would be a limiter when implementing a large-scale scenario.
Would anyone have any other ideas?
Thank you and best regards,
Taylor
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user