Skip to content

Commit

Permalink
configure bikes routed on network
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Sep 17, 2024
1 parent 38a0cef commit d602001
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions input/v6.4/berlin-v6.4.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<param name="inputNetworkFile" value="./berlin-v6.4-network-with-pt.xml.gz"/>
</module>
<module name="plans">
<param name="inputPlansFile" value="./berlin-v6.4-10pct.plans.xml.gz"/>
<param name="inputPlansFile" value="./berlin-v6.4-10pct.plans-initial.xml.gz"/>
<param name="removingUnnecessaryPlanAttributes" value="true"/>
</module>
<module name="vehicles">
Expand All @@ -39,7 +39,7 @@
<param name="inputFacilitiesFile" value="./berlin-v6.4-facilities.xml.gz"/>
</module>
<module name="routing">
<param name="networkModes" value="car,truck,freight,ride"/>
<param name="networkModes" value="car,truck,freight,ride,bike"/>
<param name="accessEgressType" value="accessEgressModeToLink"/>
<parameterset type="teleportedModeParameters">
<param name="beelineDistanceFactor" value="1.3"/>
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/org/matsim/run/OpenBerlinScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

}
}
Expand Down

0 comments on commit d602001

Please sign in to comment.