23 #ifndef MSLCM_JE2013_h 24 #define MSLCM_JE2013_h 77 const std::pair<MSVehicle*, SUMOReal>& leader,
78 const std::pair<MSVehicle*, SUMOReal>& neighLead,
79 const std::pair<MSVehicle*, SUMOReal>& neighFollow,
81 const std::vector<MSVehicle::LaneQ>& preb,
114 const std::pair<MSVehicle*, SUMOReal>& leader,
115 const std::pair<MSVehicle*, SUMOReal>& neighLead,
116 const std::pair<MSVehicle*, SUMOReal>& neighFollow,
118 const std::vector<MSVehicle::LaneQ>& preb,
128 int blocked,
int dir,
129 const std::pair<MSVehicle*, SUMOReal>& neighLead,
134 int blocked,
int dir,
135 const std::pair<MSVehicle*, SUMOReal>& neighFollow,
164 return dist / (
abs(laneOffset)) < lookForwardDist;
167 return dist /
abs(laneOffset) > lookForwardDist;
171 typedef std::pair<SUMOReal, int>
Info;
void * inform(void *info, MSVehicle *sender)
const SUMOReal myCooperativeParam
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)
helper function for doing the actual work
bool debugVehicle() const
whether the current vehicles shall be debugged
Representation of a vehicle in the micro simulation.
int slowDownForBlocked(MSVehicle **blocked, int state)
compute useful slowdowns for blocked vehicles
const SUMOReal myChangeProbThresholdLeft
bool currentDistAllows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist)
bool amBlockingFollowerNB()
SUMOReal myLeadingBlockerLength
The car-following model abstraction.
bool amBlockingFollower()
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...
MSLCM_JE2013(MSVehicle &v)
std::vector< SUMOReal > myVSafes
A lane change model developed by J. Erdmann.
void informFollower(MSAbstractLaneChangeModel::MSLCMessager &msgPass, int blocked, int dir, const std::pair< MSVehicle *, SUMOReal > &neighFollow, SUMOReal remainingSeconds, SUMOReal plannedSpeed)
decide whether we will try cut in before the follower or allow to be overtaken
std::pair< SUMOReal, int > Info
information regarding save velocity (unused) and state flags of the ego vehicle
const SUMOReal myStrategicParam
A class responsible for exchanging messages between cars involved in lane-change interaction.
SUMOReal mySpeedGainProbability
a value for tracking the probability that a change to the offset with the same sign is beneficial ...
bool amBlockingFollowerPlusNB()
SUMOReal informLeader(MSAbstractLaneChangeModel::MSLCMessager &msgPass, int blocked, int dir, const std::pair< MSVehicle *, SUMOReal > &neighLead, SUMOReal remainingSeconds)
SUMOReal _patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, const MSCFModel &cfModel)
void saveBlockerLength(MSVehicle *blocker, int lcaCounter)
save space for vehicles which need to counter-lane-change
int myOwnState
The current state of the vehicle.
const SUMOReal myKeepRightParam
SUMOReal myKeepRightProbability
SUMOReal myLookAheadSpeed
const SUMOReal myChangeProbThresholdRight
Representation of a lane in the micro simulation.
bool currentDistDisallows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist)
const SUMOReal mySpeedGainParam
Interface for lane-change models.
void saveBlockerLength(SUMOReal length)
reserve space at the end of the lane to avoid dead locks
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.