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

Reply via email to