Skip to content

Commit

Permalink
fix #14324
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Feb 14, 2024
1 parent e389b71 commit 731cbe6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/router/ROVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,23 @@ void
ROVehicle::collectJumps(const ConstROEdgeVector& mandatory, std::set<ConstROEdgeVector::const_iterator>& jumpStarts) const {
auto itM = mandatory.begin();
auto itS = getParameter().stops.begin();
while (itM != mandatory.end() && itS != getParameter().stops.end()) {
auto itSEnd = getParameter().stops.end();
while (itM != mandatory.end() && itS != itSEnd) {
bool repeatMandatory = false;
// if we stop twice on the same edge, we must treat this as a repeated
// mandatory edge (even though the edge appears only once in the mandatory vector)
if ((*itM)->getID() == itS->edge) {
if (itS->jump >= 0) {
jumpStarts.insert(itM);
}
itS++;
if (itS != itSEnd && itS->edge == (itS - 1)->edge) {
repeatMandatory = true;
}
}
if (!repeatMandatory) {
itM++;
}
itM++;
}
}

Expand Down

0 comments on commit 731cbe6

Please sign in to comment.