Commit a69befe7 authored by Sebastian Hörl's avatar Sebastian Hörl
Browse files

Revert age back to scaling by 10

parent 088af15a
......@@ -38,8 +38,8 @@ public class SwissUtilityEstimator extends BaseUtilityEstimator {
PersonVariables personVariables) {
double utility = 0.0;
utility += socioParameters.betaAge * personVariables.age_20a;
utility += socioParameters.betaAgeSquared * Math.pow(personVariables.age_20a, 2.0);
utility += socioParameters.betaAge * personVariables.age_10a;
utility += socioParameters.betaAgeSquared * Math.pow(personVariables.age_10a, 2.0);
utility += socioParameters.betaIncome * personVariables.income_1000CHF;
utility += socioParameters.betaIncomeSquared * Math.pow(personVariables.income_1000CHF, 2.0);
......
......@@ -44,7 +44,7 @@ public abstract class BaseUtilityEstimator extends AbstractTripRouterEstimator {
List<TripCandidate> previousTrips, List<? extends PlanElement> routedTrip) {
PersonVariables personVariables = new PersonVariables();
personVariables.age_20a = ((double) (Integer) person.getAttributes().getAttribute("age")) / 20.0;
personVariables.age_10a = ((double) (Integer) person.getAttributes().getAttribute("age")) / 10.0;
personVariables.income_1000CHF = (Double) person.getAttributes().getAttribute("householdIncome") * 1e-3;
personVariables.isMale = ((String) person.getAttributes().getAttribute("sex")).equals("m");
personVariables.carAlwaysAvailable = ((String) person.getAttributes().getAttribute("carAvail"))
......
package ch.ethz.matsim.projects.astra_2018_002.mode_choice.base;
public class PersonVariables {
public double age_20a = 0;
public double age_10a = 0;
public double income_1000CHF = 0.0;
public boolean isMale = false;
public boolean carAlwaysAvailable = false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment