Skip to content

Commit

Permalink
skip last stop (again) #15552
Browse files Browse the repository at this point in the history
Signed-off-by: m-kro <m.barthauer@t-online.de>
  • Loading branch information
m-kro committed Oct 10, 2024
1 parent e1e0512 commit b32b0a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/microsim/MSBaseVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ MSBaseVehicle::reroute(SUMOTime t, const std::string& info, SUMOAbstractRouter<M
sourcePos = getNextStop().pars.endPos;
}
// avoid superfluous waypoints for first and last edge
const bool skipFirst = stops.front() == source && (source != getEdge() || sourcePos + getBrakeGap() <= firstPos + NUMERICAL_EPS);
const bool skipFirst = stops.front() == source && (source != getEdge() || (source == sink && sink->getNumSuccessors() == 0 && jumps.size() == 0)
|| sourcePos + getBrakeGap() <= firstPos + NUMERICAL_EPS);
const bool skipLast = (stops.back() == sink
&& myArrivalPos >= lastPos
&& (stops.size() < 2 || stops.back() != stops[stops.size() - 2])
Expand Down

0 comments on commit b32b0a8

Please sign in to comment.