Skip to content

Commit

Permalink
fixing missing penalties. refs #14653
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Apr 3, 2024
1 parent 1437dbf commit 346f66b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/microsim/MSEdge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ void MSEdge::recalcCache() {
SUMOTime minPenalty = -1;
for (const MSLane* const l : *myLanes) {
for (const MSLink* const link : l->getLinkCont()) {
if (link->getLane()->isWalkingArea()) {
continue;
}
SUMOTime linkPenalty = link->isTLSControlled() ? link->getMesoTLSPenalty() : (link->havePriority() ? 0 : minorPenalty);
if (minPenalty == -1) {
minPenalty = linkPenalty;
Expand Down
5 changes: 5 additions & 0 deletions src/microsim/MSLane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2494,6 +2494,11 @@ MSLane::isCrossing() const {
return myEdge->isCrossing();
}

bool
MSLane::isWalkingArea() const {
return myEdge->isWalkingArea();
}


MSVehicle*
MSLane::getLastFullVehicle() const {
Expand Down
3 changes: 3 additions & 0 deletions src/microsim/MSLane.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,9 @@ class MSLane : public Named, public Parameterised {
/** Returns whether the lane pertains to a crossing edge*/
bool isCrossing() const;

/** Returns whether the lane pertains to a walkingarea*/
bool isWalkingArea() const;

/// @brief returns the last vehicle for which this lane is responsible or 0
MSVehicle* getLastFullVehicle() const;

Expand Down

0 comments on commit 346f66b

Please sign in to comment.