Skip to content

Commit

Permalink
fix #4900
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Dec 10, 2018
1 parent 1f6c3a9 commit 41d66b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/microsim/MSLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ MSLink::MSLink(MSLane* predLane, MSLane* succLane, MSLane* via, LinkDirection di
myGreenFraction(1),
myLateralShift(0),
myWalkingAreaFoe(nullptr),
myHavePedestrianCrossingFoe(false),
myParallelRight(nullptr),
myParallelLeft(nullptr),
myJunction(nullptr) {
Expand Down Expand Up @@ -155,6 +156,7 @@ MSLink::setRequestInformation(int index, bool hasFoes, bool isCont,
}
// compute crossing points
for (std::vector<const MSLane*>::const_iterator it_lane = myFoeLanes.begin(); it_lane != myFoeLanes.end(); ++it_lane) {
myHavePedestrianCrossingFoe = myHavePedestrianCrossingFoe || (*it_lane)->getEdge().isCrossing();
const bool sameTarget = myLane == (*it_lane)->getLinkCont()[0]->getLane();
if (sameTarget && !beforeInternalJunction && !contIntersect(lane, *it_lane)) {
//if (myLane == (*it_lane)->getLinkCont()[0]->getLane()) {
Expand Down Expand Up @@ -716,7 +718,7 @@ MSLink::isCont() const {

bool
MSLink::lastWasContMajor() const {
if (myInternalLane == nullptr || myAmCont) {
if (myInternalLane == nullptr || myAmCont || myHavePedestrianCrossingFoe) {
return false;
} else {
MSLane* pred = myInternalLane->getLogicalPredecessorLane();
Expand Down
3 changes: 3 additions & 0 deletions src/microsim/MSLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,9 @@ class MSLink {
std::vector<const MSLane*> myFoeLanes;
const MSLane* myWalkingAreaFoe;

/// @brief whether on of myFoeLanes is a crossing
bool myHavePedestrianCrossingFoe;

/* @brief Links with the same origin lane and the same destination edge that may
be in conflict for sublane simulation */
std::vector<MSLink*> mySublaneFoeLinks;
Expand Down

0 comments on commit 41d66b0

Please sign in to comment.