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

Add delay to bike and walk

parent 742ff4b6
......@@ -319,6 +319,11 @@ public class SwissUtilityEstimator extends BaseUtilityEstimator {
utility += estimatePurpose(parameters.walk.purpose, trip);
utility += estimateRegion(parameters.walk.region, personVariables);
utility += estimateMunicipalityType(parameters.walk.municipalityType, personVariables);
utility += parameters.betaDelay
* interaction(tripVariables.travelDistance_km, parameters.referenceDistance_km,
parameters.lambdaDelayDistance) //
* tripVariables.delay_min;
return utility;
}
......@@ -341,6 +346,11 @@ public class SwissUtilityEstimator extends BaseUtilityEstimator {
// From Zurich model
utility += parameters.bike.betaAgeOver18 * personVariables.age_over18a;
utility += parameters.betaDelay
* interaction(tripVariables.travelDistance_km, parameters.referenceDistance_km,
parameters.lambdaDelayDistance) //
* tripVariables.delay_min;
return utility;
}
......
......@@ -356,6 +356,7 @@ public abstract class BaseUtilityEstimator extends AbstractTripRouterEstimator {
tripVariables.travelTime_min = leg.getTravelTime() / 60.0;
tripVariables.travelDistance_km = leg.getRoute().getDistance() / 1000.0;
tripVariables.delay_min = calculateDelay(trip, leg.getTravelTime()) / 60.0;
return estimateWalkTrip(trip, personVariables, tripVariables);
}
......@@ -370,6 +371,7 @@ public abstract class BaseUtilityEstimator extends AbstractTripRouterEstimator {
tripVariables.travelTime_min = leg.getTravelTime() / 60.0;
tripVariables.travelDistance_km = leg.getRoute().getDistance() / 1000.0;
tripVariables.delay_min = calculateDelay(trip, leg.getTravelTime()) / 60.0;
return estimateBikeTrip(trip, personVariables, tripVariables);
}
......
......@@ -3,4 +3,5 @@ package ch.ethz.matsim.projects.astra_2018_002.mode_choice.base;
public class TripVariablesBike {
public double travelTime_min = 0.0;
public double travelDistance_km = 0.0;
public double delay_min = 0.0;
}
......@@ -3,4 +3,5 @@ package ch.ethz.matsim.projects.astra_2018_002.mode_choice.base;
public class TripVariablesWalk {
public double travelTime_min = 0.0;
public double travelDistance_km = 0.0;
public double delay_min = 0.0;
}
Markdown is supported
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