![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Performs lane changing of vehicles. More...
#include <MSLaneChangerSublane.h>
Public Types | |
typedef std::vector< ChangeElem > | Changer |
The list of changers; For each lane, a ChangeElem is being build. More... | |
typedef Changer::iterator | ChangerIt |
the iterator moving over the ChangeElems More... | |
typedef Changer::const_iterator | ConstChangerIt |
the iterator moving over the ChangeElems More... | |
Public Member Functions | |
void | laneChange (SUMOTime t) |
Start lane-change-process for all vehicles on the edge'e lanes. More... | |
MSLaneChangerSublane (const std::vector< MSLane * > *lanes, bool allowChanging) | |
Constructor. More... | |
~MSLaneChangerSublane () | |
Destructor. More... | |
Protected Types | |
typedef MSAbstractLaneChangeModel::StateAndDist | StateAndDist |
Protected Member Functions | |
void | abortLCManeuver (MSVehicle *vehicle) |
immediately stop lane-changing and register vehicle as unchanged More... | |
bool | applyTraCICommands (MSVehicle *vehicle) |
Execute TraCI LC-commands. More... | |
virtual bool | change () |
virtual bool | changeOpposite (std::pair< MSVehicle *, double > leader) |
int | checkChange (int laneOffset, const MSLane *targetLane, const std::pair< MSVehicle *const, double > &leader, const std::pair< MSVehicle *const, double > &neighLead, const std::pair< MSVehicle *const, double > &neighFollow, const std::vector< MSVehicle::LaneQ > &preb) const |
StateAndDist | checkChangeHelper (MSVehicle *vehicle, int laneOffset, LaneChangeAction alternatives) |
helper function that calls checkChangeSublane and sets blocker information More... | |
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 More... | |
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 More... | |
int | checkChangeWithinEdge (int laneOffset, const std::pair< MSVehicle *const, double > &leader, const std::vector< MSVehicle::LaneQ > &preb) const |
void | checkTraCICommands (MSVehicle *vehicle) |
Take into account traci LC-commands. More... | |
bool | continueChange (MSVehicle *vehicle, ChangerIt &from) |
continue a lane change maneuver and return whether the vehicle has completely moved onto the new lane (used if gLaneChangeDuration > 0) More... | |
bool | continueChangeSublane (MSVehicle *vehicle, ChangerIt &from) |
Continue a sublane-lane change maneuver and return whether the midpoint was passed in this step. More... | |
ChangerIt | findCandidate () |
Find current candidate. If there is none, myChanger.end() is returned. More... | |
MSLeaderDistanceInfo | getLeaders (const ChangerIt &target, const MSVehicle *ego) const |
get leaders for ego on the given lane More... | |
std::pair< MSVehicle *const, double > | getRealFollower (const ChangerIt &target) const |
std::pair< MSVehicle *const, double > | getRealLeader (const ChangerIt &target) const |
virtual void | initChanger () |
Initialize the changer before looping over all vehicles. More... | |
bool | mayChange (int direction) const |
whether changing to the lane in the given direction should be considered More... | |
void | outputLCEnded (MSVehicle *vehicle, ChangerIt &from, ChangerIt &to, int direction) |
optional output for end of lane-change maneuvre More... | |
void | outputLCStarted (MSVehicle *vehicle, ChangerIt &from, ChangerIt &to, int direction, double maneuverDist) |
optional output for start of lane-change maneuvre More... | |
void | registerUnchanged (MSVehicle *vehicle) |
bool | startChange (MSVehicle *vehicle, ChangerIt &from, int direction) |
bool | startChangeSublane (MSVehicle *vehicle, ChangerIt &from, double latDist, double maneuverDist) |
change by the specified amount and return whether a new lane was entered More... | |
virtual void | updateChanger (bool vehHasChanged) |
void | updateLanes (SUMOTime t) |
MSVehicle * | veh (ConstChangerIt ce) const |
bool | vehInChanger () const |
Check if there is a single change-candidate in the changer. Returns true if there is one. More... | |
Static Protected Member Functions | |
static void | computeOvertakingTime (const MSVehicle *vehicle, const MSVehicle *leader, double gap, double &timeToOvertake, double &spaceToOvertake) |
Compute the time and space required for overtaking the given leader. More... | |
static MSVehicle * | getCloserFollower (const double maxPos, MSVehicle *follow1, MSVehicle *follow2) |
return the closer follower of ego More... | |
static std::pair< MSVehicle *, double > | getColumnleader (MSVehicle *vehicle, std::pair< MSVehicle *, double > leader, double maxLookAhead=std::numeric_limits< double >::max()) |
static MSLane * | getLaneAfter (const MSLane *lane, const std::vector< MSLane * > &conts) |
return the next lane in conts beyond lane or nullptr More... | |
Protected Attributes | |
const bool | myAllowsChanging |
ChangerIt | myCandi |
Changer | myChanger |
Container for ChangeElemements, one for every lane in the edge. More... | |
const bool | myChangeToOpposite |
whether this edge allows changing to the opposite direction edge More... | |
Private Member Functions | |
MSLaneChangerSublane () | |
Default constructor. More... | |
MSLaneChangerSublane (const MSLaneChangerSublane &) | |
Copy constructor. More... | |
MSLaneChangerSublane & | operator= (const MSLaneChangerSublane &) |
Assignment operator. More... | |
Performs lane changing of vehicles.
Definition at line 40 of file MSLaneChangerSublane.h.
|
inherited |
The list of changers; For each lane, a ChangeElem is being build.
Definition at line 103 of file MSLaneChanger.h.
|
inherited |
the iterator moving over the ChangeElems
Definition at line 106 of file MSLaneChanger.h.
|
inherited |
the iterator moving over the ChangeElems
Definition at line 109 of file MSLaneChanger.h.
|
protected |
Definition at line 91 of file MSLaneChangerSublane.h.
MSLaneChangerSublane::MSLaneChangerSublane | ( | const std::vector< MSLane * > * | lanes, |
bool | allowChanging | ||
) |
Constructor.
Definition at line 52 of file MSLaneChangerSublane.cpp.
References MSLaneChanger::myChanger.
MSLaneChangerSublane::~MSLaneChangerSublane | ( | ) |
Destructor.
Definition at line 68 of file MSLaneChangerSublane.cpp.
|
private |
Default constructor.
|
private |
Copy constructor.
|
protected |
immediately stop lane-changing and register vehicle as unchanged
Definition at line 207 of file MSLaneChangerSublane.cpp.
References DEBUG_COND, Named::getID(), MSVehicle::getLaneChangeModel(), MSAbstractLaneChangeModel::getOwnState(), MSAbstractLaneChangeModel::getPreviousManeuverDist(), MSAbstractLaneChangeModel::getPrevState(), LCA_CHANGE_REASONS, LCA_SUBLANE, MSLaneChanger::myCandi, outputLCEnded(), MSLaneChanger::registerUnchanged(), MSAbstractLaneChangeModel::setManeuverDist(), MSAbstractLaneChangeModel::setSpeedLat(), SIMTIME, and toString().
Referenced by change(), and startChangeSublane().
|
protectedinherited |
Execute TraCI LC-commands.
Definition at line 400 of file MSLaneChanger.cpp.
References MSLaneChanger::continueChange(), MSVehicle::getLaneChangeModel(), MSAbstractLaneChangeModel::getOwnState(), LCA_BLOCKED, LCA_LEFT, LCA_RIGHT, MSLaneChanger::myCandi, and MSAbstractLaneChangeModel::startLaneChangeManeuver().
Referenced by MSLaneChanger::change().
|
protectedvirtual |
Find a new candidate and try to change it.
myAllowsChanging || vehicle->getLaneChangeModel().alreadyChanged() ||
Reimplemented from MSLaneChanger.
Definition at line 106 of file MSLaneChangerSublane.cpp.
References abortLCManeuver(), MSVehicle::adaptBestLanesOccupation(), checkChangeHelper(), MSLaneChanger::checkTraCICommands(), MSAbstractLaneChangeModel::clearNeighbors(), continueChangeSublane(), DEBUG_COND, MSAbstractLaneChangeModel::debugVehicle(), MSAbstractLaneChangeModel::decideDirection(), MSAbstractLaneChangeModel::StateAndDist::dir, MSLaneChanger::findCandidate(), Named::getID(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), getLeaders(), MSAbstractLaneChangeModel::getManeuverDist(), MSAbstractLaneChangeModel::getSpeedLat(), MSVehicle::isActive(), MSAbstractLaneChangeModel::isChangingLanes(), MSVehicle::isStoppedOnLane(), MSAbstractLaneChangeModel::StateAndDist::latDist, LCA_BLOCKED, LCA_LEFT, LCA_NONE, LCA_RIGHT, LCA_URGENT, LCA_WANTS_LANECHANGE, MSAbstractLaneChangeModel::StateAndDist::maneuverDist, MSLaneChanger::mayChange(), MSLaneChanger::myCandi, MSLaneChanger::myChanger, MSLaneChanger::registerUnchanged(), MSAbstractLaneChangeModel::setOwnState(), SIMTIME, startChangeSublane(), MSAbstractLaneChangeModel::StateAndDist::state, toString(), MSVehicle::updateBestLanes(), MSAbstractLaneChangeModel::updateExpectedSublaneSpeeds(), and MSLaneChanger::veh().
|
protectedvirtualinherited |
try changing to the opposite direction edge.
Definition at line 1012 of file MSLaneChanger.cpp.
References MSLane::allowsVehicleClass(), MSLaneChanger::checkChange(), MSLaneChanger::computeOvertakingTime(), MSLaneChanger::continueChange(), DEBUG_COND, MSLaneChanger::findCandidate(), MSVehicle::getAcceleration(), MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), MSLaneChanger::getColumnleader(), MSLink::getDirection(), MSCFModel::getHeadwayTime(), Named::getID(), Named::getIDSecure(), MSVehicle::getInfluencer(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicle::Influencer::getLaneTimeLineDuration(), MSLane::getLength(), MSLane::getLinkTo(), MSAbstractLaneChangeModel::getModelID(), MSVehicle::getMutableLane(), MSLane::getOpposite(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), MSVehicle::getPositionOnLane(), MSVehicle::Influencer::getRespectJunctionPriority(), MSVehicle::getSpeed(), MSLane::getSpeedLimit(), MSLink::getState(), MSBaseVehicle::getVClass(), MSVehicleType::getVehicleClass(), MSLane::getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), MSLink::getViaLaneOrLane(), MSGlobals::gLefthand, MSVehicle::hasInfluencer(), MSLink::havePriority(), MSLink::haveRed(), MSLink::haveYellow(), MSVehicle::ignoreRed(), MSVehicle::influenceChangeDecision(), MSAbstractLaneChangeModel::isOpposite(), MSBaseVehicle::isStopped(), LCA_BLOCKED, LCA_COOPERATIVE, LCA_LEFT, LCA_TRACI, LCA_WANTS_LANECHANGE, LCM_SL2015, MSVehicle::LaneQ::length, LINKSTATE_ZIPPER, MIN2(), MSLaneChanger::myCandi, MSLaneChanger::myChangeToOpposite, MSVehicle::nextStopDist(), OPPOSITE_OVERTAKING_ONCOMING_LOOKAHEAD, OPPOSITE_OVERTAKING_SAFETYGAP_HEADWAY_FACTOR, MSAbstractLaneChangeModel::setOwnState(), SIMTIME, MSAbstractLaneChangeModel::startLaneChangeManeuver(), STEPS2TIME, STRAIGHT, SVC_EMERGENCY, toString(), MSLaneChanger::veh(), MSVehicle::VEH_SIGNAL_BLINKER_LEFT, and MSVehicle::VEH_SIGNAL_BLINKER_RIGHT.
Referenced by MSLaneChanger::change().
|
protectedinherited |
Definition at line 694 of file MSLaneChanger.cpp.
References ACCEL2SPEED, MSCFModel::brakeGap(), DEBUG_COND, DELTA_T, MSAbstractLaneChangeModel::estimateLCDuration(), MSVehicle::getAcceleration(), MSVehicle::getActionStepLength(), MSAbstractLaneChangeModel::getAssumedDecelForLaneChangeDuration(), MSVehicle::getBackPositionOnLane(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), MSLane::getCriticalLeader(), MSLane::getEdge(), MSCFModel::getHeadwayTime(), Named::getID(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSLane::getLeader(), MSLane::getLength(), MSVehicleType::getLengthWithGap(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), MSLane::getParallelLane(), MSVehicle::getPositionOnLane(), MSVehicle::getRightSideOnLane(), MSAbstractLaneChangeModel::getSafetyFactor(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLane::getWidth(), MSVehicleType::getWidth(), MSGlobals::gLaneChangeDuration, MSLane::hasPedestrians(), MSVehicle::influenceChangeDecision(), MSEdge::isInternal(), MSLane::isLinkEnd(), LCA_BLOCKED, LCA_BLOCKED_BY_LEFT_FOLLOWER, LCA_BLOCKED_BY_LEFT_LEADER, LCA_BLOCKED_BY_RIGHT_FOLLOWER, LCA_BLOCKED_BY_RIGHT_LEADER, LCA_INSUFFICIENT_SPACE, LCA_INSUFFICIENT_SPEED, LCA_OVERLAPPING, LCA_WANTS_LANECHANGE, LEFT, MAX2(), MIN2(), MSLaneChanger::myCandi, MSLane::nextBlocking(), MSAbstractLaneChangeModel::NO_NEIGHBOR, RIGHT, MSAbstractLaneChangeModel::saveLCState(), MSAbstractLaneChangeModel::saveNeighbors(), MSAbstractLaneChangeModel::setFollowerGaps(), MSAbstractLaneChangeModel::setLeaderGaps(), MSAbstractLaneChangeModel::setOrigLeaderGaps(), SIMTIME, MSLane::succLinkSec(), toString(), TS, MSVehicle::unsafeLinkAhead(), MSLaneChanger::veh(), and MSAbstractLaneChangeModel::wantsChange().
Referenced by MSLaneChanger::changeOpposite(), and MSLaneChanger::checkChangeWithinEdge().
|
protected |
helper function that calls checkChangeSublane and sets blocker information
Definition at line 234 of file MSLaneChangerSublane.cpp.
References checkChangeSublane(), MSAbstractLaneChangeModel::StateAndDist::dir, MSVehicle::getBestLanes(), MSAbstractLaneChangeModel::StateAndDist::latDist, LCA_BLOCKED, LCA_URGENT, LCA_WANTS_LANECHANGE, MSAbstractLaneChangeModel::StateAndDist::maneuverDist, MSLaneChanger::mayChange(), MSLaneChanger::myCandi, and MSAbstractLaneChangeModel::StateAndDist::state.
Referenced by change().
|
protected |
check whether sub-lane changing in the given direction is desirable and possible
[in] | laneOffset | The direction in which changing should be checked |
[in] | leaders | The candidate vehicle's leaders |
[in] | preb | The bestLanse of the candidaet vehicle |
[out] | latDist | The distance by which the vehicle changes laterally |
[out] | maneuverDist | The lateral distance for the complete envisioned maneuver (used for maneuver continuation in non-actionsteps). |
Definition at line 578 of file MSLaneChangerSublane.cpp.
References DEBUG_COND, MSVehicle::getBackPositionOnLane(), Named::getID(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSLane::getRightSideOnEdge(), MSVehicle::influenceChangeDecision(), MSLaneChanger::myCandi, MSAbstractLaneChangeModel::saveLCState(), MSAbstractLaneChangeModel::saveNeighbors(), SIMTIME, MSLeaderDistanceInfo::toString(), toString(), MSLaneChanger::veh(), and MSAbstractLaneChangeModel::wantsChangeSublane().
Referenced by checkChangeHelper().
|
protected |
check whether the given vehicle has entered the new lane 'to->lane' during a sublane LC-step
Definition at line 441 of file MSLaneChangerSublane.cpp.
References MSVehicle::getBackPositionOnLane(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicle::getLateralPositionOnLane(), getLeaders(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSLane::getWidth(), MSAbstractLaneChangeModel::haveLCOutput(), MSVehicle::isActive(), MSLaneChanger::mayChange(), MSVehicle::State::myPosLat, MSVehicle::myState, MSLaneChanger::registerUnchanged(), MSAbstractLaneChangeModel::setFollowerGaps(), MSAbstractLaneChangeModel::setLeaderGaps(), MSAbstractLaneChangeModel::setOrigLeaderGaps(), and MSAbstractLaneChangeModel::startLaneChangeManeuver().
Referenced by startChangeSublane().
|
protectedinherited |
Definition at line 677 of file MSLaneChanger.cpp.
References MSLaneChanger::checkChange(), MSLaneChanger::getRealFollower(), MSLaneChanger::getRealLeader(), and MSLaneChanger::myCandi.
Referenced by MSLaneChanger::change().
|
protectedinherited |
Take into account traci LC-commands.
Definition at line 379 of file MSLaneChanger.cpp.
References MSAbstractLaneChangeModel::checkTraCICommands(), DEBUG_COND, Named::getID(), MSVehicle::getLaneChangeModel(), MSAbstractLaneChangeModel::getOwnState(), LCA_BLOCKED, LCA_OVERLAPPING, SIMTIME, and toString().
Referenced by MSLaneChanger::change(), and change().
|
staticprotectedinherited |
Compute the time and space required for overtaking the given leader.
[in] | vehicle | The vehicle that wants to overtake |
[in] | leader | The vehicle to be overtaken |
[in] | gap | The gap between vehicle and leader |
[out] | timeToOvertake | The time for overtaking |
[out] | spaceToOvertake | The space for overtaking |
XXX ignore speed limit when overtaking through the opposite lane?
Definition at line 1351 of file MSLaneChanger.cpp.
References DEBUG_COND, MSVehicle::getAcceleration(), MSVehicle::getCarFollowModel(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicleType::getLength(), MSVehicleType::getLengthWithGap(), MSCFModel::getMaxAccel(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), MSAbstractLaneChangeModel::getOppositeSafetyFactor(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSLane::getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), MAX2(), OPPOSITE_OVERTAKING_SAFE_TIMEGAP, OPPOSITE_OVERTAKING_SAFETY_FACTOR, and TS.
Referenced by MSLaneChanger::changeOpposite().
continue a lane change maneuver and return whether the vehicle has completely moved onto the new lane (used if gLaneChangeDuration > 0)
Definition at line 442 of file MSLaneChanger.cpp.
References MSVehicle::computeAngle(), DEBUG_COND, MSAbstractLaneChangeModel::endLaneChangeManeuver(), MSLane::getEdge(), Named::getID(), Named::getIDSecure(), MSVehicle::getLane(), MSAbstractLaneChangeModel::getLaneChangeDirection(), MSVehicle::getLaneChangeModel(), MSVehicle::getLateralPositionOnLane(), MSLane::getParallelLane(), MSAbstractLaneChangeModel::getShadowDirection(), MSAbstractLaneChangeModel::getShadowLane(), MSAbstractLaneChangeModel::getSpeedLat(), MSLane::getWidth(), Position::INVALID, MSAbstractLaneChangeModel::isChangingLanes(), MSAbstractLaneChangeModel::isOpposite(), M_PI, MSVehicle::myAngle, MSVehicle::myCachedPosition, MSLaneChanger::myCandi, MSVehicle::State::myPosLat, MSVehicle::myState, MSAbstractLaneChangeModel::primaryLaneChanged(), MSLane::requireCollisionCheck(), SIMTIME, SPEED2DIST, MSAbstractLaneChangeModel::updateCompletion(), and MSAbstractLaneChangeModel::updateShadowLane().
Referenced by MSLaneChanger::applyTraCICommands(), MSLaneChanger::change(), MSLaneChanger::changeOpposite(), and MSLaneChanger::startChange().
|
protected |
Continue a sublane-lane change maneuver and return whether the midpoint was passed in this step.
Definition at line 254 of file MSLaneChangerSublane.cpp.
References MSAbstractLaneChangeModel::computeSpeedLat(), DEBUG_COND, Named::getID(), MSVehicle::getLaneChangeModel(), MSAbstractLaneChangeModel::getManeuverDist(), MSLaneChanger::registerUnchanged(), SIMTIME, SPEED2DIST, and startChangeSublane().
Referenced by change().
|
protectedinherited |
Find current candidate. If there is none, myChanger.end() is returned.
Definition at line 196 of file MSLaneChanger.cpp.
References Named::getID(), MSVehicle::getPositionOnLane(), MSVehicle::isFrontOnLane(), MSLaneChanger::myChanger, SIMTIME, and MSLaneChanger::veh().
Referenced by MSLaneChanger::change(), change(), and MSLaneChanger::changeOpposite().
|
staticprotectedinherited |
return the closer follower of ego
Definition at line 662 of file MSLaneChanger.cpp.
References MSVehicle::getPositionOnLane().
Referenced by MSLaneChanger::getRealFollower().
|
staticprotectedinherited |
Definition at line 1456 of file MSLaneChanger.cpp.
References MSCFModel::brakeGap(), DEBUG_COND, MSVehicle::getBackPositionOnLane(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), MSLane::getEdge(), Named::getID(), Named::getIDSecure(), MSVehicle::getLane(), MSLaneChanger::getLaneAfter(), MSVehicle::getLaneChangeModel(), MSLane::getLastAnyVehicle(), MSLane::getLength(), MSVehicleType::getLengthWithGap(), MSCFModel::getMaxDecel(), MSAbstractLaneChangeModel::getOppositeSafetyFactor(), MSVehicle::getPositionOnLane(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSVehicleType::getVehicleClass(), MSLane::getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), MAX2(), OPPOSITE_OVERTAKING_MAX_LOOKAHEAD, OPPOSITE_OVERTAKING_MAX_LOOKAHEAD_EMERGENCY, OPPOSITE_OVERTAKING_SAFETY_FACTOR, and SVC_EMERGENCY.
Referenced by MSLaneChanger::changeOpposite().
|
staticprotectedinherited |
return the next lane in conts beyond lane or nullptr
Definition at line 1592 of file MSLaneChanger.cpp.
Referenced by MSLaneChanger::getColumnleader().
|
protected |
get leaders for ego on the given lane
Definition at line 509 of file MSLaneChangerSublane.cpp.
References MSLeaderDistanceInfo::addLeader(), MSCFModel::brakeGap(), DEBUG_COND, MSVehicle::getBackPositionOnLane(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), Named::getID(), MSVehicle::getLane(), MSLane::getLength(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MAX2(), MSLaneChanger::myCandi, MSLeaderInfo::numFreeSublanes(), MSLeaderInfo::numSublanes(), SIMTIME, MSLeaderDistanceInfo::toString(), and MSLaneChanger::veh().
Referenced by change(), and checkChangeToNewLane().
|
protectedinherited |
Definition at line 592 of file MSLaneChanger.cpp.
References DEBUG_COND, MSVehicle::getBackPositionOnLane(), MSLaneChanger::getCloserFollower(), Named::getID(), MSVehicleType::getLength(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getVehicleType(), MSLaneChanger::myCandi, SIMTIME, and MSLaneChanger::veh().
Referenced by MSLaneChanger::checkChangeWithinEdge().
|
protectedinherited |
Definition at line 500 of file MSLaneChanger.cpp.
References MSCFModel::brakeGap(), DEBUG_COND, MSVehicle::getBackPositionOnLane(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), Named::getID(), Named::getIDSecure(), MSLane::getLength(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLaneChanger::myCandi, MSLane::myPartialVehicles, SIMTIME, and MSLaneChanger::veh().
Referenced by MSLaneChanger::change(), and MSLaneChanger::checkChangeWithinEdge().
|
protectedvirtual |
Initialize the changer before looping over all vehicles.
Reimplemented from MSLaneChanger.
Definition at line 71 of file MSLaneChangerSublane.cpp.
References MSLaneChanger::initChanger(), and MSLaneChanger::myChanger.
|
inherited |
Start lane-change-process for all vehicles on the edge'e lanes.
Definition at line 121 of file MSLaneChanger.cpp.
References MSLaneChanger::change(), MSLaneChanger::initChanger(), MSLaneChanger::myChanger, MSLaneChanger::updateChanger(), MSLaneChanger::updateLanes(), and MSLaneChanger::vehInChanger().
Referenced by MSEdge::changeLanes().
|
protectedinherited |
whether changing to the lane in the given direction should be considered
Definition at line 235 of file MSLaneChanger.cpp.
References MSVehicleType::getVehicleClass(), MSBaseVehicle::getVehicleType(), MSLaneChanger::myAllowsChanging, MSLaneChanger::myCandi, and MSLaneChanger::veh().
Referenced by MSLaneChanger::change(), change(), checkChangeHelper(), checkChangeToNewLane(), and startChangeSublane().
|
private |
Assignment operator.
|
protected |
optional output for end of lane-change maneuvre
Definition at line 496 of file MSLaneChangerSublane.cpp.
References MSVehicle::getBackPositionOnLane(), MSVehicle::getLaneChangeModel(), MSAbstractLaneChangeModel::getOwnState(), MSAbstractLaneChangeModel::haveLCOutput(), MSAbstractLaneChangeModel::laneChangeOutput(), LCA_CHANGE_REASONS, LCA_SUBLANE, MSAbstractLaneChangeModel::outputLCEnded(), MSAbstractLaneChangeModel::setFollowerGaps(), MSAbstractLaneChangeModel::setLeaderGaps(), and MSAbstractLaneChangeModel::setOrigLeaderGaps().
Referenced by abortLCManeuver(), and startChangeSublane().
|
protected |
optional output for start of lane-change maneuvre
Definition at line 468 of file MSLaneChangerSublane.cpp.
References DEBUG_COND, MSVehicle::getBackPositionOnLane(), Named::getID(), MSVehicle::getLaneChangeModel(), MSAbstractLaneChangeModel::getOwnState(), MSAbstractLaneChangeModel::getPrevState(), MSAbstractLaneChangeModel::haveLCOutput(), MSAbstractLaneChangeModel::laneChangeOutput(), LCA_BLOCKED, LCA_CHANGE_REASONS, LCA_STAY, LCA_SUBLANE, MSAbstractLaneChangeModel::outputLCStarted(), MSAbstractLaneChangeModel::setFollowerGaps(), MSAbstractLaneChangeModel::setLeaderGaps(), MSAbstractLaneChangeModel::setOrigLeaderGaps(), SIMTIME, and toString().
Referenced by startChangeSublane().
|
protectedinherited |
Update changer for vehicles that did not change
Definition at line 369 of file MSLaneChanger.cpp.
References MSVehicle::getLaneChangeModel(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSLaneChanger::myCandi, MSAbstractLaneChangeModel::unchanged(), and MSLaneChanger::veh().
Referenced by abortLCManeuver(), MSLaneChanger::change(), change(), checkChangeToNewLane(), continueChangeSublane(), MSLaneChanger::startChange(), and startChangeSublane().
|
protectedinherited |
Definition at line 422 of file MSLaneChanger.cpp.
References MSLaneChanger::continueChange(), MSVehicle::getLaneChangeModel(), MSVehicle::isRemoteControlled(), MSLaneChanger::myCandi, MSLaneChanger::registerUnchanged(), and MSAbstractLaneChangeModel::startLaneChangeManeuver().
Referenced by MSLaneChanger::change().
|
protected |
change by the specified amount and return whether a new lane was entered
Definition at line 276 of file MSLaneChangerSublane.cpp.
References abortLCManeuver(), checkChangeToNewLane(), DEBUG_COND, MSAbstractLaneChangeModel::debugVehicle(), DELTA_T, DIST2SPEED, MSVehicle::getActionStepLength(), MSVehicle::getActionStepLengthSecs(), MSVehicle::getAngle(), MSAbstractLaneChangeModel::getCommittedSpeed(), MSVehicle::getFurtherLanes(), Named::getID(), Named::getIDSecure(), MSLane::getIndex(), MSVehicle::getInfluencer(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicle::getLateralPositionOnLane(), MSVehicle::getLatOffset(), MSVehicleType::getLength(), MSAbstractLaneChangeModel::getManeuverDist(), MSVehicleType::getMaxSpeedLat(), MSAbstractLaneChangeModel::getOwnState(), MSVehicle::getPositionOnLane(), MSAbstractLaneChangeModel::getPreviousManeuverDist(), MSAbstractLaneChangeModel::getPrevState(), MSLane::getRightSideOnEdge(), MSAbstractLaneChangeModel::getShadowLane(), MSLane::getShape(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSBaseVehicle::getWidth(), MSLane::getWidth(), MSGlobals::gLefthand, MSLane::interpolateLanePosToGeometryPos(), Position::INVALID, MSVehicle::isRemoteControlled(), LCA_CHANGE_REASONS, LCA_SUBLANE, LCA_TRACI, PositionVector::length2D(), MSLaneChanger::mayChange(), MSVehicle::myCachedPosition, MSLaneChanger::myChanger, MSVehicle::State::myPosLat, MSVehicle::myState, outputLCEnded(), outputLCStarted(), RAD2DEG, MSLaneChanger::registerUnchanged(), PositionVector::rotationAtOffset(), MSVehicle::setAngle(), MSAbstractLaneChangeModel::setManeuverDist(), MSAbstractLaneChangeModel::setSpeedLat(), MSVehicle::Influencer::setSublaneChange(), SIMTIME, SPEED2DIST, toString(), MSAbstractLaneChangeModel::updateSafeLatDist(), MSAbstractLaneChangeModel::updateShadowLane(), and MSAbstractLaneChangeModel::updateTargetLane().
Referenced by change(), and continueChangeSublane().
|
protectedvirtual |
After the possible change, update the changer.
Reimplemented from MSLaneChanger.
Definition at line 85 of file MSLaneChangerSublane.cpp.
References MSLane::getIndex(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSLane::getRightSideOnEdge(), MSAbstractLaneChangeModel::getShadowLane(), MSLaneChanger::myCandi, MSLaneChanger::myChanger, and MSLaneChanger::updateChanger().
|
protectedinherited |
During lane-change a temporary vehicle container is filled within the lanes (bad practice to modify foreign members, I know). Swap this container with the real one.
Definition at line 178 of file MSLaneChanger.cpp.
References MSLaneChanger::myChanger.
Referenced by MSLaneChanger::laneChange().
|
inlineprotectedinherited |
Returns the furthes unhandled vehicle on this change-elements lane or 0 if there is none.
Definition at line 130 of file MSLaneChanger.h.
Referenced by MSLaneChanger::change(), change(), MSLaneChanger::changeOpposite(), MSLaneChanger::checkChange(), checkChangeSublane(), MSLaneChanger::findCandidate(), getLeaders(), MSLaneChanger::getRealFollower(), MSLaneChanger::getRealLeader(), MSLaneChanger::mayChange(), MSLaneChanger::registerUnchanged(), MSLaneChanger::updateChanger(), and MSLaneChanger::vehInChanger().
|
inlineprotectedinherited |
Check if there is a single change-candidate in the changer. Returns true if there is one.
Definition at line 117 of file MSLaneChanger.h.
References MSLaneChanger::myChanger, and MSLaneChanger::veh().
Referenced by MSLaneChanger::laneChange().
|
protectedinherited |
Definition at line 231 of file MSLaneChanger.h.
Referenced by MSLaneChanger::change(), and MSLaneChanger::mayChange().
|
protectedinherited |
Change-candidate. Last of the vehicles in changer. Only this one will try to change. Every vehicle on the edge will be a candidate once in the change-process.
Definition at line 227 of file MSLaneChanger.h.
Referenced by abortLCManeuver(), MSLaneChanger::applyTraCICommands(), MSLaneChanger::change(), change(), MSLaneChanger::changeOpposite(), MSLaneChanger::checkChange(), checkChangeHelper(), checkChangeSublane(), MSLaneChanger::checkChangeWithinEdge(), MSLaneChanger::continueChange(), getLeaders(), MSLaneChanger::getRealFollower(), MSLaneChanger::getRealLeader(), MSLaneChanger::mayChange(), MSLaneChanger::registerUnchanged(), MSLaneChanger::startChange(), MSLaneChanger::updateChanger(), and updateChanger().
|
protectedinherited |
Container for ChangeElemements, one for every lane in the edge.
Definition at line 222 of file MSLaneChanger.h.
Referenced by MSLaneChanger::change(), change(), MSLaneChanger::findCandidate(), MSLaneChanger::initChanger(), initChanger(), MSLaneChanger::laneChange(), MSLaneChanger::MSLaneChanger(), MSLaneChangerSublane(), startChangeSublane(), updateChanger(), MSLaneChanger::updateLanes(), and MSLaneChanger::vehInChanger().
|
protectedinherited |
whether this edge allows changing to the opposite direction edge
Definition at line 234 of file MSLaneChanger.h.
Referenced by MSLaneChanger::changeOpposite().