Skip to content

Commit

Permalink
fix incomplete linkLeader check during lane changing. refs #14587
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 24, 2024
1 parent 6a89c2a commit 382cda9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/microsim/MSLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,8 @@ MSLink::getLeaderInfo(const MSVehicle* ego, double dist, std::vector<const MSPer
continue;
}
// after entering the conflict area, ignore foe vehicles that are not in the way
if (distToCrossing < -POSITION_EPS && !inTheWay
if ((!MSGlobals::gComputeLC || (ego != nullptr && ego->getLane() == foeLane) || MSGlobals::gSublane)
&& distToCrossing < -POSITION_EPS && !inTheWay
&& (ego == nullptr || !MSGlobals::gComputeLC || distToCrossing < -ego->getVehicleType().getLength())) {
if (gDebugFlag1) {
std::cout << " ego entered conflict area\n";
Expand Down

0 comments on commit 382cda9

Please sign in to comment.