diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1150725..005f03a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: 17 + java-version: 21 architecture: x64 distribution: adopt cache: maven @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: 17 + java-version: 21 architecture: x64 distribution: adopt cache: maven @@ -51,7 +51,7 @@ jobs: strategy: fail-fast: false matrix: - java: [17] + java: [21] steps: - uses: actions/checkout@v3 @@ -80,7 +80,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: 17 + java-version: 21 architecture: x64 distribution: adopt cache: maven diff --git a/README.md b/README.md index 4d32a8b..99d7819 100644 --- a/README.md +++ b/README.md @@ -123,4 +123,4 @@ For more information about MATSim, see here: https://www.matsim.org/ ### Internal Documentation Internal documentation can be found here: -https://docs.google.com/document/d/1igBcrRTFklb7THSU1bNNIyG-pwiYgXBg6WeI-Pf7zj8/edit \ No newline at end of file +https://docs.google.com/document/d/1igBcrRTFklb7THSU1bNNIyG-pwiYgXBg6WeI-Pf7zj8/edit?usp=sharing \ No newline at end of file diff --git a/input/v1.1/lausitz-v1.1-10pct.config.xml b/input/v1.1/lausitz-v1.1-10pct.config.xml index 4d412cb..c3cf71d 100644 --- a/input/v1.1/lausitz-v1.1-10pct.config.xml +++ b/input/v1.1/lausitz-v1.1-10pct.config.xml @@ -192,11 +192,11 @@ - - - - + + + + diff --git a/pom.xml b/pom.xml index dd4f891..f94d4f5 100644 --- a/pom.xml +++ b/pom.xml @@ -12,9 +12,10 @@ - 16.0-PR3172 + 2025.0-PR3302 + 4.0.0 com.github.matsim-scenarios matsim-lausitz @@ -31,7 +32,7 @@ UTF-8 UTF-8 - 17 + 21 diff --git a/src/main/java/org/matsim/run/LausitzScenario.java b/src/main/java/org/matsim/run/LausitzScenario.java index 4fd66cb..9295a5b 100644 --- a/src/main/java/org/matsim/run/LausitzScenario.java +++ b/src/main/java/org/matsim/run/LausitzScenario.java @@ -1,7 +1,6 @@ package org.matsim.run; import com.google.common.collect.Sets; -import org.matsim.analysis.ModeChoiceCoverageControlerListener; import org.matsim.api.core.v01.Scenario; import org.matsim.api.core.v01.TransportMode; import org.matsim.api.core.v01.network.Link; @@ -20,6 +19,7 @@ import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.RoutingConfigGroup; +import org.matsim.core.config.groups.ScoringConfigGroup; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Controler; import org.matsim.core.scoring.functions.ScoringParametersForPerson; @@ -55,6 +55,10 @@ public LausitzScenario(@Nullable Config config) { super(config); } + public LausitzScenario(String configPath) { + super(configPath); + } + public LausitzScenario() { super(String.format("input/v%s/lausitz-v%s-25pct.config.xml", VERSION, VERSION)); } @@ -84,7 +88,18 @@ protected Config prepareConfig(Config config) { simWrapper.sampleSize = sample.getSample(); } -// + +// set ride scoring params dependent from car params + ScoringConfigGroup.ModeParams rideParams = config.scoring().getOrCreateModeParams(TransportMode.ride); + ScoringConfigGroup.ModeParams carParams = config.scoring().getModes().get(TransportMode.car); +// 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; + rideParams.setMarginalUtilityOfTraveling((alpha + 1) * carParams.getMarginalUtilityOfTraveling() - alpha * config.scoring().getPerforming_utils_hr()); + rideParams.setDailyMonetaryConstant(0.); + rideParams.setMonetaryDistanceRate(carParams.getMonetaryDistanceRate() * 2); + config.qsim().setUsingTravelTimeCheckInTeleportation(true); config.qsim().setUsePersonIdForMissingVehicleId(false); config.routing().setAccessEgressType(RoutingConfigGroup.AccessEgressType.accessEgressModeToLink); @@ -123,12 +138,9 @@ public void install() { bind(ScoringParametersForPerson.class).to(IncomeDependentUtilityOfMoneyPersonScoringParameters.class).asEagerSingleton(); -// this is only a "nice to have" analysis to check whether agents had the chance to try out all the modes. -// the analysis is added to ModeStatsModule in matsim-libs PR3285 - addControlerListenerBinding().to(ModeChoiceCoverageControlerListener.class); addTravelTimeBinding(TransportMode.ride).to(networkTravelTime()); addTravelDisutilityFactoryBinding(TransportMode.ride).to(carTravelDisutilityFactoryKey()); - +// we do not need to add SwissRailRaptor explicitely! this is done in core } });