Hi Anil, did you check the detectors output file? Have you defined the induction loops in an xml file and added it to your simulation? In this file you have to define an output file for each detector. In this case it will be "out.xml".
<additional> <inductionLoop id="myLoop1" lane="foo_0" pos="42" freq="900" file="out.xml"/> <inductionLoop id="myLoop2" lane="foo_2" pos="42" freq="900" file="out.xml"/> .... </additional> When you start the simulation, this file will be created and all parameters for each detector and time interval will be saved. The number of vehicles passing through the detector is in "nVehEntered". Although the frequency and file attributes, as the documentation says, do not matter for TraCI, both attributes are important if you want to get information from the whole simulation. The getLastStepVehicleNumber in TraCI only return the number of vehicles that were on the named induction loop within the last simulation step. Regards, Giuliana -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of anilbaral Sent: Dienstag, 14. Juli 2020 10:00 To: [email protected] Subject: Re: [sumo-user] No of vehicle passing through a detector using TRACI Hi Maria, Thanks for the reply. Well, I have tried to use the induction loop detectors; however, I could only obtain a vehicle for the last time step. I couldn't obtain the number of vehicle in certain time interval. The command getLastStepVehicleNumber only gives me number of vehicle passing through the induction loop detectors in last time step of 1sec. I want to get the number of vehicle passing through the entire simulation time, which is 3000 sec. Thanks, Anil -- Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/ _______________________________________________ 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
