Hi Stefano, there is traci.simulation.findRoute, see http://www.sumo.dlr.de/daily/pydoc/traci._simulation.html#SimulationDomain-findRoute which should give you the desired information (see also http://www.sumo.dlr.de/daily/pydoc/traci._simulation.html#Stage for the return value).
Best regards, Michael Am 06.07.2018 um 15:08 schrieb Stefano Niero: > Hi, > > I am performing a simulation using TraCI. In my simple scenario, I have > two vehicles stopped at two respective edges, and I have a third target > edge. I want to select the vehicle that is closer to the target and make > it go there. To do so I would like to consider the distance to be > covered or the time, but to keep things simple, at the moment it would > be enough to count the number of edges to be covered. To do so I created > the route and then used the function traci.route.getEdges to obtain the > list of edges to be covered, count them and compare the two numbers so > to select the lower one. The problem is that in the list only start and > end edges appear so it always give me that edges to be covered are two. > > How should I do to obtain the real number? > Is there a way to obtain the minimum distance between to edges or even > the minimum time necessary to cover the route between them? > > > Thank you very much in advance for the answer > > Stefano Niero > > > > > > _______________________________________________ > sumo-user mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe from > this list, visit > https://dev.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://dev.eclipse.org/mailman/listinfo/sumo-user
