Skip to content

Commit

Permalink
tweaking debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Dec 10, 2018
1 parent 20958f5 commit 1f6c3a9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/microsim/MSVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2335,7 +2335,7 @@ MSVehicle::planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVecto
slowedDownForMinor = true;
#ifdef DEBUG_PLAN_MOVE
if (DEBUG_COND) {
std::cout << " slowedDownForMinor maxArrivalSpeed=" << maxArrivalSpeed << " arrivalSpeed=" << arrivalSpeed << "\n";
std::cout << " slowedDownForMinor maxSpeedAtVisDist=" << maxSpeedAtVisibilityDist << " maxArrivalSpeed=" << maxArrivalSpeed << " arrivalSpeed=" << arrivalSpeed << "\n";
}
#endif
}
Expand Down Expand Up @@ -2751,6 +2751,18 @@ MSVehicle::processLinkAproaches(double& vSafe, double& vSafeMin, double& vSafeMi
}
}
// vehicles should decelerate when approaching a minor link
#ifdef DEBUG_EXEC_MOVE
if (DEBUG_COND) {
std::cout << SIMTIME
<< " opened=" << opened
<< " influencerPrio=" << influencerPrio
<< " linkPrio=" << link->havePriority()
<< " lastContMajor=" << link->lastWasContMajor()
<< " isCont=" << link->isCont()
<< " ignoreRed=" << ignoreRedLink
<< "\n";
}
#endif
if (opened && !influencerPrio && !link->havePriority() && !link->lastWasContMajor() && !link->isCont() && !ignoreRedLink) {
double visibilityDistance = link->getFoeVisibilityDistance();
double determinedFoePresence = i->myDistance <= visibilityDistance;
Expand Down

0 comments on commit 1f6c3a9

Please sign in to comment.