21 #ifndef MSLeaderInfo_h
22 #define MSLeaderInfo_h
48 typedef std::pair<const MSVehicle*, SUMOReal>
CLeaderDist;
102 virtual std::string
toString()
const;
153 virtual void clear();
159 virtual std::string
toString()
const;
std::vector< SUMOReal > myDistances
saves leader/follower vehicles and their distances relative to an ego vehicle
Representation of a vehicle in the micro simulation.
virtual std::string toString() const
print a debugging representation
std::pair< MSVehicle *, SUMOReal > LeaderDist
virtual ~MSCriticalFollowerDistanceInfo()
Destructor.
virtual std::string toString() const
print a debugging representation
int myFreeSublanes
the number of free sublanes
virtual void clear()
discard all information
MSLeaderInfo(const MSLane *lane, const MSVehicle *ego=0, SUMOReal latOffset=0)
Constructor.
std::pair< const MSVehicle *, SUMOReal > CLeaderDist
virtual int addLeader(const MSVehicle *veh, SUMOReal gap, SUMOReal latOffset=0, int sublane=-1)
int egoRightMost
borders of the ego vehicle for filtering of free sublanes
#define UNUSED_PARAMETER(x)
bool hasStoppedVehicle() const
whether a stopped vehicle is leader
CLeaderDist operator[](int sublane) const
return the vehicle and its distance for the given sublane
int numFreeSublanes() const
std::vector< SUMOReal > myMissingGaps
virtual ~MSLeaderInfo()
Destructor.
virtual void clear()
discard all information
const MSVehicle * operator[](int sublane) const
return the vehicle for the given sublane
virtual int addLeader(const MSVehicle *veh, bool beyond, SUMOReal latOffset=0)
virtual int addLeader(const MSVehicle *veh, bool beyond, SUMOReal latOffset=0)
void clear()
discard all information
virtual int addLeader(const MSVehicle *veh, SUMOReal gap, SUMOReal latOffset=0, int sublane=-1)
virtual ~MSLeaderDistanceInfo()
Destructor.
void getSubLanes(const MSVehicle *veh, SUMOReal latOffset, int &rightmost, int &leftmost) const
std::vector< const MSVehicle * > myVehicles
int addFollower(const MSVehicle *veh, const MSVehicle *ego, SUMOReal gap, SUMOReal latOffset=0, int sublane=-1)
MSCriticalFollowerDistanceInfo(const MSLane *lane, const MSVehicle *ego, SUMOReal latOffset)
Constructor.
SUMOReal myWidth
the width of the lane to which this instance applies
std::string toString() const
print a debugging representation
Representation of a lane in the micro simulation.
virtual int addLeader(const MSVehicle *veh, bool beyond, SUMOReal latOffset=0)
MSLeaderDistanceInfo(const MSLane *lane, const MSVehicle *ego, SUMOReal latOffset)
Constructor.