Skip to content

Commit

Permalink
flag for initialReroute
Browse files Browse the repository at this point in the history
  • Loading branch information
tschlenther committed Nov 24, 2023
1 parent ce85ca3 commit 779246c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/org/matsim/run/RunLeipzigScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public class RunLeipzigScenario extends MATSimApplication {
@CommandLine.Option(names = "--intermodality", defaultValue = "drtAndPtSeparateFromEachOther", description = "Define if drt should be used as access and egress mode for pt.")
private DrtCaseSetup.PtDrtIntermodality ptDrtIntermodality;

@CommandLine.Option(names = "--initial-reroute", defaultValue = "false", description = "Define whether ALL trips should be rerouted prior to the simulation. use for base case calibration only.")
private boolean initialReroute;

public RunLeipzigScenario(@Nullable Config config) {
super(config);
}
Expand Down Expand Up @@ -307,7 +310,12 @@ public void install() {
addControlerListenerBinding().to(ModeChoiceCoverageControlerListener.class);

// Leipzig specific planning strategies
this.addPersonPrepareForSimAlgorithm().to(LeipzigRouterPlanAlgorithm.class);

if(initialReroute){
//re-route prior to simulation
this.addPersonPrepareForSimAlgorithm().to(LeipzigRouterPlanAlgorithm.class);
}

this.addPlanStrategyBinding(LeipzigRoutingStrategyProvider.STRATEGY_NAME).toProvider(LeipzigRoutingStrategyProvider.class);
this.addPlanStrategyBinding(LeipzigSubtourModeChoice.STRATEGY_NAME).toProvider(LeipzigSubtourModeChoice.class);

Expand Down

0 comments on commit 779246c

Please sign in to comment.