Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Keeping track of vehicles entering and exiting an edge

Hello,
the proposed method would mostly work except for edges that are very short (vehicles might pass that edge in a single simulation step without showing up in getLastStepVehicleIDs).
If you do not need the data while the simulation is running you could post-process the vehicle route output in FILE using options
--vehroute-output FILE --vehroute-output.exit-times
This gives you the time each vehicle exited for each edge in the route.

regards,
Jakob



2018-06-28 22:02 GMT+02:00 Shekar V <gv.shekar@xxxxxxxxx>:
Hello

Is there an efficient way to keep track of vehicles entering and exiting an edge. I'd like to keep track of the vehicle ID, when they enter an edge and when they exit for the entire network.

My first thought is to use Traci to get edge.getLastStepVehicleIDs() for consecutive time steps. Convert them to sets and take the difference between them. 

Thanks

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user



Back to the top