Skip to content

faq 191430658

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

inconsistent route distance and travel time in the plan

by Amit Agarwal on 2018-02-28 08:40:45


This question is a follow up question of this.

As already stated by Wolfgang, the speeds calculated from route distance and travel times in plans file are significantly higher than the free speed on the link.

Looking into the code (NetworkRoutingModule), it appears that the router returns a 'path' (set of links) and travel time for these links. Then, the path is wrapped by 'start' and 'end' links which becomes a route. Afterwards, the route distance is calculated from 'toNode' of 'startLink' to 'toNode' of 'endLink', however travel time remains same as reported in Path. Thus, the speed from reported distance and time by the router appear too high. This appears inconsistent.


Comments: 1


Re: inconsistent route distance and travel time in the plan

by Kai Nagel on 2018-02-28 13:15:08

Right. Distance is computed by RouteUtils.calcDistance(route, 1.0, 1.0, this.network) . The 1.0, 1.0 are offsets along the link, and here means that the departure link is not included, but the arrival link is.

https://matsim.atlassian.net/browse/MATSIM-792

Clone this wiki locally