Skip to content

Commit 7b43642

Browse files
authored
Merge pull request #137 from moia-oss/master
Update MATSim CW 10(2)
2 parents 73477b0 + dc3aa0e commit 7b43642

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contribs/drt/src/main/java/org/matsim/contrib/drt/prebooking/PrebookingManager.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -436,14 +436,14 @@ private void processRejections(double now) {
436436
MobsimAgent agent = internalInterface.getMobsim().getAgents().get(personId);
437437

438438
if(agent != null) {
439-
PlanElement planElement = WithinDayAgentUtils.getCurrentPlanElement(agent);
440-
if (planElement instanceof Activity activity) {
439+
if (WithinDayAgentUtils.getCurrentPlanElement(agent) instanceof Activity activity) {
441440
abortAgent(agent, activity, now);
441+
stuckIterator.remove();
442442
}
443443
} else {
444444
// the agent no longer exists in the mobsim, we assume it is already been handled elsewhere. nkuehnel, march'25
445+
stuckIterator.remove();
445446
}
446-
stuckIterator.remove();
447447
}
448448
}
449449

0 commit comments

Comments
 (0)