Skip to content

Commit

Permalink
max drt walk distance 1km
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 committed Sep 23, 2024
1 parent db82714 commit 00d0521
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/org/matsim/run/DrtOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.matsim.core.config.groups.QSimConfigGroup;
import org.matsim.core.config.groups.ScoringConfigGroup;
import org.matsim.core.utils.io.IOUtils;
import org.matsim.run.prepare.PrepareDrtScenarioAgents;
import org.matsim.pt.config.TransitRouterConfigGroup;
import org.matsim.run.prepare.PrepareNetwork;
import org.matsim.run.prepare.PrepareTransitSchedule;
import org.matsim.vehicles.Vehicle;
Expand Down Expand Up @@ -81,6 +81,8 @@ void configureDrtConfig(Config config) {
optimizationConstraintsSet.maxTravelTimeBeta = 1200.;
optimizationConstraintsSet.maxTravelTimeAlpha = 1.5;
optimizationConstraints.addParameterSet(optimizationConstraintsSet);
// set maxwalk distance to transit search radius. Drt is feeder for Pt.
optimizationConstraintsSet.maxWalkDistance = ConfigUtils.addOrGetModule(config, TransitRouterConfigGroup.class).getSearchRadius();
drtConfigGroup.addParameterSet(optimizationConstraints);
drtConfigGroup.addParameterSet(new ExtensiveInsertionSearchParams());
multiModeDrtConfigGroup.addParameterSet(drtConfigGroup);
Expand Down Expand Up @@ -128,8 +130,8 @@ void configureDrtConfig(Config config) {
// walk also needs to be added as access egress mode
SwissRailRaptorConfigGroup.IntermodalAccessEgressParameterSet accessEgressWalkParam = new SwissRailRaptorConfigGroup.IntermodalAccessEgressParameterSet();
accessEgressWalkParam.setMode(TransportMode.walk);
accessEgressWalkParam.setInitialSearchRadius(300);
accessEgressWalkParam.setMaxRadius(300);
accessEgressWalkParam.setInitialSearchRadius(1000);
accessEgressWalkParam.setMaxRadius(1000);
accessEgressWalkParam.setSearchExtensionRadius(0.1);
srrConfig.addIntermodalAccessEgress(accessEgressWalkParam);

Expand Down Expand Up @@ -171,8 +173,6 @@ void configureDrtScenario(Scenario scenario) {

scenario.getVehicles().addVehicle(drtDummy);

PrepareDrtScenarioAgents.convertPtToDrtTrips(scenario.getPopulation(), scenario.getNetwork(), new ShpOptions(drtAreaShp, null, null));

// tag intermodal pt stops for intermodality between pt and drt
if (intermodal == IntermodalityHandling.INTERMODALITY_ACTIVE) {
PrepareTransitSchedule.tagIntermodalStops(scenario.getTransitSchedule(), new ShpOptions(intermodalAreaShp, null, null));
Expand Down

0 comments on commit 00d0521

Please sign in to comment.