Hello,
unfortunately, there is currently no convenient way to retrieve the count.
You might be able to improve your script by calling
traci.inductionloop.getVehicleData because this clearly distinguishes
between vehicles on the detector and vehicles that have passed it.
Retrieval of counts is a known issue and should be solved via
https://github.com/eclipse/sumo/issues/2139

regards,
Jakob

Am Fr., 9. Nov. 2018 um 14:25 Uhr schrieb Didac Busquets <
[email protected]>:

> Hi,
>
>
>
> I’d like to simulate a count line in a lane, to know how many vehicles
> have gone passed it (that is, completely passed).
>
>
>
> My first idea was to use a single induction loop, but unfortunately from
> Traci you don’t get the information of how many vehicles have actually
> passed it.
>
>
>
> So far what I’ve done is to use the loop and keep track of the vehicles
> inside it (with getLastStepVehicleIDs) at each step, and simply check
> what ids have “disappeared” from the previous step (so those vehicles left
> the loop).
>
>
>
> I’m not convinced this is the best way to do it, but cannot find any other
> sensor type to compute this.
>
>
>
> Anyone has any suggestion?
>
>
>
> Thanks,
>
>
>
>                Didac
>
>
>
> [image: Immense Simulations Limited] <https://htmlsig.com/t/000001D1FAJA>
>
> [image: https://s3.amazonaws.com/htmlsig-assets/spacer.gif]
>
> [image: Twitter] <https://htmlsig.com/t/000001DMCGQH>[image:
> https://s3.amazonaws.com/htmlsig-assets/spacer.gif][image: Facebook]
> <https://htmlsig.com/t/000001DRXRE6>[image:
> https://s3.amazonaws.com/htmlsig-assets/spacer.gif][image: LinkedIn]
> <https://htmlsig.com/t/000001CVTDTW>[image:
> https://s3.amazonaws.com/htmlsig-assets/spacer.gif]
>
> [image: https://s3.amazonaws.com/htmlsig-assets/spacer.gif]
>
> [image: https://s3.amazonaws.com/htmlsig-assets/spacer.gif]
>
> [image: https://s3.amazonaws.com/htmlsig-assets/spacer.gif]
>
> *Didac Busquets* / Co-Founder and Chief Scientist
> [email protected] / +44 (0) 7919 076 981
>
> [image: https://s3.amazonaws.com/htmlsig-assets/spacer.gif]
>
> *Immense Simulations Limited*
> Studio J2, Witan Studios, 279 Witan Gate, Central Milton Keynes, MK9 1EJ
> *w3w*: ourselves.depend.backpack
> www.immense.ai
>
> [image: https://s3.amazonaws.com/htmlsig-assets/spacer.gif]
>
> [image: https://s3.amazonaws.com/htmlsig-assets/spacer.gif]
>
> This e-mail including any attachments is intended for the addressee only.
> It is private, confidential and may be covered by legal professional
> privilege. If you have received this message in error please notify us
> immediately and remove it from your system. Immense Simulations Limited is
> a Company registered in England and Wales No. 09782647. Registered offices:
> International House, 24 Holborn Viaduct, City Of London, London, England,
> EC1A 2BN.
>
>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to