Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] How to calculate the sojourn time of à vehicle on a lane

Thanks for your support 
But I think that a dedicated function in the next versions will be very helpful  for TraCI users 

Le dim. 17 juil. 2022 à 07:13, Jakob Erdmann <namdre.sumo@xxxxxxxxx> a écrit :
- traci.vehicle.getWaitingTime    (this is reset to 0 every time the vehicle moves so you have to do some bookkeeping if a vehicle waits for more than one cycle of the light)
- traci.vehicle.getAccumulatedWaitingTime (not reset on moving but only has a fixed memory horizon, default of 100s, configurable with --waiting-time-memory)
- traci.vehicle.getSpeed  (count the steps where this is below some threshold in your script)
and of course traci.vehicle.getLane to know when the vehicle has passed the intersection.

Am So., 17. Juli 2022 um 09:02 Uhr schrieb Hervé Diedie <hervediedie@xxxxxxxxx>:
Thanks for all these methods ...But how can we solve this problem using TraCI ?

Le sam. 16 juil. 2022 à 19:12, Jakob Erdmann <namdre.sumo@xxxxxxxxx> a écrit :
1)
 --vehroute-output vehroutes.xml --vehroute-output.exit-times
by comparing exit times of subsequent edges, you can compute the travel time on each edge.
By comparing this to ideal travel times you get the time loss which is closely correlated with waiting time

2)
--fcd-output fcd.xml
filter by the desired lane/edge and by the speed of the vehicle

3)
<edgeData id="custom" vTypes="typeofEgo" edges="edgeBeforeJunction" file="result.xml"/>
"typeOfEgo" should be a unique type id that is only used by the specific vehicle you are looking for
The desired result is written as attribute 'waitingTime'

Am Sa., 16. Juli 2022 um 18:14 Uhr schrieb Hervé Diedie <hervediedie@xxxxxxxxx>:
I want to determine how long a vehicle has waited on a lane before crossing an intersection ?
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top