18 #ifndef MSLaneChangerSublane_h 19 #define MSLaneChangerSublane_h 74 const std::vector<MSVehicle::LaneQ>& preb,
76 double& maneuverDist)
const;
saves leader/follower vehicles and their distances relative to an ego vehicle
Representation of a vehicle in the micro simulation.
bool checkChangeToNewLane(MSVehicle *vehicle, const int direction, ChangerIt from, ChangerIt to)
check whether the given vehicle has entered the new lane 'to->lane' during a sublane LC-step ...
void abortLCManeuver(MSVehicle *vehicle)
immediately stop lane-changing and register vehicle as unchanged
void outputLCStarted(MSVehicle *vehicle, ChangerIt &from, ChangerIt &to, int direction, double maneuverDist)
optional output for start of lane-change maneuvre
StateAndDist checkChangeHelper(MSVehicle *vehicle, int laneOffset, LaneChangeAction alternatives)
helper function that calls checkChangeSublane and sets blocker information
int checkChangeSublane(int laneOffset, LaneChangeAction alternatives, const std::vector< MSVehicle::LaneQ > &preb, double &latDist, double &maneuverDist) const
check whether sub-lane changing in the given direction is desirable and possible
void outputLCEnded(MSVehicle *vehicle, ChangerIt &from, ChangerIt &to, int direction)
optional output for end of lane-change maneuvre
virtual void updateChanger(bool vehHasChanged)
Performs lane changing of vehicles.
Performs lane changing of vehicles.
MSLaneChangerSublane()
Default constructor.
virtual void initChanger()
Initialize the changer before looping over all vehicles.
~MSLaneChangerSublane()
Destructor.
MSLaneChangerSublane & operator=(const MSLaneChangerSublane &)
Assignment operator.
bool continueChangeSublane(MSVehicle *vehicle, ChangerIt &from)
Continue a sublane-lane change maneuver and return whether the midpoint was passed in this step...
MSLeaderDistanceInfo getLeaders(const ChangerIt &target, const MSVehicle *ego) const
get leaders for ego on the given lane
LaneChangeAction
The state of a vehicle's lane-change behavior.
Changer::iterator ChangerIt
the iterator moving over the ChangeElems
bool startChangeSublane(MSVehicle *vehicle, ChangerIt &from, double latDist, double maneuverDist)
change by the specified amount and return whether a new lane was entered
MSAbstractLaneChangeModel::StateAndDist StateAndDist