Skip to content

Commit

Permalink
fix #15385
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Aug 29, 2024
1 parent 7937206 commit cc6c374
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/microsim/devices/MSDevice_Taxi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,14 @@ MSDevice_Taxi::cancelCustomer(const MSTransportable* t) {
myState |= PICKUP; // add state PICKUP
}
}
// we also have to clean reservations from myLastDispatch where the customers arrived in the meantime
for (auto it = myLastDispatch.begin(); it != myLastDispatch.end();) {
if (myCurrentReservations.count(*it) == 0) {
it = myLastDispatch.erase(it);
} else {
++it;
}
}
// if there are reservations left, go on with the dispatch
// in meso, wait for the next dispatch cycle to avoid updating stops in this stage
if (!MSGlobals::gUseMesoSim) {
Expand Down

0 comments on commit cc6c374

Please sign in to comment.