Skip to content

Commit

Permalink
working on right-of-way at internal junction refs #4252
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Jun 21, 2021
1 parent 4f83650 commit f0ac0e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/netbuild/NBEdge.cpp
Expand Up @@ -1713,9 +1713,10 @@ NBEdge::buildInnerEdges(const NBNode& n, int noInternalNoSplits, int& linkIndex,
}
const bool rightTurnConflict = NBNode::rightTurnConflict(
this, con.toEdge, con.fromLane, i2, k2.toEdge, k2.fromLane);
const bool indirectTurnConflit = con.indirectLeft && this == i2 && dir2 == LinkDirection::STRAIGHT;
const bool mergeConflict = myTo->mergeConflict(this, con, i2, k2, true);
// compute foe internal lanes
if (foes || rightTurnConflict || oppositeLeftIntersect || mergeConflict) {
if (foes || rightTurnConflict || oppositeLeftIntersect || mergeConflict || indirectTurnConflit) {
foeInternalLinks.push_back(index);
}
// only warn once per pair of intersecting turns
Expand All @@ -1732,7 +1733,7 @@ NBEdge::buildInnerEdges(const NBNode& n, int noInternalNoSplits, int& linkIndex,
}
// compute foe incoming lanes
const bool signalised = hasSignalisedConnectionTo(con.toEdge);
if ((n.forbids(i2, k2.toEdge, this, con.toEdge, signalised) || rightTurnConflict) && (needsCont || dir == LinkDirection::TURN)) {
if ((n.forbids(i2, k2.toEdge, this, con.toEdge, signalised) || rightTurnConflict || indirectTurnConflit) && (needsCont || dir == LinkDirection::TURN)) {
tmpFoeIncomingLanes.insert(i2->getID() + "_" + toString(k2.fromLane));
}
if (bothPrio && oppositeLeftIntersect && getID() < i2->getID()) {
Expand Down

0 comments on commit f0ac0e1

Please sign in to comment.