diff --git a/contribs/vsp/src/main/java/playground/vsp/simpleParkingCostHandler/ParkingCostHandler.java b/contribs/vsp/src/main/java/playground/vsp/simpleParkingCostHandler/ParkingCostHandler.java index c05dadf428e..a32d1f761eb 100644 --- a/contribs/vsp/src/main/java/playground/vsp/simpleParkingCostHandler/ParkingCostHandler.java +++ b/contribs/vsp/src/main/java/playground/vsp/simpleParkingCostHandler/ParkingCostHandler.java @@ -52,7 +52,6 @@ final class ParkingCostHandler implements TransitDriverStartsEventHandler, Activ private final Map, Double> personId2lastLeaveVehicleTime = new HashMap<>(); private final Map, String> personId2previousActivity = new HashMap<>(); private final Map, Id> personId2relevantModeLinkId = new HashMap<>(); - private final Map, Id> personId2homeLinkId = new HashMap<>(); private final Set> ptDrivers = new HashSet<>(); private final Set> hasAlreadyPaidDailyResidentialParkingCosts = new HashSet<>(); @@ -105,9 +104,10 @@ public void handleEvent(PersonDepartureEvent event) { @Override public void handleEvent(PersonLeavesVehicleEvent event) { - if (!ptDrivers.contains(event.getPersonId())) { - personId2lastLeaveVehicleTime.put(event.getPersonId(), event.getTime()); + if (ptDrivers.contains(event.getPersonId())) { + return; } + personId2lastLeaveVehicleTime.put(event.getPersonId(), event.getTime()); } @Override