diff --git a/src/main/java/org/matsim/run/scoring/AdvancedScoringConfigGroup.java b/src/main/java/org/matsim/run/scoring/AdvancedScoringConfigGroup.java index f943a7aa..f86190bd 100644 --- a/src/main/java/org/matsim/run/scoring/AdvancedScoringConfigGroup.java +++ b/src/main/java/org/matsim/run/scoring/AdvancedScoringConfigGroup.java @@ -16,13 +16,18 @@ public final class AdvancedScoringConfigGroup extends ReflectiveConfigGroup { private final List scoringParameters = new ArrayList<>(); + public enum IncomeDependentScoring { + none, + avg_by_personal_income, + } + @Parameter @Comment("The distance groups if marginal utility of distance is adjusted. In meters.") public List distGroups; @Parameter @Comment("Enable income dependent marginal utility of money.") - public boolean incomeDependent = true; + public IncomeDependentScoring incomeDependent = IncomeDependentScoring.avg_by_personal_income; // TODO: maybe option to re-assign variations or use them from attributes diff --git a/src/main/java/org/matsim/run/scoring/IndividualPersonScoringParameters.java b/src/main/java/org/matsim/run/scoring/IndividualPersonScoringParameters.java index 10e9138e..d36cbb37 100644 --- a/src/main/java/org/matsim/run/scoring/IndividualPersonScoringParameters.java +++ b/src/main/java/org/matsim/run/scoring/IndividualPersonScoringParameters.java @@ -135,7 +135,7 @@ static DistanceGroup[] calcDistanceGroups(List dists, DoubleList distUt } private double computeAvgIncome(Population population) { - if (!scoring.incomeDependent) + if (scoring.incomeDependent == AdvancedScoringConfigGroup.IncomeDependentScoring.none) return Double.NaN; log.info("reading income attribute using " + PersonUtils.class + " of all agents and compute global average.\n" +