From 074dab33359265ebaf4ed2899e3c9eb8cf233e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=B6rl?= Date: Mon, 27 May 2024 11:56:09 +0200 Subject: [PATCH] fix logic --- .../matsim/contrib/drt/prebooking/PrebookingStopActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();