Skip to content

Commit

Permalink
now storing link permissions. refs #14692, groundwork for #14604
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Apr 10, 2024
1 parent 37c72b3 commit f83b76d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/microsim/MSLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ MSLink::MSLink(MSLane* predLane, MSLane* succLane, MSLane* via, LinkDirection di
myParallelLeft(nullptr),
myAmIndirect(indirect),
myRadius(std::numeric_limits<double>::max()),
myPermissions(myLaneBefore->getPermissions() & myLane->getPermissions() & (via == nullptr ? SVCAll : via->getPermissions())),
myJunction(nullptr) {

if (MSGlobals::gLateralResolution > 0) {
Expand Down
8 changes: 8 additions & 0 deletions src/microsim/MSLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,11 @@ class MSLink {
return myFoeLinks;
}

/// @brief who may use this link
SVCPermissions getPermissions() const {
return myPermissions;
}

/// @brief initialize parallel links (to be called after all links are loaded)
void initParallelLinks();

Expand Down Expand Up @@ -835,6 +840,9 @@ class MSLink {
/// @brief the turning radius for this link or doublemax for straight links
double myRadius;

/// @brief who may drive on this link
SVCPermissions myPermissions;

/// @brief the junction to which this link belongs
MSJunction* myJunction;

Expand Down

0 comments on commit f83b76d

Please sign in to comment.