SUMO - Simulation of Urban MObility
MSLeaderInfo Class Reference

#include <MSLeaderInfo.h>

Inheritance diagram for MSLeaderInfo:
Inheritance graph
Collaboration diagram for MSLeaderInfo:
Collaboration graph

Public Member Functions

virtual int addLeader (const MSVehicle *veh, bool beyond, SUMOReal latOffset=0)
 
virtual 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
 
 MSLeaderInfo (const MSLane *lane, const MSVehicle *ego=0, SUMOReal latOffset=0)
 Constructor. More...
 
int numFreeSublanes () const
 
int numSublanes () const
 
const MSVehicleoperator[] (int sublane) const
 return the vehicle for the given sublane More...
 
virtual std::string toString () const
 print a debugging representation More...
 
virtual ~MSLeaderInfo ()
 Destructor. More...
 

Protected Attributes

int egoLeftMost
 
int egoRightMost
 borders of the ego vehicle for filtering of free sublanes More...
 
int myFreeSublanes
 the number of free sublanes More...
 
bool myHasVehicles
 
std::vector< const MSVehicle * > myVehicles
 
SUMOReal myWidth
 the width of the lane to which this instance applies More...
 

Detailed Description

Definition at line 57 of file MSLeaderInfo.h.

Constructor & Destructor Documentation

MSLeaderInfo::MSLeaderInfo ( const MSLane lane,
const MSVehicle ego = 0,
SUMOReal  latOffset = 0 
)

Constructor.

Definition at line 53 of file MSLeaderInfo.cpp.

References egoLeftMost, egoRightMost, getSubLanes(), myFreeSublanes, and myVehicles.

MSLeaderInfo::~MSLeaderInfo ( )
virtual

Destructor.

Definition at line 69 of file MSLeaderInfo.cpp.

Member Function Documentation

int MSLeaderInfo::addLeader ( const MSVehicle veh,
bool  beyond,
SUMOReal  latOffset = 0 
)
virtual
void MSLeaderInfo::clear ( )
virtual
bool MSLeaderInfo::hasStoppedVehicle ( ) const

whether a stopped vehicle is leader

Definition at line 166 of file MSLeaderInfo.cpp.

References myHasVehicles, and myVehicles.

Referenced by MSLCM_SL2015::_wantsChangeSublane(), MSLCM_SL2015::checkStrategicChange(), and hasVehicles().

bool MSLeaderInfo::hasVehicles ( ) const
inline
int MSLeaderInfo::numFreeSublanes ( ) const
inline
const MSVehicle * MSLeaderInfo::operator[] ( int  sublane) const

return the vehicle for the given sublane

Definition at line 142 of file MSLeaderInfo.cpp.

References myVehicles.

Referenced by MSLeaderDistanceInfo::addLeader().

Field Documentation

int MSLeaderInfo::egoLeftMost
protected
int MSLeaderInfo::egoRightMost
protected

borders of the ego vehicle for filtering of free sublanes

Definition at line 118 of file MSLeaderInfo.h.

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

bool MSLeaderInfo::myHasVehicles
protected
SUMOReal MSLeaderInfo::myWidth
protected

the width of the lane to which this instance applies

Definition at line 108 of file MSLeaderInfo.h.

Referenced by getSubLanes().


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