Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Getting the vehicle type of a lanearea dectector in TraCI/libsumo

Hi Michael,

I would disagree. I think it would be really useful to have a TraCI/libsumo module where you can query all the static info of the network (nodes, edges, lanes, links, detectors, traffic lights...). 

That would decouple our scripts from the file based representation of the network. What if the XML schema chanes? What if at some point you change XML by something else (e.g. JSON, reading from a database...)? Then any parsing script would be broken.

I guess it's not a priority, but something to have in mind.

Regards,

	Didac 

-----Original Message-----
From: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> On Behalf Of Michael Behrisch
Sent: 30 October 2018 08:30
To: sumo-user@xxxxxxxxxxx
Subject: Re: [sumo-user] Getting the vehicle type of a lanearea dectector in TraCI/libsumo

Hi,
another easy way would be to parse the input file defining the detector yourself. I am a little bit hesitant to add traci interfaces to all the static information available.

Best regards,
Michael

Am 26.10.18 um 16:41 schrieb Didac Busquets:
> Thank you Jakob,
> 
>  
> 
> That is what I was doing right now, using the detector id as 
> XXXX_Type1 and then manually splitting it. But obviously is not very 
> clean nor portable.
> 
>  
> 
> Would be great if in the future libsumo/TraCI offer a 
> getVehicleTypes() method.
> 
>  
> 
> Cheers,
> 
>  
> 
>                Didac
> 
>  
> 
> *From:*sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> 
> *On Behalf Of *Jakob Erdmann
> *Sent:* 25 October 2018 21:28
> *To:* Sumo project User discussions <sumo-user@xxxxxxxxxxx>
> *Subject:* Re: [sumo-user] Getting the vehicle type of a lanearea 
> dectector in TraCI/libsumo
> 
>  
> 
> Hello,
> 
> there is currently no way to achieve this in a general way. A 
> workaround could be to encode this information within the id of the detector.
> 
> regards,
> 
> Jakob
> 
>  
> 
> Am Do., 25. Okt. 2018 um 13:00 Uhr schrieb Didac Busquets 
> <didac.busquets@xxxxxxxxxx <mailto:didac.busquets@xxxxxxxxxx>>:
> 
>     Hi,
> 
>      
> 
>     I’m using TraCi and libsumo to read the values of lanearea
>     detectors. How can I query what vehicle type they detect? That is,
>     the value of “vTypes” in the definition of laneAreaDetector in the
>     additionals file.
> 
>      
> 
>     Thanks,
> 
>      
> 
>                    Didac
> 
>      
> 
>     Immense Simulations Limited <https://htmlsig.com/t/000001D1FAJA>
> 
>     https://s3.amazonaws.com/htmlsig-assets/spacer.gif
> 
>     Twitter
>     <https://htmlsig.com/t/000001DMCGQH>https://s3.amazonaws.com/htmlsig-assets/spacer.gifFacebook
>     <https://htmlsig.com/t/000001DRXRE6>https://s3.amazonaws.com/htmlsig-assets/spacer.gifLinkedIn
>     
> <https://htmlsig.com/t/000001CVTDTW>https://s3.amazonaws.com/htmlsig-a
> ssets/spacer.gif
> 
>     https://s3.amazonaws.com/htmlsig-assets/spacer.gif
> 
>     	
> 
>     https://s3.amazonaws.com/htmlsig-assets/spacer.gif
> 
>     	
> 
>     https://s3.amazonaws.com/htmlsig-assets/spacer.gif
> 
>     	
> 
>     *Didac Busquets*/ Co-Founder and Chief Scientist
>     didac.busquets@xxxxxxxxxx <mailto:didac.busquets@xxxxxxxxxx> / +44
>     (0) 7919 076 981
> 
>     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 <https://www.immense.ai/>
> 
>     https://s3.amazonaws.com/htmlsig-assets/spacer.gif
> 
>     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
>     sumo-user@xxxxxxxxxxx <mailto:sumo-user@xxxxxxxxxxx>
>     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
> sumo-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or 
> unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/sumo-user
> 



Back to the top