23 #ifndef MSLCM_DK2008_h 24 #define MSLCM_DK2008_h 75 const std::pair<MSVehicle*, double>& leader,
76 const std::pair<MSVehicle*, double>& neighLead,
77 const std::pair<MSVehicle*, double>& neighFollow,
79 const std::vector<MSVehicle::LaneQ>& preb,
93 virtual double patchSpeed(
const double min,
const double wanted,
const double max,
107 const std::pair<MSVehicle*, double>& leader,
108 const std::pair<MSVehicle*, double>& neighLead,
109 const std::pair<MSVehicle*, double>& neighFollow,
111 const std::vector<MSVehicle::LaneQ>& preb,
120 const std::pair<MSVehicle*, double>& leader,
121 const std::pair<MSVehicle*, double>& neighLead,
122 const std::pair<MSVehicle*, double>& neighFollow,
124 const std::vector<MSVehicle::LaneQ>& preb,
129 int& blocked,
int dir,
130 const std::pair<MSVehicle*, double>& neighLead,
131 const std::pair<MSVehicle*, double>& neighFollow);
146 return dist / (abs(laneOffset)) < lookForwardDist;
149 return dist / abs(laneOffset) > lookForwardDist;
152 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.