diff --git a/contribs/drt/src/main/java/org/matsim/contrib/drt/optimizer/rebalancing/plusOne/DrtModePlusOneRebalanceModule.java b/contribs/drt/src/main/java/org/matsim/contrib/drt/optimizer/rebalancing/plusOne/DrtModePlusOneRebalanceModule.java index a83a6035326..13034216fab 100644 --- a/contribs/drt/src/main/java/org/matsim/contrib/drt/optimizer/rebalancing/plusOne/DrtModePlusOneRebalanceModule.java +++ b/contribs/drt/src/main/java/org/matsim/contrib/drt/optimizer/rebalancing/plusOne/DrtModePlusOneRebalanceModule.java @@ -45,22 +45,21 @@ public DrtModePlusOneRebalanceModule(DrtConfigGroup drtCfg) { public void install() { log.info("Plus one rebalancing strategy is now being installed!"); RebalancingParams generalParams = drtCfg.getRebalancingParams().orElseThrow(); - PlusOneRebalancingStrategyParams specificParams = (PlusOneRebalancingStrategyParams) generalParams - .getRebalancingStrategyParams(); + PlusOneRebalancingStrategyParams specificParams = (PlusOneRebalancingStrategyParams)generalParams.getRebalancingStrategyParams(); installQSimModule(new AbstractDvrpModeQSimModule(getMode()) { @Override protected void configureQSim() { bindModal(PlusOneRebalancingStrategy.class).toProvider(modalProvider( getter -> new PlusOneRebalancingStrategy(getMode(), getter.getModal(Network.class), - getter.getModal(LinkBasedRelocationCalculator.class)))) - .asEagerSingleton(); + getter.getModal(LinkBasedRelocationCalculator.class)))).asEagerSingleton(); // binding zone free relocation calculator switch (specificParams.getZoneFreeRelocationCalculatorType()) { case FastHeuristic: bindModal(LinkBasedRelocationCalculator.class).toProvider( - modalProvider(getter -> new FastHeuristicLinkBasedRelocationCalculator())); + modalProvider(getter -> new FastHeuristicLinkBasedRelocationCalculator())) + .asEagerSingleton(); break; default: