From 0faa1dc59e387c62c7b64da7c3a787f378d66b9f Mon Sep 17 00:00:00 2001 From: sime94 Date: Thu, 11 Jul 2024 14:31:04 +0200 Subject: [PATCH] make ride alpha configurable through run param for test purposes --- src/main/java/org/matsim/run/LausitzScenario.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/matsim/run/LausitzScenario.java b/src/main/java/org/matsim/run/LausitzScenario.java index d4e42f7..e8ef30b 100644 --- a/src/main/java/org/matsim/run/LausitzScenario.java +++ b/src/main/java/org/matsim/run/LausitzScenario.java @@ -47,6 +47,9 @@ public class LausitzScenario extends MATSimApplication { public static final String VERSION = "1.1"; + @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 private final SampleOptions sample = new SampleOptions( 100, 25, 10, 1); @@ -95,7 +98,7 @@ protected 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); @@ -135,7 +138,7 @@ protected void prepareControler(Controler controler) { controler.addOverridingModule(new AbstractModule() { @Override public void install() { - install(new LausitzPtFareModule()); +// install(new LausitzPtFareModule()); bind(ScoringParametersForPerson.class).to(IncomeDependentUtilityOfMoneyPersonScoringParameters.class).asEagerSingleton();