Hello,
this is a known deficiency in the traci API. see
http://sumo.dlr.de/trac.wsgi/ticket/2524 which also outlines the current
work-around.
Your approach in modifying the C++ code has no obvious errors but you will
have to debug this for yourself.

regards,
Jakob

2017-01-11 1:35 GMT+01:00 Li Yan <[email protected]>:

> Dear SUMO contributors,
>
>
>
> Is there any way to estimate the travel time from origin to destination by
> the speed limit of the edges in the route? For example,
> traci.simulation.getDistanceRoad() returns the distance of the shortest
> route between two positions. I wish to estimate the travel time for driving
> this route.
>
>
>
> I've tried adding a function similar to SUMOReal MSRoute::getTimeBetween()
> in MSRoute.cpp. The only difference is the distance of each edge is divided
> by its speed limit (edge->getSpeedLimit()), which is expected to return the
> travel time of this edge. But the returned result is the same with SUMOReal
> MSRoute::getDistanceBetween(), which means the speed limits of all the
> edges
> are 1?
>
>
>
> If I'm modifying the source code in the wrong way (I'm not sure whether
> edge->getSpeedLimit() is the right way to get the speed limit of an edge),
> please give me some hint. Or please show me if there are other neat ways to
> finish this job. Thanks a lot!
>
>
>
> Best regards,
>
> Li
>
>
>
> Li Yan, Ph.D. candidate
>
> Department of Computer Science
>
> University of Virginia
>
> Personal website:  <http://www.people.virginia.edu/~ly4ss/>
> http://www.people.virginia.edu/~ly4ss/
>
>
>
> ------------------------------------------------------------
> ------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to