Skip to content

Commit

Permalink
corrected paths for 2024 release
Browse files Browse the repository at this point in the history
  • Loading branch information
paulheinr committed Nov 8, 2024
1 parent 0914f46 commit 3eec8b0
Show file tree
Hide file tree
Showing 30 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
</module>
<module name="network">
<param name="inputNetworkFile"
value="./metropole-ruhr-v2.0.network_resolutionHigh-with-pt.xml.gz"/>
value="../../../../../public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v2.0/input/metropole-ruhr-v2024.0.network_resolutionHigh-with-pt.xml.gz"/>
</module>
<module name="plans">
<param name="inputPlansFile"
value="./metropole-ruhr-v2.0-3pct.plans.xml.gz"/>
value="../../../../../public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v2.0/input/metropole-ruhr-v2024.0-3pct.plans.xml.gz"/>
<param name="removingUnnecessaryPlanAttributes" value="true"/>
</module>
<module name="vehicles">
Expand All @@ -34,13 +34,13 @@
</module>
<module name="transit">
<param name="transitScheduleFile"
value="./metropole-ruhr-v2.0-transitSchedule.xml.gz"/>
value="../../../../../public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v2.0/input/metropole-ruhr-v2024.0-transitSchedule.xml.gz"/>
<param name="useTransit" value="true"/>
<param name="vehiclesFile"
value="./metropole-ruhr-v2.0-transitVehicles.xml.gz"/>
value="../../../../../public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v2.0/input/metropole-ruhr-v2024.0-transitVehicles.xml.gz"/>
</module>
<module name="counts">
<param name="inputCountsFile" value="./metropole-ruhr-v2.0.counts.xml.gz"/>
<param name="inputCountsFile" value="../../../../../public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v2.0/input/metropole-ruhr-v2024.0.counts.xml.gz"/>
<param name="countsScaleFactor" value="0.03"/>
</module>
<module name="routing">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public Integer call() throws Exception {
config.plans().setActivityDurationInterpretation(PlansConfigGroup.ActivityDurationInterpretation.tryEndTimeThenDuration);
config.network().setInputFile(configPath.getParent().relativize(networkPath).toString());
config.vehicles().setVehiclesFile(configPath.getParent().relativize(pathVehicleTypes).toString());
config.controler().setOutputDirectory(output.resolve("commercialTraffic_Run" + (int) (sample * 100) + "pct").toString());
config.controler().setLastIteration(0);
config.controler().setOverwriteFileSetting(OutputDirectoryHierarchy.OverwriteFileSetting.deleteDirectoryIfExists);
config.controller().setOutputDirectory(output.resolve("commercialTraffic_Run" + (int) (sample * 100) + "pct").toString());
config.controller().setLastIteration(0);
config.controller().setOverwriteFileSetting(OutputDirectoryHierarchy.OverwriteFileSetting.deleteDirectoryIfExists);
config.transit().setUseTransit(false);
config.transit().setTransitScheduleFile(null);
config.transit().setVehiclesFile(null);
Expand All @@ -67,13 +67,13 @@ public Integer call() throws Exception {
config.qsim().setUsingTravelTimeCheckInTeleportation(true);
config.qsim().setUsePersonIdForMissingVehicleId(false);
//to get no traffic jam for the iteration 0
if (config.controler().getLastIteration() == 0){
if (config.controller().getLastIteration() == 0){
config.qsim().setFlowCapFactor(1.0);
config.qsim().setStorageCapFactor(1.0);
log.warn("Setting flowCapFactor and storageCapFactor to 1.0 because we have only the iteration 0 and we dont want to have traffic jams.");
}
config.strategy().setFractionOfIterationsToDisableInnovation(0.8);
config.planCalcScore().setFractionOfIterationsToStartScoreMSA(0.8);
config.replanning().setFractionOfIterationsToDisableInnovation(0.8);
config.scoring().setFractionOfIterationsToStartScoreMSA(0.8);
config.getModules().remove("intermodalTripFareCompensators");
config.getModules().remove("ptExtensions");
config.getModules().remove("ptIntermodalRoutingModes");
Expand All @@ -83,38 +83,38 @@ public Integer call() throws Exception {
Set<String> modes = Set.of("truck8t", "truck18t", "truck26t", "truck40t");

modes.forEach(mode -> {
PlanCalcScoreConfigGroup.ModeParams thisModeParams = new PlanCalcScoreConfigGroup.ModeParams(mode);
config.planCalcScore().addModeParams(thisModeParams);
ScoringConfigGroup.ModeParams thisModeParams = new ScoringConfigGroup.ModeParams(mode);
config.scoring().addModeParams(thisModeParams);
});
Set<String> qsimModes = new HashSet<>(config.qsim().getMainModes());
config.qsim().setMainModes(Sets.union(qsimModes, modes));

Set<String> networkModes = new HashSet<>(config.plansCalcRoute().getNetworkModes());
config.plansCalcRoute().setNetworkModes(Sets.union(networkModes, modes));

config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("commercial_start").setTypicalDuration(30 * 60));
config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("commercial_end").setTypicalDuration(30 * 60));
config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("service").setTypicalDuration(30 * 60));
config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("pickup").setTypicalDuration(30 * 60));
config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("delivery").setTypicalDuration(30 * 60));
config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("commercial_return").setTypicalDuration(30 * 60));
config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("start").setTypicalDuration(30 * 60));
config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("end").setTypicalDuration(30 * 60));
config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("freight_start").setTypicalDuration(30 * 60));
config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("freight_end").setTypicalDuration(30 * 60));
config.planCalcScore().addActivityParams(new PlanCalcScoreConfigGroup.ActivityParams("freight_return").setTypicalDuration(30 * 60));
Set<String> networkModes = new HashSet<>(config.routing().getNetworkModes());
config.routing().setNetworkModes(Sets.union(networkModes, modes));

config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("commercial_start").setTypicalDuration(30 * 60));
config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("commercial_end").setTypicalDuration(30 * 60));
config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("service").setTypicalDuration(30 * 60));
config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("pickup").setTypicalDuration(30 * 60));
config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("delivery").setTypicalDuration(30 * 60));
config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("commercial_return").setTypicalDuration(30 * 60));
config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("start").setTypicalDuration(30 * 60));
config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("end").setTypicalDuration(30 * 60));
config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("freight_start").setTypicalDuration(30 * 60));
config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("freight_end").setTypicalDuration(30 * 60));
config.scoring().addActivityParams(new ScoringConfigGroup.ActivityParams("freight_return").setTypicalDuration(30 * 60));

for (String subpopulation : List.of("LTL_trips", "commercialPersonTraffic", "commercialPersonTraffic_service", "longDistanceFreight",
"FTL_trip", "FTL_kv_trip", "goodsTraffic")) {
config.strategy().addStrategySettings(
new StrategyConfigGroup.StrategySettings()
config.replanning().addStrategySettings(
new ReplanningConfigGroup.StrategySettings()
.setStrategyName(DefaultPlanStrategiesModule.DefaultSelector.ChangeExpBeta)
.setWeight(0.85)
.setSubpopulation(subpopulation)
);

config.strategy().addStrategySettings(
new StrategyConfigGroup.StrategySettings()
config.replanning().addStrategySettings(
new ReplanningConfigGroup.StrategySettings()
.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.ReRoute)
.setWeight(0.1)
.setSubpopulation(subpopulation)
Expand All @@ -129,4 +129,4 @@ public Integer call() throws Exception {

return 0;
}
}
}

0 comments on commit 3eec8b0

Please sign in to comment.