From d60200105d5667bccc478857bf8aa4e65eefe87c Mon Sep 17 00:00:00 2001 From: rakow Date: Tue, 17 Sep 2024 15:34:27 +0200 Subject: [PATCH] configure bikes routed on network --- input/v6.4/berlin-v6.4.config.xml | 4 ++-- src/main/java/org/matsim/run/OpenBerlinScenario.java | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/input/v6.4/berlin-v6.4.config.xml b/input/v6.4/berlin-v6.4.config.xml index e89d7da2..85c75b59 100644 --- a/input/v6.4/berlin-v6.4.config.xml +++ b/input/v6.4/berlin-v6.4.config.xml @@ -23,7 +23,7 @@ - + @@ -39,7 +39,7 @@ - + diff --git a/src/main/java/org/matsim/run/OpenBerlinScenario.java b/src/main/java/org/matsim/run/OpenBerlinScenario.java index 6b6bc586..e1a85363 100644 --- a/src/main/java/org/matsim/run/OpenBerlinScenario.java +++ b/src/main/java/org/matsim/run/OpenBerlinScenario.java @@ -15,10 +15,12 @@ import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Controler; import org.matsim.core.replanning.strategies.DefaultPlanStrategiesModule; +import org.matsim.core.router.costcalculators.OnlyTimeDependentTravelDisutilityFactory; import org.matsim.core.router.costcalculators.TravelDisutilityFactory; import org.matsim.core.router.util.TravelTime; import org.matsim.core.scoring.functions.PersonScoringParametersFromPersonAttributes; import org.matsim.core.scoring.functions.ScoringParametersForPerson; +import org.matsim.core.trafficmonitoring.FreeSpeedTravelTime; import org.matsim.run.scoring.AdvancedScoringConfigGroup; import org.matsim.run.scoring.AdvancedScoringModule; import org.matsim.simwrapper.SimWrapperConfigGroup; @@ -142,9 +144,9 @@ public void install() { addTravelTimeBinding("freight").to(Key.get(TravelTime.class, Names.named(TransportMode.truck))); addTravelDisutilityFactoryBinding("freight").to(Key.get(TravelDisutilityFactory.class, Names.named(TransportMode.truck))); - // TODO: bike should have freespeed travel time - addTravelTimeBinding(TransportMode.bike).to(networkTravelTime()); - addTravelDisutilityFactoryBinding(TransportMode.bike).to(Key.get(TravelDisutilityFactory.class, Names.named(TransportMode.bike))); + // Bike should use free speed travel time + addTravelTimeBinding(TransportMode.bike).to(FreeSpeedTravelTime.class); + addTravelDisutilityFactoryBinding(TransportMode.bike).to(OnlyTimeDependentTravelDisutilityFactory.class); } }