Hi Thodoris,
According to the
wiki, TraCi can only “get
the number of vehicles that were on the named induction loop within the last simulation step” using the command that you mentioned. But you can accumulate the results along the steps in your code.
The
Induction Loop Detector file has, as you said, the aggregated values. But you can define the frequency (freq) with which the values should be aggregated. See
https://sumo.dlr.de/docs/Simulation/Output/Induction_Loops_Detectors_(E1).html
Regards,
Giuliana
Von: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx>
Im Auftrag von Thodoris Zerlentis
Gesendet: Mittwoch, 11. November 2020 16:44
An: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Betreff: [sumo-user] SUMO E1Detectors and Traci commands
I am currently trying to implement some detectors within my simulation scenario, like am induction loop detector. I found from documentation the E1 detectors and implemented them in my scenario
. Though, i have a question about Traci and the ability of the detectors to share their data while the simulation is running. I used the
getLastStepVehicleNumber command for the detector and the only thing that i get is the last steps vehicle number, while in the output file the nVehEntered variable is calculating all the vehicle that have passed. Is there a way or a function-command that
i can use to get all the data from the detector for the time passed with Traci and while simulation is running or shall i create some code lines within my Traci file in order to calculate every step (or second) the data that i need?
Best regards,
Thodoris Zerlentis