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

Add outside offset to keep intial modes

parent 326cb793
......@@ -100,22 +100,31 @@ public abstract class BaseUtilityEstimator extends AbstractTripRouterEstimator {
personVariables.homeLocation = new Coord(homeX, homeY);
double outsideOffset = 0.0;
if (trip.getOriginActivity().getType().equals("outside")
|| trip.getDestinationActivity().getType().equals("outside")) {
if (mode.equals(trip.getInitialMode())) {
outsideOffset = 50.0;
}
}
switch (mode) {
case TransportMode.walk:
return estimateWalkTrip(personVariables, trip, routedTrip);
return estimateWalkTrip(personVariables, trip, routedTrip) + outsideOffset;
case TransportMode.bike:
return estimateBikeTrip(personVariables, trip, routedTrip);
return estimateBikeTrip(personVariables, trip, routedTrip) + outsideOffset;
case "prav3":
case "prav4":
case "prav5":
return estimatePrivateAVTrip(personVariables, trip, routedTrip);
return estimatePrivateAVTrip(personVariables, trip, routedTrip) + outsideOffset;
case TransportMode.car:
return estimateCarTrip(personVariables, trip, routedTrip);
return estimateCarTrip(personVariables, trip, routedTrip) + outsideOffset;
case TransportMode.pt:
return estimatePtTrip(personVariables, trip, routedTrip);
return estimatePtTrip(personVariables, trip, routedTrip) + outsideOffset;
case SharedAVModule.AV_POOL:
case SharedAVModule.AV_TAXI:
return estimateSharedAvTrip(personVariables, trip, routedTrip);
return estimateSharedAvTrip(personVariables, trip, routedTrip) + outsideOffset;
case "outside":
return 0.0;
default:
......
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