23 #ifndef MSLCM_DK2004_h
24 #define MSLCM_DK2004_h
75 const std::pair<MSVehicle*, SUMOReal>& leader,
76 const std::pair<MSVehicle*, SUMOReal>& neighLead,
77 const std::pair<MSVehicle*, SUMOReal>& neighFollow,
79 const std::vector<MSVehicle::LaneQ>& preb,
87 const std::pair<MSVehicle*, SUMOReal>& leader,
88 const std::pair<MSVehicle*, SUMOReal>& neighLead,
89 const std::pair<MSVehicle*, SUMOReal>& neighFollow,
91 const std::vector<MSVehicle::LaneQ>& preb,
119 int& blocked,
int dir,
120 const std::pair<MSVehicle*, SUMOReal>& neighLead,
121 const std::pair<MSVehicle*, SUMOReal>& neighFollow);
136 return dist / (
abs(laneOffset)) < lookForwardDist;
139 return dist /
abs(laneOffset) > lookForwardDist;
142 typedef std::pair<SUMOReal, int>
Info;
Representation of a vehicle in the micro simulation.
MSLCM_DK2004(MSVehicle &v)
The car-following model abstraction.
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)
Called to examine whether the vehicle wants to change to right This method gets the information about...
SUMOReal getChangeProbability() const
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)
Called to examine whether the vehicle wants to change to left This method gets the information about ...
SUMOReal myChangeProbability
A class responsible for exchanging messages between cars involved in lane-change interaction.
void informBlocker(MSAbstractLaneChangeModel::MSLCMessager &msgPass, int &blocked, int dir, const std::pair< MSVehicle *, SUMOReal > &neighLead, const std::pair< MSVehicle *, SUMOReal > &neighFollow)
virtual void * inform(void *info, MSVehicle *sender)
bool currentDistDisallows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist)
bool amBlockingFollower()
int myOwnState
The current state of the vehicle.
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.
bool amBlockingFollowerNB()
std::pair< SUMOReal, int > Info
virtual void prepareStep()
bool amBlockingFollowerPlusNB()
std::vector< SUMOReal > myVSafes
SUMOReal myLeadingBlockerLength
bool currentDistAllows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist)
Representation of a lane in the micro simulation.
A lane change model developed by D. Krajzewicz between 2004 and 2010.
Interface for lane-change models.