Hi, 

Thanks, this may be true, so it is better to use other type of method - for 
example a set of vehicle ids that are within the crossing area.

Regards,
Slavko

> On 31 Oct 2016, at 08:31, CANER İPEK <[email protected]> wrote:
> 
> hello, i check the video and the code a little bit;
> i observe that u used following code to get the queue number for a lane:
> waitingVehiclesNumberNorth += 
> traci.inductionloop.getLastStepVehicleNumber("0") - 
> traci.inductionloop.getLastStepVehicleNumber("2")
> 
> But the command getLastStepVehicleNumber gives 1 if the vehicle is on the 
> detector. So at the video, at some point, a vehicle stays on the detector 
> more than 1 seconds,
> so that the getLastStepVehicleNumber command is keep going to give the result 
> 1; So queue number is increased too much although only one vehicle is on the 
> detector. 
> 
> if you move the detector location far away from the intersection the problem 
> may be solved. There could also be more intelligent solutions for counting 
> queue number.
> regadrs,
> 
> Caner
> 
> Gönderen: Slavko Žitnik <[email protected] <mailto:[email protected]>>
> Gönderildi: 28 Ekim 2016 Cuma 13:48
> Kime: Jakob Erdmann
> Bilgi: sumo-user
> Konu: Re: [sumo-user] TraCI communication inconsistency
>  
> Hello,
> 
> I am sending links to the zip of the project and video of the problem 
> appearing:
>  - ZIP: 
> https://drive.google.com/file/d/0B_omQkCrPFRLcF8wajFMdGlQMVE/view?usp=sharing 
> <https://drive.google.com/file/d/0B_omQkCrPFRLcF8wajFMdGlQMVE/view?usp=sharing>
>  
> <https://drive.google.com/file/d/0B_omQkCrPFRLcF8wajFMdGlQMVE/view?usp=sharing
>  
> <https://drive.google.com/file/d/0B_omQkCrPFRLcF8wajFMdGlQMVE/view?usp=sharing>>
>  
>  - video: 
> https://drive.google.com/file/d/0B_omQkCrPFRLRjFxSy1HcVozaG8/view?usp=sharing 
> <https://drive.google.com/file/d/0B_omQkCrPFRLRjFxSy1HcVozaG8/view?usp=sharing>
>  
> <https://drive.google.com/file/d/0B_omQkCrPFRLRjFxSy1HcVozaG8/view?usp=sharing
>  
> <https://drive.google.com/file/d/0B_omQkCrPFRLRjFxSy1HcVozaG8/view?usp=sharing>>
> SUMO-test.mov 
> <https://drive.google.com/file/d/0B_omQkCrPFRLRjFxSy1HcVozaG8/view?usp=sharing>
> drive.google.com <http://drive.google.com/>
> SUMO-test.mov 
> <https://drive.google.com/file/d/0B_omQkCrPFRLRjFxSy1HcVozaG8/view?usp=sharing>
> drive.google.com <http://drive.google.com/>
> 
> 
> Thanks,
> Slavko
> 
> 
> > On 28 Oct 2016, at 11:53, Jakob Erdmann <[email protected] 
> > <mailto:[email protected]>> wrote:
> > 
> > Hello,
> > The symptoms you describe are quite unexpected. Communication between 
> > traci-client and sumo should be fully synchronized and deterministic. If 
> > you send all necessary files for reproducing this behavior (in a 
> > zip-archive) directly to my address I will look into the matter.
> > 
> > regards,
> > Jakob
> > 
> > 2016-10-28 11:20 GMT+02:00 Slavko Žitnik <[email protected] 
> > <mailto:[email protected]> <mailto:[email protected] 
> > <mailto:[email protected]>>>:
> > Dear all,
> > 
> > I would like to know if the execution of TraCI with SUMO is deterministic - 
> > I get some weird results reading values from induction loops.
> > 
> > For example, I am counting the number of vehicles waiting in front of the 
> > traffic light. The problem is that if I do not wait a little bit after 
> > command “traci.simulationStep”, the readings get weird.
> > 
> > A simple example based on tutorial code:
> > 
> > waitingVehiclesNumberNorth = 0
> > waitingVehiclesNumberWest = 0
> > # we start with phase 2 where EW has green
> > traci.trafficlights.setPhase("0", 2)
> > while traci.simulation.getMinExpectedNumber() > 0:
> >     traci.simulationStep()
> >     #time.sleep(0.5) - sometimes, even if I sleep, I get wrong results
> >     waitingVehiclesNumberNorth += 
> > traci.inductionloop.getLastStepVehicleNumber("0") - 
> > traci.inductionloop.getLastStepVehicleNumber("2")
> >     waitingVehiclesNumberWest += 
> > traci.inductionloop.getLastStepVehicleNumber("1") - 
> > traci.inductionloop.getLastStepVehicleNumber("3")
> > 
> >     print("West: {:3}, North: {:3}".format(waitingVehiclesNumberWest, 
> > waitingVehiclesNumberNorth))
> >     if traci.trafficlights.getPhase("0") == 2:
> >         # we are not already switching
> >         if  waitingVehiclesNumberNorth > 3 and waitingVehiclesNumberWest < 
> > 20:
> >             # there is a vehicle from the north, switch
> >             traci.trafficlights.setPhase("0", 3)
> >         else:
> >             # otherwise try to keep green for EW
> >             traci.trafficlights.setPhase("0", 2)
> > 
> > 
> > The problem above is that the variable “waitingVehiclesNumberNorth” 
> > increases although I see the vehicles passed the second induction loop - 
> > this happens only if I do not use sleep command or if sleep time is short.
> > 
> > Could anyone tell me please if there is some problem in my perception of 
> > using this library? I am using SUMO 0.27.1, compiled on a Mac.
> > 
> > Thanks,
> > Slavko
> > ------------------------------------------------------------------------------
> > The Command Line: Reinvented for Modern Developers
> > Did the resurgence of CLI tooling catch you by surprise?
> > Reconnect with the command line and become more productive.
> > Learn the new .NET and ASP.NET <http://asp.net/> <http://asp.net/ 
> > <http://asp.net/>> CLI. Get your free copy!
> > http://sdm.link/telerik <http://sdm.link/telerik> <http://sdm.link/telerik 
> > <http://sdm.link/telerik>>
> > _______________________________________________
> > sumo-user mailing list
> > [email protected] <mailto:[email protected]> 
> > <mailto:[email protected] 
> > <mailto:[email protected]>>
> > https://lists.sourceforge.net/lists/listinfo/sumo-user 
> > <https://lists.sourceforge.net/lists/listinfo/sumo-user> 
> > <https://lists.sourceforge.net/lists/listinfo/sumo-user 
> > <https://lists.sourceforge.net/lists/listinfo/sumo-user>>
> > 
> 
> ------------------------------------------------------------------------------
> The Command Line: Reinvented for Modern Developers
> Did the resurgence of CLI tooling catch you by surprise?
> Reconnect with the command line and become more productive. 
> Learn the new .NET and ASP.NET CLI. Get your free copy!
> http://sdm.link/telerik <http://sdm.link/telerik>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user 
> <https://lists.sourceforge.net/lists/listinfo/sumo-user>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to