 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
17 #ifndef MSLeaderInfo_h
18 #define MSLeaderInfo_h
82 void getSublaneBorders(
int sublane,
double latOffset,
double& rightSide,
double& leftSide)
const;
107 virtual std::string
toString()
const;
151 virtual int addLeader(
const MSVehicle* veh,
double gap,
double latOffset = 0,
int sublane = -1);
161 virtual void clear();
167 virtual std::string
toString()
const;
void getSublaneBorders(int sublane, double latOffset, double &rightSide, double &leftSide) const
#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
virtual ~MSCriticalFollowerDistanceInfo()
Destructor.
std::pair< MSVehicle *, double > LeaderDist
void clear()
discard all information
Representation of a lane in the micro simulation.
saves leader/follower vehicles and their distances relative to an ego vehicle
MSLeaderInfo(const MSLane *lane, const MSVehicle *ego=0, double latOffset=0)
Constructor.
int myFreeSublanes
the number of free sublanes
int numFreeSublanes() const
const std::vector< double > & getDistances() const
virtual ~MSLeaderInfo()
Destructor.
virtual int addLeader(const MSVehicle *veh, double gap, double latOffset=0, int sublane=-1)
double myWidth
the width of the lane to which this instance applies
virtual int addLeader(const MSVehicle *veh, bool beyond, double latOffset=0)
int egoRightMost
borders of the ego vehicle for filtering of free sublanes
void getSubLanes(const MSVehicle *veh, double latOffset, int &rightmost, int &leftmost) const
std::vector< const MSVehicle * > myVehicles
virtual void clear()
discard all information
MSCriticalFollowerDistanceInfo(const MSLane *lane, const MSVehicle *ego, double latOffset)
Constructor.
virtual std::string toString() const
print a debugging representation
virtual ~MSLeaderDistanceInfo()
Destructor.
const std::vector< const MSVehicle * > & getVehicles() const
const MSVehicle * operator[](int sublane) const
return the vehicle for the given sublane
std::string toString() const
print a debugging representation
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)
virtual std::string toString() const
print a debugging representation
virtual int addLeader(const MSVehicle *veh, bool beyond, double latOffset=0)
std::vector< double > myMissingGaps
std::vector< double > myDistances
std::pair< const MSVehicle *, double > CLeaderDist
virtual void clear()
discard all information
MSLeaderDistanceInfo(const MSLane *lane, const MSVehicle *ego, double latOffset)
Constructor.
Representation of a vehicle in the micro simulation.