Thanks for the quick reply, Since, i am looking for a solution to compute the closest point on route between the current vehicle route and a fixed RSU positionned in the middle of a junction. Is not easier to select junctions traversed by the vehicle, than compute distance calculation for these junctions ?
I know that i cannot retrieve junctions (nodes) traversed by the vehicle with the use of TraCI, but maybe it is possible with the use of Sumolib ? Best regards, Arslan *Arslane*, un mec sympa et drole qui vous veut du bien ! Citation favorite : " Qui aime bien chatîe bien" 2016-03-30 13:59 GMT+02:00 Marcus Müller <[email protected]>: > Hello Arslan, > > I am not aware of such a TraCI functionality (there might be one), but > what you definitively can do, is get a vehicles route, and afterwards, use > some minimization to find the point which minimzes the distance = > sqrt((x_route-x_point)^2 + (y_route-y_point)^2) > > As a route consists of edges, you'll have to get the points for the edges > which belong to the route. > > 1) getRoute for specific vehicle > 2) getLaneIndex for vehicle > 3) getShape for edge,laneIndex > > Loop 3 over all edges of route > > But be aware, that the vehicle might drive on different lanes due to > dynamic events during the simulation. If you want to be sure, the vehicle > is driving the route you have received you might need to change the so > called "lanechangemode" where you can force the vehicle to stay on its lane. > > > As I said there might be a faster solution I don't know - but if not, I > hope this helps. > > Best regards, > Marcus > > > > > Am 30.03.2016 um 11:26 schrieb Arslane Hamza Cherif < > [email protected]>: > > > > Hello, > > > > I want to calculate the closest point between a given route that is > related > > to a single Vehicle and a fixed point (with given coordinates) under > SUMO & > > TraCI. > > > > How can i achieve this ? is there a specific TraCI command to use ? > > > > Many thanks, > > > > Best regards, > > Arslan > > > ------------------------------------------------------------------------------ > > Transform Data into Opportunity. > > Accelerate data analysis in your applications with > > Intel Data Analytics Acceleration Library. > > Click to learn more. > > http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140 > > _______________________________________________ > > sumo-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140 _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
