Skip to content

faq 124551169

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

'wrappedFromNodes' and 'wrappedToNodes' in Intermodal example

by Jishnu Narayan on 2017-11-21 10:16:47.924


Dear all,

In the example RunTaxiPTIntermodalExample.java, there are sets wrappedFromNodes and wrappedToNodes. If i understand correctly, they represent the sets of all stops near the origin and destination respectively. But I am not able to understand the definition of those. They are defined as linked hashmaps (Map<Node, InitialNode>). So what does the Node and InitialNode represent?

Also, given 2 pt stops A and B, and the arrival time of an agent at stop A, how can i get the shortest travel time form A to B using the scheduled pt network (is there already a method for this)?


Comments: 2


Re: 'wrappedFromNodes' and 'wrappedToNodes' in Intermodal example

by Kai Nagel on 2017-11-21 11:31:28.519

If it is the PT router, then what is behind it is what we call a multinode Dijkstra:

  1. All pt stops are initialized with cost infinity.

  2. All possible starting pt stops are initialized with the cost of getting there from A. This replaces the normal Dijkstra initialization which initializes the starting point with zero cost.

  3. Dijkstra is then run as normal.

  4. The search stops when the last of the possible ending stops is about to be Dijkstra-expanded.

  5. The cost of going from the ending stop to B is added to each ending stop.

  6. The ending stop with the least cost is selected.

And no, I don't think that we have an official version of running the algorithm backwards, i.e. against an arrival time.


Re: 'wrappedFromNodes' and 'wrappedToNodes' in Intermodal example

by Jishnu Narayan on 2017-11-21 13:40:16.735

Dear Kai,

Thank you for the reply. Does the multi node Dijkstra also take into account the waiting time at a stop and transfer time while computing the shortest path? Or is it just dependent on the link travel time?

Clone this wiki locally