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