80 void getSublaneBorders(
int sublane,
double latOffset,
double& rightSide,
double& leftSide)
const;
108 virtual std::string
toString()
const;
152 virtual int addLeader(
const MSVehicle* veh,
double gap,
double latOffset = 0,
int sublane = -1);
162 virtual void clear();
168 virtual std::string
toString()
const;
std::pair< MSVehicle *, double > LeaderDist
std::pair< const MSVehicle *, double > CLeaderDist
#define UNUSED_PARAMETER(x)
bool myHaveOppositeLeaders
virtual int addLeader(const MSVehicle *veh, double gap, double latOffset=0, int sublane=-1)
std::vector< double > myMissingGaps
MSCriticalFollowerDistanceInfo(const MSLane *lane, const MSVehicle *ego, double latOffset, bool haveOppositeLeaders=false)
Constructor.
virtual ~MSCriticalFollowerDistanceInfo()
Destructor.
virtual int addLeader(const MSVehicle *veh, bool beyond, double latOffset=0)
std::string toString() const
print a debugging representation
void clear()
discard all information
int addFollower(const MSVehicle *veh, const MSVehicle *ego, double gap, double latOffset=0, int sublane=-1)
Representation of a lane in the micro simulation.
saves leader/follower vehicles and their distances relative to an ego vehicle
const std::vector< double > & getDistances() const
virtual std::string toString() const
print a debugging representation
CLeaderDist getClosest() const
return vehicle with the smalles gap
virtual ~MSLeaderDistanceInfo()
Destructor.
virtual int addLeader(const MSVehicle *veh, bool beyond, double latOffset=0)
CLeaderDist operator[](int sublane) const
return the vehicle and its distance for the given sublane
virtual void clear()
discard all information
std::vector< double > myDistances
void fixOppositeGaps(bool isFollower)
subtract vehicle length from all gaps if the leader vehicle is driving in the opposite direction
virtual int addLeader(const MSVehicle *veh, double gap, double latOffset=0, int sublane=-1)
MSLeaderDistanceInfo(const MSLane *lane, const MSVehicle *ego, double latOffset)
Constructor.
virtual int addLeader(const MSVehicle *veh, bool beyond, double latOffset=0)
std::vector< const MSVehicle * > myVehicles
int myFreeSublanes
the number of free sublanes
bool hasStoppedVehicle() const
whether a stopped vehicle is leader
void removeOpposite(const MSLane *lane)
remove vehicles that are driving in the opposite direction (fully or partially) on the given lane
int egoRightMost
borders of the ego vehicle for filtering of free sublanes
int numFreeSublanes() const
void getSublaneBorders(int sublane, double latOffset, double &rightSide, double &leftSide) const
MSLeaderInfo(const MSLane *lane, const MSVehicle *ego=0, double latOffset=0)
Constructor.
virtual std::string toString() const
print a debugging representation
virtual void clear()
discard all information
virtual ~MSLeaderInfo()
Destructor.
const MSVehicle * operator[](int sublane) const
return the vehicle for the given sublane
void getSubLanes(const MSVehicle *veh, double latOffset, int &rightmost, int &leftmost) const
double myWidth
the width of the lane to which this instance applies
const std::vector< const MSVehicle * > & getVehicles() const
Representation of a vehicle in the micro simulation.