Skip to content

Commit

Permalink
Merge branch 'main' into drt-implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 authored Oct 10, 2024
2 parents 44f1472 + 5eff948 commit a7bd495
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

N := lausitz
V := v1.1
V := v2024.2
CRS := EPSG:25832
JAR := matsim-$(N)-*.jar

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<module name="controller">
<param name="lastIteration" value="500"/>
<param name="overwriteFiles" value="failIfDirectoryExists"/>
<param name="runId" value="lausitz-10ct"/>
<param name="runId" value="lausitz-10pct"/>
<param name="outputDirectory" value="./output/output-lausitz-25pct"/>
<param name="writeEventsInterval" value="100"/>
<param name="writePlansInterval" value="100"/>
Expand All @@ -26,28 +26,28 @@

<module name="network">
<param name="inputNetworkFile"
value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v1.1/lausitz-v1.1-network-with-pt.xml.gz"/>
value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v2024.2/lausitz-v2024.2-network-with-pt.xml.gz"/>
<param name="laneDefinitionsFile" value="null"/>
</module>

<module name="plans">
<param name="inputPlansFile"
value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v1.1/lausitz-v1.1-10pct.plans-initial.xml.gz"/>
value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v2024.2/lausitz-v2024.2-10pct.plans-initial.xml.gz"/>
<param name="removingUnnecessaryPlanAttributes" value="true"/>
</module>

<module name="vehicles">
<param name="vehiclesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v1.1/lausitz-v1.1-vehicle-types.xml"/>
<param name="vehiclesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v2024.2/lausitz-v2024.2-vehicle-types.xml"/>
</module>

<module name="transit">
<param name="transitScheduleFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v1.0/lausitz-v1.0-transitSchedule.xml.gz"/>
<param name="vehiclesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v1.0/lausitz-v1.0-transitVehicles.xml.gz"/>
<param name="transitScheduleFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v2024.2/lausitz-v2024.2-transitSchedule.xml.gz"/>
<param name="vehiclesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v2024.2/lausitz-v2024.2-transitVehicles.xml.gz"/>
<param name="useTransit" value="true"/>
</module>

<module name="counts">
<param name="inputCountsFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v1.1/lausitz-v1.1-counts-bast.xml.gz"/>
<param name="inputCountsFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v2024.2/lausitz-v2024.2-counts-bast.xml.gz"/>
</module>

<module name="routing">
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.matsim-scenarios</groupId>
<artifactId>matsim-lausitz</artifactId>
<version>1.1</version>
<version>2024.2</version>

<name>MATSim Lausitz Model</name>
<description>A transport model of the Lausitz region and its surroundings</description>
Expand Down
9 changes: 3 additions & 6 deletions src/main/java/org/matsim/run/scenarios/LausitzScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
})
public class LausitzScenario extends MATSimApplication {

public static final String VERSION = "1.1";
public static final String VERSION = "2024.2";
public static final String FREIGHT = "longDistanceFreight";
private static final String AVERAGE = "average";
public static final String HEAVY_MODE = "truck40t";
Expand All @@ -77,9 +77,6 @@ public class LausitzScenario extends MATSimApplication {
private static final String HBEFA_FILE_COLD_AVERAGE = HBEFA_2020_PATH + "r9230ru2n209r30u2fn0c9rn20n2rujkhkjhoewt84202.enc" ;
private static final String HBEFA_FILE_WARM_AVERAGE = HBEFA_2020_PATH + "7eff8f308633df1b8ac4d06d05180dd0c5fdf577.enc";

@CommandLine.Option(names = "--alpha", description = "alpha for ride, this is just to get a feeling for the parameters dimension, should never be configurable in release.", defaultValue = "2.")
private double alpha;

@CommandLine.Mixin
SampleOptions sample = new SampleOptions( 100, 25, 10, 1);

Expand All @@ -96,7 +93,7 @@ public LausitzScenario(String configPath) {
}

public LausitzScenario() {
super(String.format("input/v1.1/lausitz-v1.1-10pct.config.xml", VERSION, VERSION));
super(String.format("input/v%s/lausitz-v%s-10pct.config.xml", VERSION, VERSION));
}

public LausitzScenario(SampleOptions sample, EmissionAnalysisHandling handling) {
Expand Down Expand Up @@ -142,7 +139,7 @@ public Config prepareConfig(Config config) {
// 2.0 + 1.0 = alpha + 1
// ride cost = alpha * car cost
// ride marg utility of traveling = (alpha + 1) * marg utility travelling car + alpha * beta perf
// double alpha = 2;
double alpha = 2;
rideParams.setMarginalUtilityOfTraveling((alpha + 1) * carParams.getMarginalUtilityOfTraveling() - alpha * config.scoring().getPerforming_utils_hr());
rideParams.setDailyMonetaryConstant(0.);
rideParams.setMonetaryDistanceRate(carParams.getMonetaryDistanceRate() * 2);
Expand Down
2 changes: 1 addition & 1 deletion src/main/python/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def filter_modes(df):
"calib",
ASCCalibrator(modes, initial, target, lr=utils.linear_scheduler(start=0.3, interval=12)),
"matsim-lausitz-1.x-SNAPSHOT-20c8ab3.jar",
"../input/v1.1/lausitz-v1.1-10pct.config.xml",
"../input/v2024.2/lausitz-v2024.2-10pct.config.xml",
args="--25pct",
jvm_args="-Xmx60G -Xmx60G -XX:+AlwaysPreTouch -XX:+UseParallelGC",
transform_persons=filter_persons, transform_trips=filter_modes,
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/matsim/run/RunIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void runScenario() {
assert MATSimApplication.execute(LausitzScenario.class, config,
"--1pct",
"--iterations", "1",
"--config:plans.inputPlansFile", "https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v1.1/lausitz-v1.1-0.1pct.plans-initial.xml.gz",
"--config:plans.inputPlansFile", "https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v2024.2/lausitz-v2024.2-0.1pct.plans-initial.xml.gz",
"--output", utils.getOutputDirectory(),
"--config:controller.overwriteFiles=deleteDirectoryIfExists", "--emissions", "DO_NOT_PERFORM_EMISSIONS_ANALYSIS")
== 0 : "Must return non error code";
Expand Down Expand Up @@ -201,7 +201,7 @@ void runSpeedReductionScenario() {
assert MATSimApplication.execute(LausitzSpeedReductionScenario.class, config,
"--1pct",
"--iterations", "0",
"--config:plans.inputPlansFile", "https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v1.1/lausitz-v1.1-0.1pct.plans-initial.xml.gz",
"--config:plans.inputPlansFile", "https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v2024.2/lausitz-v2024.2-0.1pct.plans-initial.xml.gz",
"--output", utils.getOutputDirectory(),
"--config:controller.overwriteFiles=deleteDirectoryIfExists", "--emissions", "DO_NOT_PERFORM_EMISSIONS_ANALYSIS")
== 0 : "Must return non error code";
Expand Down

0 comments on commit a7bd495

Please sign in to comment.