SUMO - Simulation of Urban MObility
MSCriticalFollowerDistanceInfo Class Reference

#include <MSLeaderInfo.h>

Inheritance diagram for MSCriticalFollowerDistanceInfo:
Inheritance graph
Collaboration diagram for MSCriticalFollowerDistanceInfo:
Collaboration graph

Public Member Functions

int addFollower (const MSVehicle *veh, const MSVehicle *ego, SUMOReal gap, SUMOReal latOffset=0, int sublane=-1)
 
virtual int addLeader (const MSVehicle *veh, SUMOReal gap, SUMOReal latOffset=0, int sublane=-1)
 
virtual int addLeader (const MSVehicle *veh, bool beyond, SUMOReal latOffset=0)
 
void clear ()
 discard all information More...
 
void getSubLanes (const MSVehicle *veh, SUMOReal 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, SUMOReal 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< SUMORealmyDistances
 
int myFreeSublanes
 the number of free sublanes More...
 
bool myHasVehicles
 
std::vector< SUMORealmyMissingGaps
 
std::vector< const MSVehicle * > myVehicles
 
SUMOReal myWidth
 the width of the lane to which this instance applies More...
 

Detailed Description

Definition at line 171 of file MSLeaderInfo.h.

Constructor & Destructor Documentation

MSCriticalFollowerDistanceInfo::MSCriticalFollowerDistanceInfo ( const MSLane lane,
const MSVehicle ego,
SUMOReal  latOffset 
)

Constructor.

Definition at line 274 of file MSLeaderInfo.cpp.

MSCriticalFollowerDistanceInfo::~MSCriticalFollowerDistanceInfo ( )
virtual

Destructor.

Definition at line 280 of file MSLeaderInfo.cpp.

Member Function Documentation

virtual int MSCriticalFollowerDistanceInfo::addLeader ( const MSVehicle veh,
SUMOReal  gap,
SUMOReal  latOffset = 0,
int  sublane = -1 
)
inlinevirtual

Reimplemented from MSLeaderDistanceInfo.

Definition at line 189 of file MSLeaderInfo.h.

References UNUSED_PARAMETER.

virtual int MSCriticalFollowerDistanceInfo::addLeader ( const MSVehicle veh,
bool  beyond,
SUMOReal  latOffset = 0 
)
inlinevirtual

Reimplemented from MSLeaderDistanceInfo.

Definition at line 197 of file MSLeaderInfo.h.

References MSLeaderInfo::clear(), MSLeaderInfo::toString(), and UNUSED_PARAMETER.

void MSCriticalFollowerDistanceInfo::clear ( )
virtual

discard all information

Reimplemented from MSLeaderDistanceInfo.

Definition at line 342 of file MSLeaderInfo.cpp.

References MSLeaderDistanceInfo::clear(), max, myMissingGaps, and MSLeaderInfo::myVehicles.

bool MSLeaderInfo::hasStoppedVehicle ( ) const
inherited
bool MSLeaderInfo::hasVehicles ( ) const
inlineinherited
int MSLeaderInfo::numFreeSublanes ( ) const
inlineinherited
CLeaderDist MSLeaderDistanceInfo::operator[] ( int  sublane) const
inherited

return the vehicle and its distance for the given sublane

Definition at line 241 of file MSLeaderInfo.cpp.

References MSLeaderDistanceInfo::myDistances, and MSLeaderInfo::myVehicles.

std::string MSCriticalFollowerDistanceInfo::toString ( ) const
virtual

Field Documentation

int MSLeaderInfo::egoLeftMost
protectedinherited
int MSLeaderInfo::egoRightMost
protectedinherited

borders of the ego vehicle for filtering of free sublanes

Definition at line 118 of file MSLeaderInfo.h.

Referenced by addFollower(), MSLeaderInfo::addLeader(), MSLeaderDistanceInfo::addLeader(), MSLeaderInfo::clear(), and MSLeaderInfo::MSLeaderInfo().

std::vector<SUMOReal> MSLeaderDistanceInfo::myDistances
protectedinherited
bool MSLeaderInfo::myHasVehicles
protectedinherited
std::vector<SUMOReal> MSCriticalFollowerDistanceInfo::myMissingGaps
protected

Definition at line 213 of file MSLeaderInfo.h.

Referenced by addFollower(), clear(), and toString().

SUMOReal MSLeaderInfo::myWidth
protectedinherited

the width of the lane to which this instance applies

Definition at line 108 of file MSLeaderInfo.h.

Referenced by MSLeaderInfo::getSubLanes().


The documentation for this class was generated from the following files: