21 #ifndef MSLCM_JE2013_h
22 #define MSLCM_JE2013_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,
110 const std::pair<MSVehicle*, SUMOReal>& leader,
111 const std::pair<MSVehicle*, SUMOReal>& neighLead,
112 const std::pair<MSVehicle*, SUMOReal>& neighFollow,
114 const std::vector<MSVehicle::LaneQ>& preb,
124 int blocked,
int dir,
125 const std::pair<MSVehicle*, SUMOReal>& neighLead,
130 int blocked,
int dir,
131 const std::pair<MSVehicle*, SUMOReal>& neighFollow,
160 return dist / (
abs(laneOffset)) < lookForwardDist;
163 return dist /
abs(laneOffset) > lookForwardDist;
167 typedef std::pair<SUMOReal, int>
Info;
void * inform(void *info, MSVehicle *sender)
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
Representation of a vehicle in the micro simulation.
int slowDownForBlocked(MSVehicle **blocked, int state)
compute useful slowdowns for blocked vehicles
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
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.
SUMOReal myKeepRightProbability
SUMOReal myLookAheadSpeed
Representation of a lane in the micro simulation.
bool currentDistDisallows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist)
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.