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

Add different VOT for private av

parent eacf3e83
......@@ -236,11 +236,24 @@ public class SwissUtilityEstimator extends BaseUtilityEstimator {
public double estimatePrivateAVTrip(DiscreteModeChoiceTrip trip, PersonVariables personVariables,
TripVariablesPrivateAv tripVariables) {
double utility = 0.0;
double betaTravelTime = 0.0;
utility += parameters.prav.alpha;
switch (tripVariables.automationLevel) {
case LEVEL3:
betaTravelTime = parameters.prav.betaTravelTimeLevel3;
break;
case LEVEL4:
betaTravelTime = parameters.prav.betaTravelTimeLevel4;
break;
case LEVEL5:
betaTravelTime = parameters.prav.betaTravelTimeLevel5;
break;
default:
throw new IllegalStateException();
}
utility += parameters.prav.betaTravelTime //
* tripVariables.travelTime_min;
utility += parameters.prav.alpha;
utility += betaTravelTime * tripVariables.travelTime_min;
utility += parameters.betaCost //
* interaction(tripVariables.crowflyDistance_km, parameters.referenceCrowflyDistance_km,
......
......@@ -164,7 +164,10 @@ public class SwissUtilityParameters {
// VI) Private AV
public class PrivateAVParameters {
public double alpha = 0.0;
public double betaTravelTime = 0.0;
public double betaTravelTimeLevel3 = 0.0;
public double betaTravelTimeLevel4 = 0.0;
public double betaTravelTimeLevel5 = 0.0;
public double constantAccessEgressWalkTime_min = 0.0;
}
......
......@@ -17,6 +17,7 @@ import ch.ethz.matsim.baseline_scenario.transit.routing.EnrichedTransitRoute;
import ch.ethz.matsim.discrete_mode_choice.components.estimators.AbstractTripRouterEstimator;
import ch.ethz.matsim.discrete_mode_choice.model.DiscreteModeChoiceTrip;
import ch.ethz.matsim.discrete_mode_choice.model.trip_based.candidates.TripCandidate;
import ch.ethz.matsim.projects.astra_2018_002.mode_choice.base.TripVariablesPrivateAv.AutomationLevel;
import ch.ethz.matsim.projects.astra_2018_002.mode_choice.cost.CostModel;
import ch.ethz.matsim.projects.astra_2018_002.shared_av.SharedAVModule;
import ch.ethz.matsim.projects.astra_2018_002.shared_av.routing.ExtendedAVRoute;
......@@ -254,13 +255,13 @@ public abstract class BaseUtilityEstimator extends AbstractTripRouterEstimator {
switch (((Leg) elements.get(0)).getMode()) {
case "prav3":
tripVariables.automationLevel = 3;
tripVariables.automationLevel = AutomationLevel.LEVEL3;
break;
case "prav4":
tripVariables.automationLevel = 4;
tripVariables.automationLevel = AutomationLevel.LEVEL4;
break;
case "prav5":
tripVariables.automationLevel = 5;
tripVariables.automationLevel = AutomationLevel.LEVEL5;
break;
default:
new IllegalStateException("Unknown private AV mode given.");
......
package ch.ethz.matsim.projects.astra_2018_002.mode_choice.base;
public class TripVariablesPrivateAv {
public int automationLevel = 0;
public enum AutomationLevel {
LEVEL3, LEVEL4, LEVEL5
}
public AutomationLevel automationLevel;
public double travelTime_min = 0.0;
public double travelCost_CHF = 0.0;
public double travelDistance_km = 0.0;
......
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