diff --git a/input/v6.1/berlin-v6.1.drt-config.xml b/input/v6.1/berlin-v6.1.drt-config.xml index 9a54feaf..3d6083f8 100644 --- a/input/v6.1/berlin-v6.1.drt-config.xml +++ b/input/v6.1/berlin-v6.1.drt-config.xml @@ -46,11 +46,11 @@ - + - + diff --git a/src/main/java/org/matsim/run/OpenBerlinDrtScenario.java b/src/main/java/org/matsim/run/OpenBerlinDrtScenario.java index 4c4d09eb..24e9f5b6 100644 --- a/src/main/java/org/matsim/run/OpenBerlinDrtScenario.java +++ b/src/main/java/org/matsim/run/OpenBerlinDrtScenario.java @@ -118,13 +118,13 @@ protected Config prepareConfig(Config config) { MultiModeDrtConfigGroup multiModeDrtCfg = MultiModeDrtConfigGroup.get(config); DrtConfigs.adjustMultiModeDrtConfig(multiModeDrtCfg, config.scoring(), config.routing()); - Set modes = new HashSet<>(); + Set drtModes = new HashSet<>(); ScoringConfigGroup.ModeParams ptParams = config.scoring().getModes().get(TransportMode.pt); IntermodalTripFareCompensatorsConfigGroup compensatorsConfig = ConfigUtils.addOrGetModule(config, IntermodalTripFareCompensatorsConfigGroup.class); for (DrtConfigGroup drtCfg : multiModeDrtCfg.getModalElements()) { - modes.add(drtCfg.getMode()); + drtModes.add(drtCfg.getMode()); //copy all scoring params from pt ScoringConfigGroup.ModeParams modeParams = new ScoringConfigGroup.ModeParams(drtCfg.getMode()); @@ -145,14 +145,14 @@ protected Config prepareConfig(Config config) { drtCompensationCfg.setCompensationMoneyPerDay(ptParams.getDailyMonetaryConstant()); drtCompensationCfg.setNonPtModes(ImmutableSet .builder() - .addAll(modes) + .addAll(drtModes) .build()); compensatorsConfig.addParameterSet(drtCompensationCfg); //include drt in mode-choice and add mode params. //by using a Set, it should be assured that they aren't included twice. - modes.addAll(Arrays.asList(config.subtourModeChoice().getModes())); - config.subtourModeChoice().setModes(modes.toArray(String[]::new)); + drtModes.addAll(Arrays.asList(config.subtourModeChoice().getModes())); + config.subtourModeChoice().setModes(drtModes.toArray(String[]::new)); //Here (or when extending this class), you can configure the dvrp and the drt config groups. //Of course you can configure on the xml (config) level, alternatively.