Skip to content

Commit 8eb8dc5

Browse files
committed
fixing hard-to-reproduce parkingAreaReroute to too-close alternative
1 parent 8c2af1d commit 8eb8dc5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/microsim/trigger/MSStoppingPlaceRerouter.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,7 @@ MSStoppingPlaceRerouter::evaluateDestination(SUMOVehicle& veh, double brakeGap,
467467
WRITE_WARNINGF(TL("Invalid distance computation for vehicle '%' to stopping place '%' at time=%."),
468468
veh.getID(), alternative->getID(), time2string(now));
469469
}
470-
const double endPos = getStoppingPlaceOccupancy(alternative, &veh) == getStoppingPlaceCapacity(alternative)
471-
? alternative->getLastFreePos(veh, veh.getPositionOnLane() + brakeGap)
472-
: alternative->getEndLanePosition();
470+
const double endPos = alternative->getLastFreePos(veh, veh.getPositionOnLane() + brakeGap);
473471
const double distToEnd = stoppingPlaceValues["distanceto"] - toPos + endPos;
474472

475473
if (distToEnd < brakeGap) {

0 commit comments

Comments
 (0)