Skip to content

Commit

Permalink
fix #14585
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 23, 2024
1 parent d07018b commit 3331d3e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/microsim/MSBaseVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ MSBaseVehicle::reroute(SUMOTime t, const std::string& info, SUMOAbstractRouter<M
}
}
} else {
std::set<const MSEdge*> jumpEdges;
for (const MSStop& stop : myStops) {
if (stop.pars.jump >= 0) {
jumpEdges.insert(*stop.edge);
}
}
// via takes precedence over stop edges
// there is a consistency check in MSRouteHandler::addStop that warns when a stop edge is not part of the via edges
for (std::vector<std::string>::const_iterator it = myParameter->via.begin(); it != myParameter->via.end(); ++it) {
Expand All @@ -317,6 +323,9 @@ MSBaseVehicle::reroute(SUMOTime t, const std::string& info, SUMOAbstractRouter<M
throw ProcessError(TLF("Vehicle '%' is not allowed on any lane of via edge '%'.", getID(), viaEdge->getID()));
}
stops.push_back(viaEdge);
if (jumpEdges.count(viaEdge) != 0) {
jumps.insert(stops.size());
}
}
}

Expand Down

0 comments on commit 3331d3e

Please sign in to comment.