Hi Pascal, the length is a static value so there is no point in subscribing or retrieving it in every step. You could even skip TraCI entirely for that value and read it from the network. For the lane position (and the current lane) I would propose to use subscriptions. If you care about performance, try using libsumo.
Best regards, Michael PS: Please keep the list posted. Am 06.08.19 um 14:50 schrieb Hoffmann, Pascal: > Hi Michael, > > > but in a lot of cases an edge is just connect to one other edge. So in > all of that cases, assigning would actually not be necessarily. Is it > faster to get the information like getLength and getLanePosition via > subscriptions or with for loops and asking for every single vehicle? > > > Thanks you very much! > > > Best regards, > > Pascal > > ------------------------------------------------------------------------ > *Von:* Michael Behrisch <[email protected]> > *Gesendet:* Freitag, 2. August 2019 12:03:18 > *An:* Sumo project User discussions > *Cc:* Hoffmann, Pascal > *Betreff:* Re: [sumo-user] distance to next junction > > Hi Pascal, > this is just the length of the lane (traci.lane.getLength) minus the > current position on the lane (traci.vehicle.getLanePos). > > Best regards, > Michael > > Am 2019-07-15 14:52, schrieb Hoffmann, Pascal: >> Hi sumo user, >> >> >> I want to assign vehicles just, if they are in a defined distance to >> next junction. Because I didnt find any function for that, I did it so >> far with the distance to the next edge --> vehicle.getDrivingDistance. >> But I actually just want to check whether I need to change my route, >> when it is possible to change the route in like 20m. So is there any >> function to realize the distance to the next junction? >> >> >> Thanks in advance! >> >> >> Best regards, >> >> Pascal >> >> _______________________________________________ >> 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
signature.asc
Description: OpenPGP digital signature
_______________________________________________ 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
