To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

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

Fix cost elasticity

parent 4cfe724f
......@@ -252,7 +252,7 @@ public abstract class BaseUtilityEstimator extends AbstractTripRouterEstimator {
tripVariables.travelDistance_km = totalTravelDistance / 1000.0;
tripVariables.crowflyDistance_km = CoordUtils.calcEuclideanDistance(trip.getOriginActivity().getCoord(),
trip.getDestinationActivity().getCoord());
trip.getDestinationActivity().getCoord()) * 1e-3;
tripVariables.originHomeDistance_km = CoordUtils.calcEuclideanDistance(personVariables.homeLocation,
trip.getOriginActivity().getCoord()) * 1e-3;
......@@ -322,7 +322,7 @@ public abstract class BaseUtilityEstimator extends AbstractTripRouterEstimator {
tripVariables.travelDistance_km = travelDistance_km;
tripVariables.crowflyDistance_km = CoordUtils.calcEuclideanDistance(trip.getOriginActivity().getCoord(),
trip.getDestinationActivity().getCoord());
trip.getDestinationActivity().getCoord()) * 1e-3;
return estimateCarTrip(trip, personVariables, tripVariables);
}
......
......@@ -11,11 +11,11 @@ public class CostModel {
}
public double calculateCarTravelCost(double distance_km) {
return parameters.carCostPerKm * distance_km;
return parameters.carCostPerKm_CHF * distance_km;
}
public double calculateAvTravelCost(double distance_km) {
return parameters.avCostPerKm * distance_km;
return parameters.avCostPerKm_CHF * distance_km;
}
public double calculatePtTravelCost(PersonVariables personVariables, TripVariablesPt tripVariables) {
......@@ -34,9 +34,13 @@ public class CostModel {
}
}
double fullCost = Math.max(parameters.ptCostMinimum,
parameters.ptCostPerKm * tripVariables.inVehicleDistance_km);
double fullCost = Math.max(parameters.ptCostMinimum_CHF,
parameters.ptCostPerKm_CHF * tripVariables.inVehicleDistance_km);
return personVariables.hasHalbtaxSubscription ? 0.5 * fullCost : fullCost;
if (personVariables.hasHalbtaxSubscription) {
return fullCost * 0.5;
} else {
return fullCost;
}
}
}
package ch.ethz.matsim.projects.astra_2018_002.mode_choice.cost;
public class CostParameters {
public double carCostPerKm = 0.26;
public double avCostPerKm = 0.4;
public double carCostPerKm_CHF = 0.26;
public double avCostPerKm_CHF = 0.4;
public double ptCostPerKm = 0.8;
public double ptCostMinimum = 2.7;
public double ptCostPerKm_CHF = 0.6;
public double ptCostMinimum_CHF = 2.7;
public double ptRegionalRadius_km = 15.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