24 #ifndef MSLCM_DK2008_h 25 #define MSLCM_DK2008_h 76 const std::pair<MSVehicle*, double>& leader,
77 const std::pair<MSVehicle*, double>& neighLead,
78 const std::pair<MSVehicle*, double>& neighFollow,
80 const std::vector<MSVehicle::LaneQ>& preb,
94 virtual double patchSpeed(
const double min,
const double wanted,
const double max,
108 const std::pair<MSVehicle*, double>& leader,
109 const std::pair<MSVehicle*, double>& neighLead,
110 const std::pair<MSVehicle*, double>& neighFollow,
112 const std::vector<MSVehicle::LaneQ>& preb,
121 const std::pair<MSVehicle*, double>& leader,
122 const std::pair<MSVehicle*, double>& neighLead,
123 const std::pair<MSVehicle*, double>& neighFollow,
125 const std::vector<MSVehicle::LaneQ>& preb,
130 int& blocked,
int dir,
131 const std::pair<MSVehicle*, double>& neighLead,
132 const std::pair<MSVehicle*, double>& neighFollow);
147 return dist / (
abs(laneOffset)) < lookForwardDist;
150 return dist /
abs(laneOffset) > lookForwardDist;
153 typedef std::pair<double, int>
Info;
double myChangeProbability
Representation of a vehicle in the micro simulation.
bool amBlockingFollowerNB()
bool amBlockingFollower()
The car-following model abstraction.
virtual void prepareStep()
bool currentDistDisallows(double dist, int laneOffset, double lookForwardDist)
virtual double patchSpeed(const double min, const double wanted, const double max, const MSCFModel &cfModel)
Called to adapt the speed in order to allow a lane change.
MSLCM_DK2008(MSVehicle &v)
virtual int wantsChangeToRight(MSAbstractLaneChangeModel::MSLCMessager &msgPass, int blocked, const std::pair< MSVehicle *, double > &leader, const std::pair< MSVehicle *, double > &neighLead, const std::pair< MSVehicle *, double > &neighFollow, const MSLane &neighLane, const std::vector< MSVehicle::LaneQ > &preb, MSVehicle **lastBlocked, MSVehicle **firstBlocked)
Called to examine whether the vehicle wants to change to right This method gets the information about...
A class responsible for exchanging messages between cars involved in lane-change interaction.
virtual int wantsChangeToLeft(MSAbstractLaneChangeModel::MSLCMessager &msgPass, int blocked, const std::pair< MSVehicle *, double > &leader, const std::pair< MSVehicle *, double > &neighLead, const std::pair< MSVehicle *, double > &neighFollow, const MSLane &neighLane, const std::vector< MSVehicle::LaneQ > &preb, MSVehicle **lastBlocked, MSVehicle **firstBlocked)
Called to examine whether the vehicle wants to change to left This method gets the information about ...
bool amBlockingFollowerPlusNB()
int myOwnState
The current state of the vehicle.
int wantsChange(int laneOffset, MSAbstractLaneChangeModel::MSLCMessager &msgPass, int blocked, const std::pair< MSVehicle *, double > &leader, const std::pair< MSVehicle *, double > &neighLead, const std::pair< MSVehicle *, double > &neighFollow, const MSLane &neighLane, const std::vector< MSVehicle::LaneQ > &preb, MSVehicle **lastBlocked, MSVehicle **firstBlocked)
Called to examine whether the vehicle wants to change using the given laneOffset. This method gets th...
bool currentDistAllows(double dist, int laneOffset, double lookForwardDist)
double myLeadingBlockerLength
std::vector< double > myVSafes
A lane change model developed by D. Krajzewicz between 2004 and 2010.
std::pair< double, int > Info
Representation of a lane in the micro simulation.
virtual void * inform(void *info, MSVehicle *sender)
void informBlocker(MSAbstractLaneChangeModel::MSLCMessager &msgPass, int &blocked, int dir, const std::pair< MSVehicle *, double > &neighLead, const std::pair< MSVehicle *, double > &neighFollow)
Interface for lane-change models.