1) tripinfo-output lists the number of times a car was stopped
(waitingCount). Note that a car may stop multiple times at the same
junction if the queue is not cleared in a single green phase. Note that all
the traci functions with 'stop' in their name are for scheduled stops
(<stop>) rather than waiting-at-junction. From TraCI, you have to check the
vehicle speeds continuously and count the number of times it drops from a
high value to a low value.
2) you can compute this from the input route input file or from
vehroute-output (if your cars are re-routing in the simulation) by just
counting the number of time specifc edges are used.
https://sumo.dlr.de/docs/Tools/Routes.html#countedgeusagepy (use with
option --intermediate). If you need a running count from TraCI, define
detectors (i.e. inductionLoop) for each approach and then count the number
of distinct vehicles in traci.inductionloop.getVehicleData
3) offline: https://sumo.dlr.de/docs/Simulation/Output/QueueOutput.html.
TraCI: either filter vehicles on an edge according to their position /
speed or define a laneAreaDetector on the approach and call
traci.lanearea.getJamLengthVehicle

You might also find  this useful:
https://sumo.dlr.de/docs/Tools/Output.html#computecoordinationpy

regards,
Jakob

Am Di., 13. Apr. 2021 um 23:04 Uhr schrieb . Abdullah <[email protected]>:

> Hi,
>
> I was planning to find some statistics but can't figure out how to do it.
>
> 1. How many times a car has stopped at intersections, that is if a car
> passes through 4 junctions but only stops at 2 red lights then I want to
> know that. I know getStopState returns (1 * stopped + 2 * parking + 4 *
> personTriggered + 8 * containerTriggered + 16 * isBusStop + 32 *
> isContainerStop) but I don't think I need all of these.
>
> 2. How many cars have passed through a junction/intersection? I couldn't
> find any function in :
> https://sumo.dlr.de/pydoc/traci._junction.html#JunctionDomain-getIDList
> that can help
>
> 3. Finally, is there a way to find out how many cars are waiting at a
> junction based on direction? Let's say if we have a 4-way intersection and
> I want to find out how many cars are waiting at the north traffic light. I
> tried to use getLastStepVehicleNumber on an edge but I think that returns
> all cars present on that edge rather than just cars present at the
> intersection.
>
> Sorry for so many questions, I am just stuck and need a little advice.
> Thanks in advance.
>
> --
> Thank you.
> Abdullah
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to