diff --git a/src/main/java/org/opentripplanner/raptor/RaptorService.java b/src/main/java/org/opentripplanner/raptor/RaptorService.java index d8e7fcd3dcd..70156cbbfbe 100644 --- a/src/main/java/org/opentripplanner/raptor/RaptorService.java +++ b/src/main/java/org/opentripplanner/raptor/RaptorService.java @@ -68,8 +68,8 @@ private RaptorResponse routeUsingStdWorker( RaptorTransitDataProvider transitData, RaptorRequest request ) { - var worker = config.createStdWorker(transitData, request); - var result = worker.route(); + var rangeRaptorRouter = config.createRangeRaptorWithStdWorker(transitData, request); + var result = rangeRaptorRouter.route(); var arrivals = new DefaultStopArrivals(result); return new RaptorResponse<>(result.extractPaths(), arrivals, request, false); } diff --git a/src/main/java/org/opentripplanner/raptor/configure/RaptorConfig.java b/src/main/java/org/opentripplanner/raptor/configure/RaptorConfig.java index 521d69a565e..cc488448304 100644 --- a/src/main/java/org/opentripplanner/raptor/configure/RaptorConfig.java +++ b/src/main/java/org/opentripplanner/raptor/configure/RaptorConfig.java @@ -15,7 +15,7 @@ import org.opentripplanner.raptor.rangeraptor.internalapi.Heuristics; import org.opentripplanner.raptor.rangeraptor.internalapi.PassThroughPointsService; import org.opentripplanner.raptor.rangeraptor.internalapi.RangeRaptorWorker; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerState; import org.opentripplanner.raptor.rangeraptor.internalapi.RoutingStrategy; import org.opentripplanner.raptor.rangeraptor.multicriteria.McStopArrivals; @@ -58,7 +58,7 @@ public SearchContext context(RaptorTransitDataProvider transit, RaptorRequ return SearchContext.of(request, tuningParameters, transit, acceptC2AtDestination).build(); } - public RangeRaptor createStdWorker( + public RangeRaptor createRangeRaptorWithStdWorker( RaptorTransitDataProvider transitData, RaptorRequest request ) { @@ -70,7 +70,7 @@ public RangeRaptor createStdWorker( ); } - public RangeRaptor createMcWorker( + public RangeRaptor createRangeRaptorWithMcWorker( RaptorTransitDataProvider transitData, RaptorRequest request, Heuristics heuristics @@ -97,17 +97,17 @@ public RangeRaptor createMcWorker( return createRangeRaptor(context, worker); } - public RangeRaptor createHeuristicSearch( + public RangeRaptor createRangeRaptorWithHeuristicSearch( RaptorTransitDataProvider transitData, RaptorRequest request ) { - return createStdWorker(transitData, request); + return createRangeRaptorWithStdWorker(transitData, request); } public Heuristics createHeuristic( RaptorTransitDataProvider transitData, RaptorRequest request, - RaptorWorkerResult results + RaptorRouterResult results ) { var context = context(transitData, request); return new StdRangeRaptorConfig<>(context).createHeuristics(results); diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/DefaultRangeRaptorWorker.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/DefaultRangeRaptorWorker.java index 04f741b7c92..7db9e4aac85 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/DefaultRangeRaptorWorker.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/DefaultRangeRaptorWorker.java @@ -9,7 +9,7 @@ import org.opentripplanner.raptor.api.model.RaptorConstants; import org.opentripplanner.raptor.api.model.RaptorTripSchedule; import org.opentripplanner.raptor.rangeraptor.internalapi.RangeRaptorWorker; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerState; import org.opentripplanner.raptor.rangeraptor.internalapi.RoutingStrategy; import org.opentripplanner.raptor.rangeraptor.internalapi.SlackProvider; @@ -110,7 +110,7 @@ public DefaultRangeRaptorWorker( } @Override - public RaptorWorkerResult results() { + public RaptorRouterResult results() { return state.results(); } diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/RangeRaptor.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/RangeRaptor.java index 303ccd1ec19..873767b92a5 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/RangeRaptor.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/RangeRaptor.java @@ -5,7 +5,8 @@ import org.opentripplanner.raptor.api.model.RaptorConstants; import org.opentripplanner.raptor.api.model.RaptorTripSchedule; import org.opentripplanner.raptor.rangeraptor.internalapi.RangeRaptorWorker; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouter; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.rangeraptor.lifecycle.LifeCycleEventPublisher; import org.opentripplanner.raptor.rangeraptor.transit.AccessPaths; import org.opentripplanner.raptor.rangeraptor.transit.RaptorTransitCalculator; @@ -43,7 +44,7 @@ * @param The TripSchedule type defined by the user of the raptor API. */ @SuppressWarnings("Duplicates") -public final class RangeRaptor { +public final class RangeRaptor implements RaptorRouter { private final RangeRaptorWorker worker; @@ -84,13 +85,7 @@ public RangeRaptor( this.lifeCycle = lifeCyclePublisher; } - /** - * For each iteration (minute), calculate the minimum travel time to each transit stop in - * seconds. - *

- * Run the scheduled search, round 0 is the street search. - */ - public RaptorWorkerResult route() { + public RaptorRouterResult route() { timers.route(() -> { int iterationDepartureTime = RaptorConstants.TIME_NOT_SET; lifeCycle.notifyRouteSearchStart(calculator.searchForward()); diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/RangeRaptorWorkerComposite.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/RangeRaptorWorkerComposite.java index 8c02003e016..8d20525da6b 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/RangeRaptorWorkerComposite.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/RangeRaptorWorkerComposite.java @@ -5,7 +5,7 @@ import javax.annotation.Nullable; import org.opentripplanner.raptor.api.model.RaptorTripSchedule; import org.opentripplanner.raptor.rangeraptor.internalapi.RangeRaptorWorker; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.util.composite.CompositeUtil; /** @@ -37,7 +37,7 @@ public static RangeRaptorWorker of( } @Override - public RaptorWorkerResult results() { + public RaptorRouterResult results() { return tail().results(); } diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RangeRaptorWorker.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RangeRaptorWorker.java index 3a911125630..858c0e7124b 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RangeRaptorWorker.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RangeRaptorWorker.java @@ -12,7 +12,7 @@ public interface RangeRaptorWorker { /** * Fetch the result after the search is performed. */ - RaptorWorkerResult results(); + RaptorRouterResult results(); /** * Check if the RangeRaptor should continue with a new round. diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorRouter.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorRouter.java new file mode 100644 index 00000000000..3b5fb711b06 --- /dev/null +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorRouter.java @@ -0,0 +1,17 @@ +package org.opentripplanner.raptor.rangeraptor.internalapi; + +import org.opentripplanner.raptor.api.model.RaptorTripSchedule; + +/** + * Interface for Raptor Router. Allow instrumentation/wrapping the router. This is not + * currently used in the main branch of OTP, but it is used in Entur fork to extend the + * router functionality. + */ +public interface RaptorRouter { + /** + * Perform the routing request and return the result. A range-raptor request will + * iterate over the minutes in the search-window, while a plain raptor search will + * just do one iteration. + */ + RaptorRouterResult route(); +} diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorWorkerResult.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorRouterResult.java similarity index 93% rename from src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorWorkerResult.java rename to src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorRouterResult.java index ce6f7deb673..df073b796ec 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorWorkerResult.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorRouterResult.java @@ -7,7 +7,7 @@ /** * This is the result of a RangeRaptor route call. */ -public interface RaptorWorkerResult { +public interface RaptorRouterResult { /** * Return all paths found. */ diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorWorkerState.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorWorkerState.java index cb73d668450..2add95f9a79 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorWorkerState.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/internalapi/RaptorWorkerState.java @@ -45,5 +45,5 @@ public interface RaptorWorkerState { */ void transferToStops(int fromStop, Iterator transfers); - RaptorWorkerResult results(); + RaptorRouterResult results(); } diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/McRangeRaptorWorkerState.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/McRangeRaptorWorkerState.java index eccb009aeaa..1dcada83419 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/McRangeRaptorWorkerState.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/McRangeRaptorWorkerState.java @@ -6,7 +6,7 @@ import org.opentripplanner.raptor.api.model.RaptorAccessEgress; import org.opentripplanner.raptor.api.model.RaptorTransfer; import org.opentripplanner.raptor.api.model.RaptorTripSchedule; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerState; import org.opentripplanner.raptor.rangeraptor.internalapi.WorkerLifeCycle; import org.opentripplanner.raptor.rangeraptor.multicriteria.arrivals.McStopArrival; @@ -110,9 +110,9 @@ public void transferToStops(int fromStop, Iterator tra } @Override - public RaptorWorkerResult results() { + public RaptorRouterResult results() { arrivals.debugStateInfo(); - return new McRaptorWorkerResult(arrivals, paths); + return new McRaptorRouterResult(arrivals, paths); } Iterable> listStopArrivalsPreviousRound(int stop) { diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/McRaptorWorkerResult.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/McRaptorRouterResult.java similarity index 91% rename from src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/McRaptorWorkerResult.java rename to src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/McRaptorRouterResult.java index a664c89e0bd..2339c2a8df6 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/McRaptorWorkerResult.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/multicriteria/McRaptorRouterResult.java @@ -3,16 +3,16 @@ import java.util.Collection; import org.opentripplanner.raptor.api.model.RaptorTripSchedule; import org.opentripplanner.raptor.api.path.RaptorPath; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.rangeraptor.internalapi.SingleCriteriaStopArrivals; import org.opentripplanner.raptor.rangeraptor.path.DestinationArrivalPaths; -public class McRaptorWorkerResult implements RaptorWorkerResult { +public class McRaptorRouterResult implements RaptorRouterResult { private final McStopArrivals stopArrivals; private final DestinationArrivalPaths paths; - public McRaptorWorkerResult(McStopArrivals arrivals, DestinationArrivalPaths paths) { + public McRaptorRouterResult(McStopArrivals arrivals, DestinationArrivalPaths paths) { stopArrivals = arrivals; this.paths = paths; } diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/StdRangeRaptorWorkerState.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/StdRangeRaptorWorkerState.java index e3aba5c36f9..bcb2ca0f798 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/StdRangeRaptorWorkerState.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/StdRangeRaptorWorkerState.java @@ -5,7 +5,7 @@ import org.opentripplanner.raptor.api.model.RaptorTransfer; import org.opentripplanner.raptor.api.model.RaptorTripSchedule; import org.opentripplanner.raptor.api.model.TransitArrival; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.rangeraptor.standard.besttimes.BestTimes; import org.opentripplanner.raptor.rangeraptor.standard.internalapi.ArrivedAtDestinationCheck; import org.opentripplanner.raptor.rangeraptor.standard.internalapi.BestNumberOfTransfers; @@ -209,8 +209,8 @@ private void transferToStop(int arrivalTimeTransit, int fromStop, RaptorTransfer } @Override - public RaptorWorkerResult results() { - return new StdRaptorWorkerResult<>( + public RaptorRouterResult results() { + return new StdRaptorRouterResult<>( bestTimes, stopArrivalsState::extractPaths, bestNumberOfTransfers::extractBestNumberOfTransfers diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/StdRaptorWorkerResult.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/StdRaptorRouterResult.java similarity index 92% rename from src/main/java/org/opentripplanner/raptor/rangeraptor/standard/StdRaptorWorkerResult.java rename to src/main/java/org/opentripplanner/raptor/rangeraptor/standard/StdRaptorRouterResult.java index 7a6812c9c95..1612234b185 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/StdRaptorWorkerResult.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/StdRaptorRouterResult.java @@ -4,14 +4,14 @@ import java.util.function.Supplier; import org.opentripplanner.raptor.api.model.RaptorTripSchedule; import org.opentripplanner.raptor.api.path.RaptorPath; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.rangeraptor.internalapi.SingleCriteriaStopArrivals; import org.opentripplanner.raptor.rangeraptor.standard.besttimes.BestTimes; /** * Result for Standard Range Raptor route call. */ -public class StdRaptorWorkerResult implements RaptorWorkerResult { +public class StdRaptorRouterResult implements RaptorRouterResult { private final BestTimes bestTimes; private final Supplier>> pathSupplier; @@ -23,7 +23,7 @@ public class StdRaptorWorkerResult implements Rapt */ private Collection> paths = null; - public StdRaptorWorkerResult( + public StdRaptorRouterResult( BestTimes bestTimes, Supplier>> pathSupplier, Supplier bestNumberOfTransfersSupplier diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/configure/StdRangeRaptorConfig.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/configure/StdRangeRaptorConfig.java index efb50a38774..5bd0b7c5077 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/configure/StdRangeRaptorConfig.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/standard/configure/StdRangeRaptorConfig.java @@ -9,7 +9,7 @@ import org.opentripplanner.raptor.rangeraptor.context.SearchContext; import org.opentripplanner.raptor.rangeraptor.internalapi.Heuristics; import org.opentripplanner.raptor.rangeraptor.internalapi.ParetoSetCost; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerState; import org.opentripplanner.raptor.rangeraptor.internalapi.RoutingStrategy; import org.opentripplanner.raptor.rangeraptor.path.DestinationArrivalPaths; @@ -69,7 +69,7 @@ public RoutingStrategy strategy() { return strategy; } - public Heuristics createHeuristics(RaptorWorkerResult results) { + public Heuristics createHeuristics(RaptorRouterResult results) { return oneOf( new HeuristicsAdapter( ctx.nStops(), diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RoundTracker.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RoundTracker.java index f355bc72ebb..4a185db0b43 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RoundTracker.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RoundTracker.java @@ -5,8 +5,8 @@ /** * Round tracker to keep track of round index and when to stop exploring new rounds. *

- * In round 0 the access paths with one leg are added. In round 1 the first transit and transfers is - * added, ... + * In round zero(0), the access paths with one leg are added. In round one(1) the first transit and + * transfers is added, ... */ public class RoundTracker { @@ -30,7 +30,7 @@ public class RoundTracker { * This is default set to the maximum number of rounds limit, but as soon as the destination is * reach the {@link #numberOfAdditionalTransfers} is used to update the limit. *

- * The limit is inclusive, indicating the the last round to process. + * The limit is inclusive, indicating the last round to process. */ private int roundMaxLimit; diff --git a/src/main/java/org/opentripplanner/raptor/service/DefaultStopArrivals.java b/src/main/java/org/opentripplanner/raptor/service/DefaultStopArrivals.java index 2d3e3795cd9..244dca1c81c 100644 --- a/src/main/java/org/opentripplanner/raptor/service/DefaultStopArrivals.java +++ b/src/main/java/org/opentripplanner/raptor/service/DefaultStopArrivals.java @@ -1,7 +1,7 @@ package org.opentripplanner.raptor.service; import org.opentripplanner.raptor.api.response.StopArrivals; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.rangeraptor.internalapi.SingleCriteriaStopArrivals; /** @@ -13,9 +13,9 @@ public class DefaultStopArrivals implements StopArrivals { private SingleCriteriaStopArrivals bestTransitArrivalTime = null; private SingleCriteriaStopArrivals bestNumberOfTransfers = null; - private final RaptorWorkerResult results; + private final RaptorRouterResult results; - public DefaultStopArrivals(RaptorWorkerResult results) { + public DefaultStopArrivals(RaptorRouterResult results) { this.results = results; } diff --git a/src/main/java/org/opentripplanner/raptor/service/HeuristicSearchTask.java b/src/main/java/org/opentripplanner/raptor/service/HeuristicSearchTask.java index cabc03fcf3a..78bb9a646bd 100644 --- a/src/main/java/org/opentripplanner/raptor/service/HeuristicSearchTask.java +++ b/src/main/java/org/opentripplanner/raptor/service/HeuristicSearchTask.java @@ -10,7 +10,7 @@ import org.opentripplanner.raptor.configure.RaptorConfig; import org.opentripplanner.raptor.rangeraptor.RangeRaptor; import org.opentripplanner.raptor.rangeraptor.internalapi.Heuristics; -import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorWorkerResult; +import org.opentripplanner.raptor.rangeraptor.internalapi.RaptorRouterResult; import org.opentripplanner.raptor.spi.RaptorTransitDataProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,7 +36,7 @@ public class HeuristicSearchTask { private RangeRaptor search = null; private RaptorRequest originalRequest; private RaptorRequest heuristicRequest; - private RaptorWorkerResult result = null; + private RaptorRouterResult result = null; public HeuristicSearchTask( RaptorRequest request, @@ -144,7 +144,7 @@ private void createHeuristicSearchIfNotExist(RaptorRequest request) { ); heuristicRequest = builder.build(); - search = config.createHeuristicSearch(transitData, heuristicRequest); + search = config.createRangeRaptorWithHeuristicSearch(transitData, heuristicRequest); } } } diff --git a/src/main/java/org/opentripplanner/raptor/service/RangeRaptorDynamicSearch.java b/src/main/java/org/opentripplanner/raptor/service/RangeRaptorDynamicSearch.java index 922f89db792..5353804f414 100644 --- a/src/main/java/org/opentripplanner/raptor/service/RangeRaptorDynamicSearch.java +++ b/src/main/java/org/opentripplanner/raptor/service/RangeRaptorDynamicSearch.java @@ -129,17 +129,18 @@ private void runHeuristics() { private RaptorResponse createAndRunDynamicRRWorker(RaptorRequest request) { LOG.debug("Main request: {}", request); - RangeRaptor raptorWorker; + RangeRaptor rangeRaptorRouter; // Create worker if (request.profile().is(MULTI_CRITERIA)) { - raptorWorker = config.createMcWorker(transitData, request, getDestinationHeuristics()); + rangeRaptorRouter = + config.createRangeRaptorWithMcWorker(transitData, request, getDestinationHeuristics()); } else { - raptorWorker = config.createStdWorker(transitData, request); + rangeRaptorRouter = config.createRangeRaptorWithStdWorker(transitData, request); } // Route - var result = raptorWorker.route(); + var result = rangeRaptorRouter.route(); // create and return response return new RaptorResponse<>( diff --git a/src/main/java/org/opentripplanner/raptor/service/ViaRangeRaptorDynamicSearch.java b/src/main/java/org/opentripplanner/raptor/service/ViaRangeRaptorDynamicSearch.java index 6731517ffc4..aedbb5cbeef 100644 --- a/src/main/java/org/opentripplanner/raptor/service/ViaRangeRaptorDynamicSearch.java +++ b/src/main/java/org/opentripplanner/raptor/service/ViaRangeRaptorDynamicSearch.java @@ -129,17 +129,18 @@ private void runHeuristics() { private RaptorResponse createAndRunDynamicRRWorker(RaptorRequest request) { LOG.debug("Main request: {}", request); - RangeRaptor raptorWorker; + RangeRaptor rangeRaptorRouter; // Create worker if (request.profile().is(MULTI_CRITERIA)) { - raptorWorker = config.createMcWorker(transitData, request, getDestinationHeuristics()); + rangeRaptorRouter = + config.createRangeRaptorWithMcWorker(transitData, request, getDestinationHeuristics()); } else { - raptorWorker = config.createStdWorker(transitData, request); + rangeRaptorRouter = config.createRangeRaptorWithStdWorker(transitData, request); } // Route - var result = raptorWorker.route(); + var result = rangeRaptorRouter.route(); // create and return response return new RaptorResponse<>(