 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
20 #ifndef MSLCM_DK2008_h
21 #define MSLCM_DK2008_h
58 const std::pair<MSVehicle*, double>& leader,
59 const std::pair<MSVehicle*, double>& neighLead,
60 const std::pair<MSVehicle*, double>& neighFollow,
62 const std::vector<MSVehicle::LaneQ>& preb,
76 virtual double patchSpeed(
const double min,
const double wanted,
const double max,
90 const std::pair<MSVehicle*, double>& leader,
91 const std::pair<MSVehicle*, double>& neighLead,
92 const std::pair<MSVehicle*, double>& neighFollow,
94 const std::vector<MSVehicle::LaneQ>& preb,
103 const std::pair<MSVehicle*, double>& leader,
104 const std::pair<MSVehicle*, double>& neighLead,
105 const std::pair<MSVehicle*, double>& neighFollow,
107 const std::vector<MSVehicle::LaneQ>& preb,
112 int& blocked,
int dir,
113 const std::pair<MSVehicle*, double>& neighLead,
114 const std::pair<MSVehicle*, double>& neighFollow);
129 return dist / (abs(laneOffset)) < lookForwardDist;
132 return dist / abs(laneOffset) > lookForwardDist;
135 typedef std::pair<double, int>
Info;
virtual void * inform(void *info, MSVehicle *sender)
bool currentDistDisallows(double dist, int laneOffset, double lookForwardDist)
LaneChangeModel getModelID() const
Returns the model's id.
double myLeadingBlockerLength
Representation of a lane in the micro simulation.
double myChangeProbability
A class responsible for exchanging messages between cars involved in lane-change interaction.
bool amBlockingFollower()
virtual void prepareStep()
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.
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...
@ LCA_AMBLOCKINGFOLLOWER_DONTBRAKE
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 ...
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...
MSLCM_DK2008(MSVehicle &v)
bool currentDistAllows(double dist, int laneOffset, double lookForwardDist)
std::vector< double > myVSafes
int myOwnState
The current state of the vehicle.
std::pair< double, int > Info
void informBlocker(MSAbstractLaneChangeModel::MSLCMessager &msgPass, int &blocked, int dir, const std::pair< MSVehicle *, double > &neighLead, const std::pair< MSVehicle *, double > &neighFollow)
The car-following model abstraction.
bool amBlockingFollowerPlusNB()
Interface for lane-change models.
A lane change model developed by D. Krajzewicz between 2004 and 2010.
bool amBlockingFollowerNB()
Representation of a vehicle in the micro simulation.