|
MATSIM
|

Public Member Functions | |
| SpeedyALT (SpeedyALTData astarData, TravelTime tt, TravelDisutility td) | |
| double | getCost (int nodeIndex) |
| Path | calcLeastCostPath (Node startNode, Node endNode, double startTime, Person person, Vehicle vehicle) |
Private Member Functions | |
| double | getTimeRaw (int nodeIndex) |
| double | getDistance (int nodeIndex) |
| void | setData (int nodeIndex, double cost, double time, double distance) |
| double | estimateMinTravelcostToDestination (int nodeIdx, int destinationIdx) |
| double | estimateMinTravelcostToDestinationForLandmark (int nodeIdx, int destinationIdx, int landmarkIdx) |
| Path | constructPath (int endNodeIndex, double startTime) |
Private Attributes | |
| final SpeedyGraph | graph |
| final SpeedyALTData | astarData |
| final TravelTime | tt |
| final TravelDisutility | td |
| final double [] | data |
| int | currentIteration = Integer.MIN_VALUE |
| final int [] | iterationIds |
| final int [] | comingFrom |
| final int [] | usedLink |
| final SpeedyGraph.LinkIterator | outLI |
| final DAryMinHeap | pq |
Static Private Attributes | |
| static final Logger | LOG = LogManager.getLogger(SpeedyALT.class) |
A very fast implementation of the ALT algorithm (A*-search with Landmarks and Triangle Inequality).
Based on "Computing the Shortest Path: A* Search Meets Graph Theory" by Andrew V. Goldberg and Chris Harrelson, 2005.
This implementation always looks at all landmarks and does not filter them, as performance measurements suggest that selecting and re-selecting landmarks regularly actually results in an overhead compared to just calculate the values for each landmark in each step (using a typical value of 16 landmarks). This might be due to the fact that all values for each landmark are just next to each other in the memory, so when accessing the travelcosts to/from one landmark basically already loads the values of all landmarks in the CPU cache, making the calculation for the remaining landmarks very fast.
This implementation is not thread-safe. In the case of multi-threading, every thread should use a separate instance. (But the used SpeedyALTData is thread-safe and can be shared by multiple instances).
Definition at line 36 of file SpeedyALT.java.
| org.matsim.core.router.speedy.SpeedyALT.SpeedyALT | ( | SpeedyALTData | astarData, |
| TravelTime | tt, | ||
| TravelDisutility | td | ||
| ) |
Definition at line 52 of file SpeedyALT.java.
References org.matsim.core.router.speedy.SpeedyALT.astarData, org.matsim.core.router.speedy.SpeedyGraph.getOutLinkIterator(), org.matsim.core.router.speedy.SpeedyALT.outLI, org.matsim.core.router.speedy.SpeedyALT.td, and org.matsim.core.router.speedy.SpeedyALT.tt.

| double org.matsim.core.router.speedy.SpeedyALT.getCost | ( | int | nodeIndex | ) |
Definition at line 66 of file SpeedyALT.java.
Referenced by org.matsim.core.router.speedy.SpeedyALT.calcLeastCostPath(), and org.matsim.core.router.speedy.SpeedyALT.constructPath().
|
private |
Definition at line 70 of file SpeedyALT.java.
Referenced by org.matsim.core.router.speedy.SpeedyALT.calcLeastCostPath(), and org.matsim.core.router.speedy.SpeedyALT.constructPath().
|
private |
Definition at line 74 of file SpeedyALT.java.
Referenced by org.matsim.core.router.speedy.SpeedyALT.calcLeastCostPath().
|
private |
Definition at line 78 of file SpeedyALT.java.
References org.matsim.core.router.speedy.SpeedyALT.currentIteration.
Referenced by org.matsim.core.router.speedy.SpeedyALT.calcLeastCostPath().
| Path org.matsim.core.router.speedy.SpeedyALT.calcLeastCostPath | ( | Node | startNode, |
| Node | endNode, | ||
| double | startTime, | ||
| Person | person, | ||
| Vehicle | vehicle | ||
| ) |
Implements org.matsim.core.router.util.LeastCostPathCalculator.
Definition at line 87 of file SpeedyALT.java.
References org.matsim.core.router.speedy.SpeedyALT.constructPath(), org.matsim.core.router.speedy.SpeedyALT.estimateMinTravelcostToDestination(), org.matsim.core.router.speedy.SpeedyALT.getCost(), org.matsim.core.router.speedy.SpeedyALT.getDistance(), org.matsim.api.core.v01.Identifiable< T >.getId(), org.matsim.api.core.v01.network.Link.getLength(), org.matsim.core.router.util.TravelDisutility.getLinkTravelDisutility(), org.matsim.core.router.util.TravelTime.getLinkTravelTime(), org.matsim.core.router.speedy.SpeedyALT.getTimeRaw(), org.matsim.core.router.speedy.SpeedyGraph.hasTurnRestrictions, org.matsim.core.router.speedy.SpeedyALT.outLI, and org.matsim.core.router.speedy.SpeedyALT.setData().

|
private |
Definition at line 174 of file SpeedyALT.java.
References org.matsim.core.router.speedy.SpeedyALT.estimateMinTravelcostToDestinationForLandmark().
Referenced by org.matsim.core.router.speedy.SpeedyALT.calcLeastCostPath().

|
private |
Definition at line 194 of file SpeedyALT.java.
Referenced by org.matsim.core.router.speedy.SpeedyALT.estimateMinTravelcostToDestination().
|
private |
Definition at line 204 of file SpeedyALT.java.
References org.matsim.core.router.speedy.SpeedyALT.getCost(), and org.matsim.core.router.speedy.SpeedyALT.getTimeRaw().
Referenced by org.matsim.core.router.speedy.SpeedyALT.calcLeastCostPath().

|
staticprivate |
Definition at line 38 of file SpeedyALT.java.
|
private |
Definition at line 40 of file SpeedyALT.java.
|
private |
Definition at line 41 of file SpeedyALT.java.
Referenced by org.matsim.core.router.speedy.SpeedyALT.SpeedyALT().
|
private |
Definition at line 42 of file SpeedyALT.java.
Referenced by org.matsim.core.router.speedy.SpeedyALT.SpeedyALT().
|
private |
Definition at line 43 of file SpeedyALT.java.
Referenced by org.matsim.core.router.speedy.SpeedyALT.SpeedyALT().
|
private |
Definition at line 44 of file SpeedyALT.java.
|
private |
Definition at line 45 of file SpeedyALT.java.
Referenced by org.matsim.core.router.speedy.SpeedyALT.setData().
|
private |
Definition at line 46 of file SpeedyALT.java.
|
private |
Definition at line 47 of file SpeedyALT.java.
|
private |
Definition at line 48 of file SpeedyALT.java.
|
private |
Definition at line 49 of file SpeedyALT.java.
Referenced by org.matsim.core.router.speedy.SpeedyALT.calcLeastCostPath(), and org.matsim.core.router.speedy.SpeedyALT.SpeedyALT().
|
private |
Definition at line 50 of file SpeedyALT.java.
1.8.13