Re: [sumo-user] e1 and e2 detector

2021-05-14 Thread Menno van der Woude
Hello Ali, "that should do the trick" was simply another way of saying: it should work. Be sure to thoroughly read the documentation, especially when trying to work with TraCI. Working with SUMO via TraCI means you are handling the simulation and its data in a relatively 'low level' way, that is,

Re: [sumo-user] e1 and e2 detector

2021-05-14 Thread ali mirzaei
1- What trick do you exactly mean? 2- What do you think of those three points at the end of the following function: *getVehicleData*(self, loopID) getVehicleData (string) -> [(veh_id, veh_length, entry_time, e

Re: [sumo-user] e1 and e2 detector

2021-05-14 Thread Menno van der Woude
I think the e1 type is unfit for this, since it has no real length. e2 could be used if the area you are interested in lies on a single edge. In that case the methods you mentioned should do the trick, and otherwise consult the documentation: you could also retrieve data for an edge, for example: h

Re: [sumo-user] e1 and e2 detector

2021-05-14 Thread ali mirzaei
I have had a look at it. But, as far as I know, I should ask the simulation to get or set the vehicle data one at a time via that module(traci.vehicle). I am looking for a facility to get the flow data at a specific point automatically which I was thinking could be e1 or e2 detector. Regards, Ali

Re: [sumo-user] e1 and e2 detector

2021-05-14 Thread Menno van der Woude
the documentation provides ample info here: https://sumo.dlr.de/docs/TraCI/Vehicle_Value_Retrieval.html I guess you could first determine what vehicles are in a given area or location, and then retrieve data for those vehicles. Greets, Menno On 14-5-2021 11:20, ali mirzaei wrote: > I get the po

Re: [sumo-user] e1 and e2 detector

2021-05-14 Thread ali mirzaei
I get the point you said. But, my other question remains. What is the option to receive vehicle data at a specific point? Regards, Ali On Fri, May 14, 2021 at 12:37 PM Menno van der Woude < me...@codingconnected.eu> wrote: > That function should return the described value. However, if no vehicle

Re: [sumo-user] e1 and e2 detector

2021-05-14 Thread Menno van der Woude
That function should return the described value. However, if no vehicles were on the detector during the last step, no valid data can be returned, so you get -1 and (). If a vehicle was on the detector during the last step, the method will give you the data. Greets, Menno On 14-5-2021 10:04, ali

Re: [sumo-user] e1 and e2 detector

2021-05-14 Thread ali mirzaei
Hi Menno, This is what the mannaul says: *getLastStepMeanSpeed(self, detID)* *getLastStepMeanSpeed(string) -> double Returns the current mean speed in m/s of vehicles that were on the named e2*. I am looking for a tool by which I can extract the flow characteristics at the time the vehicle is on

Re: [sumo-user] e1 and e2 detector

2021-05-14 Thread Menno van der Woude
Hello Ali, the e1 detector has no length, I think you should use an e2 detector if you want to have a detector that covers an area. Regarding the functions: when do you call these? I'd expect -1 and () when no vehicles were on the detector during the last step. So at the start of the simulation,

[sumo-user] e1 and e2 detector

2021-05-13 Thread ali mirzaei
Hi everyone, 1- What is the length of the induction loop(e1detector)? 2- in the case of e2detector, when I generate my add.XML file consisting of: and call the functions: print(traci.lanearea.getLastStepMeanSpeed("e2Detector_1")) print(traci.lanearea.getLastStepVehicleIDs("e2Detector_1")) the