Skip to content
This repository has been archived by the owner on Mar 1, 2021. It is now read-only.

Commit

Permalink
Override initCollections since we expect really short paths, fixes #97
Browse files Browse the repository at this point in the history
  • Loading branch information
michaz committed May 27, 2018
1 parent 642cd6e commit fa5d568
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,21 @@ private void computeTransitionProbabilities(TimeStep<GPXExtension, GPXEntry, Pat

RoutingAlgorithm router;
if (ch) {
router = new DijkstraBidirectionCH(queryGraph, new PreparationWeighting(weighting), TraversalMode.NODE_BASED);
router = new DijkstraBidirectionCH(queryGraph, new PreparationWeighting(weighting), TraversalMode.NODE_BASED) {
@Override
protected void initCollections(int size) {
super.initCollections(50);
}
};
((DijkstraBidirectionCH) router).setEdgeFilter(new LevelEdgeFilter((CHGraph) routingGraph));
router.setMaxVisitedNodes(maxVisitedNodes);
} else {
router = new DijkstraBidirectionRef(queryGraph, weighting, TraversalMode.NODE_BASED);
router = new DijkstraBidirectionRef(queryGraph, weighting, TraversalMode.NODE_BASED) {
@Override
protected void initCollections(int size) {
super.initCollections(50);
}
};
router.setMaxVisitedNodes(maxVisitedNodes);
}

Expand Down

0 comments on commit fa5d568

Please sign in to comment.