![]() |
SUMO - Simulation of Urban MObility
|
#include <MSLeaderInfo.h>
Public Member Functions | |
int | addFollower (const MSVehicle *veh, const MSVehicle *ego, double gap, double latOffset=0, int sublane=-1) |
virtual int | addLeader (const MSVehicle *veh, double gap, double latOffset=0, int sublane=-1) |
virtual int | addLeader (const MSVehicle *veh, bool beyond, double latOffset=0) |
void | clear () |
discard all information More... | |
void | getSublaneBorders (int sublane, double latOffset, double &rightSide, double &leftSide) const |
void | getSubLanes (const MSVehicle *veh, double latOffset, int &rightmost, int &leftmost) const |
bool | hasStoppedVehicle () const |
whether a stopped vehicle is leader More... | |
bool | hasVehicles () const |
MSCriticalFollowerDistanceInfo (const MSLane *lane, const MSVehicle *ego, double latOffset) | |
Constructor. More... | |
int | numFreeSublanes () const |
int | numSublanes () const |
CLeaderDist | operator[] (int sublane) const |
return the vehicle and its distance for the given sublane More... | |
std::string | toString () const |
print a debugging representation More... | |
virtual | ~MSCriticalFollowerDistanceInfo () |
Destructor. More... | |
Protected Attributes | |
int | egoLeftMost |
int | egoRightMost |
borders of the ego vehicle for filtering of free sublanes More... | |
std::vector< double > | myDistances |
int | myFreeSublanes |
the number of free sublanes More... | |
bool | myHasVehicles |
std::vector< double > | myMissingGaps |
std::vector< const MSVehicle * > | myVehicles |
double | myWidth |
the width of the lane to which this instance applies More... | |
Definition at line 176 of file MSLeaderInfo.h.
MSCriticalFollowerDistanceInfo::MSCriticalFollowerDistanceInfo | ( | const MSLane * | lane, |
const MSVehicle * | ego, | ||
double | latOffset | ||
) |
Constructor.
Definition at line 294 of file MSLeaderInfo.cpp.
|
virtual |
Destructor.
Definition at line 300 of file MSLeaderInfo.cpp.
int MSCriticalFollowerDistanceInfo::addFollower | ( | const MSVehicle * | veh, |
const MSVehicle * | ego, | ||
double | gap, | ||
double | latOffset = 0 , |
||
int | sublane = -1 |
||
) |
Definition at line 304 of file MSLeaderInfo.cpp.
References MSLeaderInfo::egoLeftMost, MSLeaderInfo::egoRightMost, MSVehicle::getCarFollowModel(), MSCFModel::getMaxDecel(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSLeaderInfo::getSubLanes(), MSLeaderDistanceInfo::myDistances, MSLeaderInfo::myFreeSublanes, MSLeaderInfo::myHasVehicles, myMissingGaps, and MSLeaderInfo::myVehicles.
Referenced by MSLane::getFollowersOnConsecutive().
|
inlinevirtual |
Reimplemented from MSLeaderDistanceInfo.
Definition at line 194 of file MSLeaderInfo.h.
References UNUSED_PARAMETER.
|
inlinevirtual |
Reimplemented from MSLeaderDistanceInfo.
Definition at line 202 of file MSLeaderInfo.h.
References MSLeaderInfo::clear(), MSLeaderInfo::toString(), and UNUSED_PARAMETER.
|
virtual |
discard all information
Reimplemented from MSLeaderDistanceInfo.
Definition at line 380 of file MSLeaderInfo.cpp.
References MSLeaderDistanceInfo::clear(), myMissingGaps, and MSLeaderInfo::myVehicles.
|
inherited |
Definition at line 146 of file MSLeaderInfo.cpp.
References MSGlobals::gLateralResolution, MIN2(), MSLeaderInfo::myVehicles, and MSLeaderInfo::myWidth.
Referenced by MSLCM_SL2015::checkBlockingVehicles(), MSLCM_SL2015::commitFollowSpeed(), MSLCM_SL2015::updateCFRelated(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), and MSLCM_SL2015::updateGaps().
|
inherited |
Definition at line 106 of file MSLeaderInfo.cpp.
References DELTA_T, MSVehicle::getActionStepLength(), MSVehicle::getActionStepLengthSecs(), MSVehicle::getLaneChangeModel(), MSVehicle::getLateralPositionOnLane(), MSAbstractLaneChangeModel::getManeuverDist(), MSVehicleType::getMaxSpeedLat(), MSAbstractLaneChangeModel::getSpeedLat(), MSBaseVehicle::getVehicleType(), MSVehicleType::getWidth(), MSGlobals::gLateralResolution, MAX2(), MIN2(), MSLeaderInfo::myVehicles, MSLeaderInfo::myWidth, and NUMERICAL_EPS.
Referenced by MSVehicle::adaptToLeaders(), addFollower(), MSLeaderInfo::addLeader(), MSLeaderDistanceInfo::addLeader(), MSLeaderInfo::MSLeaderInfo(), MSAbstractLaneChangeModel::setFollowerGaps(), MSAbstractLaneChangeModel::setLeaderGaps(), and MSAbstractLaneChangeModel::setOrigLeaderGaps().
|
inherited |
whether a stopped vehicle is leader
Definition at line 179 of file MSLeaderInfo.cpp.
References MSLeaderInfo::myHasVehicles, and MSLeaderInfo::myVehicles.
Referenced by MSLCM_SL2015::_wantsChangeSublane(), MSLCM_SL2015::checkStrategicChange(), and MSLeaderInfo::hasVehicles().
|
inlineinherited |
Definition at line 96 of file MSLeaderInfo.h.
References MSLeaderInfo::hasStoppedVehicle(), MSLeaderInfo::myHasVehicles, and MSLeaderInfo::toString().
Referenced by MSLCM_SL2015::checkStrategicChange(), MSLCM_SL2015::commitFollowSpeed(), MSLane::isInsertionSuccess(), and MSLCM_SL2015::updateGaps().
|
inlineinherited |
Definition at line 92 of file MSLeaderInfo.h.
References MSLeaderInfo::myFreeSublanes.
Referenced by MSLane::getFollowersOnConsecutive(), MSLaneChangerSublane::getLeaders(), MSLane::getLeadersOnConsecutive(), and MSLane::isInsertionSuccess().
|
inlineinherited |
Definition at line 88 of file MSLeaderInfo.h.
References MSLeaderInfo::myVehicles.
Referenced by MSLCM_SL2015::checkBlockingVehicles(), MSLCM_SL2015::commitFollowSpeed(), MSLCM_SL2015::computeSublaneShift(), MSLane::detectCollisions(), MSLaneChangerSublane::getLeaders(), MSLane::getLeadersOnConsecutive(), MSLCM_SL2015::getLongest(), MSLCM_SL2015::getSlowest(), MSEdge::initialize(), MSLane::isInsertionSuccess(), MSLane::safeInsertionSpeed(), MSLCM_SL2015::updateCFRelated(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), and MSLCM_SL2015::updateGaps().
|
inherited |
return the vehicle and its distance for the given sublane
Definition at line 261 of file MSLeaderInfo.cpp.
References MSLeaderDistanceInfo::myDistances, and MSLeaderInfo::myVehicles.
|
virtual |
print a debugging representation
Reimplemented from MSLeaderDistanceInfo.
Definition at line 387 of file MSLeaderInfo.cpp.
References Named::getIDSecure(), MSLeaderDistanceInfo::myDistances, MSLeaderInfo::myFreeSublanes, myMissingGaps, and MSLeaderInfo::myVehicles.
Referenced by MSLane::getFollowersOnConsecutive().
|
protectedinherited |
Definition at line 121 of file MSLeaderInfo.h.
Referenced by addFollower(), MSLeaderInfo::addLeader(), MSLeaderDistanceInfo::addLeader(), MSLeaderInfo::clear(), and MSLeaderInfo::MSLeaderInfo().
|
protectedinherited |
borders of the ego vehicle for filtering of free sublanes
Definition at line 120 of file MSLeaderInfo.h.
Referenced by addFollower(), MSLeaderInfo::addLeader(), MSLeaderDistanceInfo::addLeader(), MSLeaderInfo::clear(), and MSLeaderInfo::MSLeaderInfo().
|
protectedinherited |
Definition at line 168 of file MSLeaderInfo.h.
Referenced by addFollower(), MSLeaderDistanceInfo::addLeader(), MSLeaderDistanceInfo::clear(), MSLeaderDistanceInfo::operator[](), MSLeaderDistanceInfo::toString(), and toString().
|
protectedinherited |
the number of free sublanes
Definition at line 117 of file MSLeaderInfo.h.
Referenced by addFollower(), MSLeaderInfo::addLeader(), MSLeaderDistanceInfo::addLeader(), MSLeaderInfo::clear(), MSLeaderInfo::MSLeaderInfo(), MSLeaderInfo::numFreeSublanes(), MSLeaderInfo::toString(), MSLeaderDistanceInfo::toString(), and toString().
|
protectedinherited |
Definition at line 123 of file MSLeaderInfo.h.
Referenced by addFollower(), MSLeaderInfo::addLeader(), MSLeaderDistanceInfo::addLeader(), MSLeaderInfo::hasStoppedVehicle(), and MSLeaderInfo::hasVehicles().
|
protected |
Definition at line 218 of file MSLeaderInfo.h.
Referenced by addFollower(), clear(), and toString().
|
protectedinherited |
Definition at line 112 of file MSLeaderInfo.h.
Referenced by addFollower(), MSLeaderInfo::addLeader(), MSLeaderDistanceInfo::addLeader(), MSLeaderInfo::clear(), MSLeaderDistanceInfo::clear(), clear(), MSLeaderInfo::getSublaneBorders(), MSLeaderInfo::getSubLanes(), MSLeaderInfo::hasStoppedVehicle(), MSLeaderDistanceInfo::MSLeaderDistanceInfo(), MSLeaderInfo::MSLeaderInfo(), MSLeaderInfo::numSublanes(), MSLeaderInfo::operator[](), MSLeaderDistanceInfo::operator[](), MSLeaderInfo::toString(), MSLeaderDistanceInfo::toString(), and toString().
|
protectedinherited |
the width of the lane to which this instance applies
Definition at line 110 of file MSLeaderInfo.h.
Referenced by MSLeaderInfo::getSublaneBorders(), and MSLeaderInfo::getSubLanes().