81 void getSublaneBorders(
int sublane,
double latOffset,
double& rightSide,
double& leftSide)
const;
116 virtual std::string
toString()
const;
163 virtual int addLeader(
const MSVehicle* veh,
double gap,
double latOffset = 0,
int sublane = -1);
176 virtual void clear();
182 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
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
virtual void addLeaders(MSLeaderDistanceInfo &other)
updatd empty sublanes with vehicles and gaps from other
virtual std::string toString() const
print a debugging representation
const std::vector< double > & getDistances() const
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
void patchGaps(double amount)
add given value to all gaps
virtual int addLeader(const MSVehicle *veh, double gap, double latOffset=0, int sublane=-1)
void moveSamePosTo(const MSVehicle *ego, MSLeaderDistanceInfo &other)
std::vector< const MSVehicle * > myVehicles
int myFreeSublanes
the number of free sublanes
int myOffset
an extra offset for shifting the interpretation of sublane borders (default [0,myWidth])
void setSublaneOffset(int offset)
set number of sublanes by which to shift positions
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
virtual int addLeader(const MSVehicle *veh, bool beyond, double latOffset=0.)
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
int getSublaneOffset() const
void getSubLanes(const MSVehicle *veh, double latOffset, int &rightmost, int &leftmost) const
const std::vector< const MSVehicle * > & getVehicles() const
double myWidth
the width of the lane to which this instance applies
Representation of a vehicle in the micro simulation.