From 0282b8a11d18a9994baae47431588c32a2bd01b8 Mon Sep 17 00:00:00 2001 From: nkuehnel Date: Thu, 27 Jun 2024 13:19:57 +0200 Subject: [PATCH] add router binding for complex request unscheduling --- .../contrib/drt/prebooking/PrebookingModeQSimModule.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contribs/drt/src/main/java/org/matsim/contrib/drt/prebooking/PrebookingModeQSimModule.java b/contribs/drt/src/main/java/org/matsim/contrib/drt/prebooking/PrebookingModeQSimModule.java index badbb8624f5..e1ec52ac877 100644 --- a/contribs/drt/src/main/java/org/matsim/contrib/drt/prebooking/PrebookingModeQSimModule.java +++ b/contribs/drt/src/main/java/org/matsim/contrib/drt/prebooking/PrebookingModeQSimModule.java @@ -22,7 +22,9 @@ import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.mobsim.framework.MobsimTimer; import org.matsim.core.mobsim.qsim.QSim; +import org.matsim.core.router.speedy.SpeedyALTFactory; import org.matsim.core.router.util.LeastCostPathCalculator; +import org.matsim.core.router.util.TravelDisutility; import org.matsim.core.router.util.TravelTime; public class PrebookingModeQSimModule extends AbstractDvrpModeQSimModule { @@ -97,6 +99,10 @@ protected void configureQSim() { bindModal(RequestUnscheduler.class).to(modalKey(SimpleRequestUnscheduler.class)); break; case Routing: + bindModal(LeastCostPathCalculator.class).toProvider(modalProvider(getter -> + new SpeedyALTFactory().createPathCalculator(getter.getModal(Network.class), + getter.getModal(TravelDisutility.class), getter.getModal(TravelTime.class) + ))); bindModal(RequestUnscheduler.class).to(modalKey(ComplexRequestUnscheduler.class)); break; default: