From 20821b21b12f7cdaa5639c7b4881119b316b127a Mon Sep 17 00:00:00 2001 From: sime94 Date: Thu, 10 Oct 2024 14:48:20 +0200 Subject: [PATCH 1/3] re-name v1.1 to v2024.2 --- Makefile | 2 +- .../lausitz-v2024.2-10pct.config.xml} | 10 +++++----- .../vvo_tarifzone20_hoyerswerda_utm32n.dbf | Bin .../vvo_tarifzone20_hoyerswerda_utm32n.prj | 0 .../vvo_tarifzone20_hoyerswerda_utm32n.shp | Bin .../vvo_tarifzone20_hoyerswerda_utm32n.shx | Bin pom.xml | 2 +- .../org/matsim/run/scenarios/LausitzScenario.java | 4 ++-- src/main/python/calibrate.py | 2 +- .../java/org/matsim/run/RunIntegrationTest.java | 6 +++--- 10 files changed, 13 insertions(+), 13 deletions(-) rename input/{v1.1/lausitz-v1.1-10pct.config.xml => v2024.2/lausitz-v2024.2-10pct.config.xml} (96%) rename input/{v1.1 => v2024.2}/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.dbf (100%) rename input/{v1.1 => v2024.2}/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.prj (100%) rename input/{v1.1 => v2024.2}/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shp (100%) rename input/{v1.1 => v2024.2}/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shx (100%) diff --git a/Makefile b/Makefile index d1adee5..98eda83 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ N := lausitz -V := v1.1 +V := v2024.2 CRS := EPSG:25832 JAR := matsim-$(N)-*.jar diff --git a/input/v1.1/lausitz-v1.1-10pct.config.xml b/input/v2024.2/lausitz-v2024.2-10pct.config.xml similarity index 96% rename from input/v1.1/lausitz-v1.1-10pct.config.xml rename to input/v2024.2/lausitz-v2024.2-10pct.config.xml index e8d5b20..6ecc9aa 100644 --- a/input/v1.1/lausitz-v1.1-10pct.config.xml +++ b/input/v2024.2/lausitz-v2024.2-10pct.config.xml @@ -10,7 +10,7 @@ - + @@ -26,18 +26,18 @@ + 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"/> + 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"/> - + @@ -47,7 +47,7 @@ - + diff --git a/input/v1.1/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.dbf b/input/v2024.2/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.dbf similarity index 100% rename from input/v1.1/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.dbf rename to input/v2024.2/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.dbf diff --git a/input/v1.1/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.prj b/input/v2024.2/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.prj similarity index 100% rename from input/v1.1/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.prj rename to input/v2024.2/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.prj diff --git a/input/v1.1/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shp b/input/v2024.2/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shp similarity index 100% rename from input/v1.1/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shp rename to input/v2024.2/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shp diff --git a/input/v1.1/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shx b/input/v2024.2/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shx similarity index 100% rename from input/v1.1/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shx rename to input/v2024.2/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shx diff --git a/pom.xml b/pom.xml index d39cda4..8aba850 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 4.0.0 com.github.matsim-scenarios matsim-lausitz - 1.1 + 2024.2 MATSim Lausitz Model A transport model of the Lausitz region and its surroundings diff --git a/src/main/java/org/matsim/run/scenarios/LausitzScenario.java b/src/main/java/org/matsim/run/scenarios/LausitzScenario.java index d082bb2..e59ed54 100644 --- a/src/main/java/org/matsim/run/scenarios/LausitzScenario.java +++ b/src/main/java/org/matsim/run/scenarios/LausitzScenario.java @@ -61,7 +61,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"; @@ -94,7 +94,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) { diff --git a/src/main/python/calibrate.py b/src/main/python/calibrate.py index 1add17e..038de80 100644 --- a/src/main/python/calibrate.py +++ b/src/main/python/calibrate.py @@ -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, diff --git a/src/test/java/org/matsim/run/RunIntegrationTest.java b/src/test/java/org/matsim/run/RunIntegrationTest.java index 9c08cbf..e7d0982 100644 --- a/src/test/java/org/matsim/run/RunIntegrationTest.java +++ b/src/test/java/org/matsim/run/RunIntegrationTest.java @@ -68,7 +68,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"; @@ -85,7 +85,7 @@ void runScenarioIncludingDrt() { assert MATSimApplication.execute(RunLausitzDrtScenario.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-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-1pct.plans-initial.xml.gz", "--output", utils.getOutputDirectory(), "--config:controller.overwriteFiles=deleteDirectoryIfExists", "--emissions", "DO_NOT_PERFORM_EMISSIONS_ANALYSIS") == 0 : "Must return non error code"; @@ -146,7 +146,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"; From 3da880d63e211259f3fd38bb3f2b1146df4e7ee1 Mon Sep 17 00:00:00 2001 From: sime94 Date: Thu, 10 Oct 2024 14:51:18 +0200 Subject: [PATCH 2/3] do not use v1.0 input --- input/v2024.2/lausitz-v2024.2-10pct.config.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input/v2024.2/lausitz-v2024.2-10pct.config.xml b/input/v2024.2/lausitz-v2024.2-10pct.config.xml index 6ecc9aa..e23a7e1 100644 --- a/input/v2024.2/lausitz-v2024.2-10pct.config.xml +++ b/input/v2024.2/lausitz-v2024.2-10pct.config.xml @@ -41,8 +41,8 @@ - - + + From 5eff948ebf1d36fe601a96df80f97443ed01de43 Mon Sep 17 00:00:00 2001 From: sime94 Date: Thu, 10 Oct 2024 15:51:06 +0200 Subject: [PATCH 3/3] remove configurable ride alpha param --- src/main/java/org/matsim/run/scenarios/LausitzScenario.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/matsim/run/scenarios/LausitzScenario.java b/src/main/java/org/matsim/run/scenarios/LausitzScenario.java index e59ed54..e4951c6 100644 --- a/src/main/java/org/matsim/run/scenarios/LausitzScenario.java +++ b/src/main/java/org/matsim/run/scenarios/LausitzScenario.java @@ -75,9 +75,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); @@ -140,7 +137,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);