diff --git a/contribs/drt/src/main/java/org/matsim/contrib/drt/prebooking/PrebookingStopActivity.java b/contribs/drt/src/main/java/org/matsim/contrib/drt/prebooking/PrebookingStopActivity.java index dc8a1ae9346..1e1965d11a6 100644 --- a/contribs/drt/src/main/java/org/matsim/contrib/drt/prebooking/PrebookingStopActivity.java +++ b/contribs/drt/src/main/java/org/matsim/contrib/drt/prebooking/PrebookingStopActivity.java @@ -129,10 +129,10 @@ private boolean updatePickupRequests(double now) { } var enterIterator = enterTimes.entrySet().iterator(); - int availableCapacity = vehicle.getCapacity() - onboard; while (enterIterator.hasNext()) { var entry = enterIterator.next(); + int availableCapacity = vehicle.getCapacity() - onboard; if (entry.getValue() <= now) { int requiredCapacity = pickupRequests.get(entry.getKey()).getPassengerCount();