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. | |
typedef Changer::iterator | ChangerIt |
the iterator moving over the ChangeElems | |
typedef Changer::const_iterator | ConstChangerIt |
the iterator moving over the ChangeElems | |
Public Member Functions | |
Changer & | getChanger () |
return changer (only to be used by MSLaneChangerSublane from another instance) | |
void | laneChange (SUMOTime t) |
Start lane-change-process for all vehicles on the edge'e lanes. | |
MSLaneChangerSublane (const std::vector< MSLane * > *lanes, bool allowChanging) | |
Constructor. | |
~MSLaneChangerSublane () | |
Destructor. | |
Protected Types | |
typedef MSAbstractLaneChangeModel::StateAndDist | StateAndDist |
Protected Member Functions | |
void | abortLCManeuver (MSVehicle *vehicle) |
immediately stop lane-changing and register vehicle as unchanged | |
void | addOutsideLeaders (const MSVehicle *vehicle, MSLeaderDistanceInfo &leaders) const |
bool | applyTraCICommands (MSVehicle *vehicle) |
Execute TraCI LC-commands. | |
bool | avoidDeadlock (MSVehicle *vehicle, std::pair< MSVehicle *, double > neighLead, std::pair< MSVehicle *, double > overtaken, std::pair< MSVehicle *, double > leader) |
avoid opposite-diretion deadlock when vehicles are stopped on both sides of the road The method may call saveBlockerLength to affect vehicle speed in the next step | |
virtual bool | change () |
bool | changeOpposite (MSVehicle *vehicle, std::pair< MSVehicle *, double > leader, MSVehicle *lastStopped) |
int | checkChange (int laneOffset, const MSLane *targetLane, const std::pair< MSVehicle *const, double > &leader, const std::pair< MSVehicle *const, double > &follower, 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 | |
bool | checkChangeOpposite (MSVehicle *vehicle, int laneOffset, 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) |
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 | |
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 | |
int | checkChangeWithinEdge (int laneOffset, const std::pair< MSVehicle *const, double > &leader, const std::vector< MSVehicle::LaneQ > &preb) const |
bool | checkOppositeStop (MSVehicle *vehicle, const MSLane *oncomingLane, const MSLane *opposite, std::pair< MSVehicle *, double > leader) |
decide whether to change (back or forth) for an opposite stop | |
void | checkTraCICommands (MSVehicle *vehicle) |
Take into account traci LC-commands. | |
double | computeSafeOppositeLength (MSVehicle *vehicle, double oppositeLength, const MSLane *source, double usableDist, std::pair< MSVehicle *, double > oncoming, double vMax, double oncomingSpeed, std::pair< MSVehicle *, double > neighLead, std::pair< MSVehicle *, double > overtaken, std::pair< MSVehicle *, double > neighFollow, double surplusGap, const MSLane *opposite, bool canOvertake) |
determine for how long the vehicle can drive safely on the opposite side | |
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) | |
bool | continueChangeSublane (MSVehicle *vehicle, ChangerIt &from) |
Continue a sublane-lane change maneuver and return whether the midpoint was passed in this step. | |
ChangerIt | findCandidate () |
Find current candidate. If there is none, myChanger.end() is returned. | |
MSLeaderDistanceInfo | getLeaders (const ChangerIt &target, const MSVehicle *ego) const |
get leaders for ego on the given lane | |
std::pair< MSVehicle *const, double > | getOncomingOppositeVehicle (const MSVehicle *vehicle, std::pair< MSVehicle *, double > overtaken, double searchDist) |
std::pair< MSVehicle *const, double > | getOncomingVehicle (const MSLane *opposite, std::pair< MSVehicle *, double > neighOncoming, double searchDist, double &vMax, const MSVehicle *overtaken=nullptr, MSLane::MinorLinkMode mLinkMode=MSLane::MinorLinkMode::FOLLOW_NEVER) |
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. | |
bool | mayChange (int direction) const |
whether changing to the lane in the given direction should be considered | |
void | outputLCEnded (MSVehicle *vehicle, ChangerIt &from, ChangerIt &to, int direction) |
optional output for end of lane-change maneuvre | |
void | outputLCStarted (MSVehicle *vehicle, ChangerIt &from, ChangerIt &to, int direction, double maneuverDist) |
optional output for start of lane-change maneuvre | |
void | registerUnchanged (MSVehicle *vehicle) |
bool | resolveDeadlock (MSVehicle *vehicle, std::pair< MSVehicle *const, double > leader, std::pair< MSVehicle *, double > neighLead, std::pair< MSVehicle *, double > overtaken) |
keep stopping to resolve opposite-diretion deadlock while there is oncoming traffic The method may call saveBlockerLength to affect vehicle speed in the next step | |
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 | |
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. | |
bool | yieldToDeadlockOncoming (const MSVehicle *vehicle, const MSVehicle *stoppedNeigh, double dist) |
check whether to keep stopping for oncoming vehicles in the deadlock zone | |
bool | yieldToOppositeWaiting (const MSVehicle *vehicle, const MSVehicle *stoppedNeigh, double dist, SUMOTime deltaWait=0) |
check whether to yield for oncoming vehicles that have waited longer for opposite overtaking | |
Static Protected Member Functions | |
static void | computeOvertakingTime (const MSVehicle *vehicle, double vMax, const MSVehicle *leader, double gap, double &timeToOvertake, double &spaceToOvertake) |
Compute the time and space required for overtaking the given leader. | |
static double | computeSurplusGap (const MSVehicle *vehicle, const MSLane *opposite, std::pair< MSVehicle *, double > oncoming, double timeToOvertake, double spaceToOvertake, double &oncomingSpeed, bool oncomingOpposite=false) |
static std::pair< MSVehicle *, double > | findClosestLeader (const MSLeaderDistanceInfo &leaders, const MSVehicle *vehicle) |
find the closest leader that prevents ego vehicle from passing on the current lane | |
static bool | foundHilltop (MSVehicle *vehicle, bool foundHill, double searchDist, const std::vector< MSLane * > &bestLanes, int view, double pos, double lastMax, double hilltopThreshold) |
static std::vector< MSVehicle::LaneQ > | getBestLanesOpposite (MSVehicle *vehicle, const MSLane *stopLane, double oppositeLength) |
add LaneQ for opposite lanes | |
static MSVehicle * | getCloserFollower (const double maxPos, MSVehicle *follow1, MSVehicle *follow2) |
return the closer follower of ego | |
static std::pair< MSVehicle *, double > | getColumnleader (double &maxSpace, MSVehicle *vehicle, std::pair< MSVehicle *, double > leader, double maxLookAhead=std::numeric_limits< double >::max()) |
return leader vehicle that is to be overtaken | |
static const MSLane * | getLaneAfter (const MSLane *lane, const std::vector< MSLane * > &conts, bool allowMinor, bool &contsEnd) |
return the next lane in conts beyond lane or nullptr | |
static double | getMaxOvertakingSpeed (const MSVehicle *vehicle, double maxSpaceToOvertake) |
compute maximum maneuver speed | |
static bool | hasOppositeStop (MSVehicle *vehicle) |
whether vehicle has an opposite-direction stop within relevant range | |
Protected Attributes | |
const bool | myAllowsChanging |
ChangerIt | myCandi |
Changer | myChanger |
Container for ChangeElemements, one for every lane in the edge. | |
const bool | myChangeToOpposite |
whether this edge allows changing to the opposite direction edge | |
bool | myCheckedChangeOpposite |
whether checkChangeOpposite was called for the current vehicle | |
Private Member Functions | |
MSLaneChangerSublane () | |
Default constructor. | |
MSLaneChangerSublane (const MSLaneChangerSublane &) | |
Copy constructor. | |
MSLaneChangerSublane & | operator= (const MSLaneChangerSublane &) |
Assignment operator. | |
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 108 of file MSLaneChanger.h.
|
inherited |
the iterator moving over the ChangeElems
Definition at line 111 of file MSLaneChanger.h.
|
inherited |
the iterator moving over the ChangeElems
Definition at line 114 of file MSLaneChanger.h.
|
protected |
Definition at line 103 of file MSLaneChangerSublane.h.
MSLaneChangerSublane::MSLaneChangerSublane | ( | const std::vector< MSLane * > * | lanes, |
bool | allowChanging | ||
) |
Constructor.
Definition at line 54 of file MSLaneChangerSublane.cpp.
References MSLaneChanger::myChanger.
MSLaneChangerSublane::~MSLaneChangerSublane | ( | ) |
Destructor.
Definition at line 70 of file MSLaneChangerSublane.cpp.
|
private |
Default constructor.
|
private |
Copy constructor.
|
protected |
immediately stop lane-changing and register vehicle as unchanged
Definition at line 261 of file MSLaneChangerSublane.cpp.
References MSVehicle::computeAngle(), DEBUG_COND, Named::getID(), MSVehicle::getLaneChangeModel(), MSAbstractLaneChangeModel::getOwnState(), MSAbstractLaneChangeModel::getPreviousManeuverDist(), MSAbstractLaneChangeModel::getPrevState(), MSAbstractLaneChangeModel::getSpeedLat(), LCA_CHANGE_REASONS, MSLaneChanger::myCandi, outputLCEnded(), MSVehicle::setAngle(), MSAbstractLaneChangeModel::setManeuverDist(), MSAbstractLaneChangeModel::setSpeedLat(), SIMTIME, toString(), and MSAbstractLaneChangeModel::updateTargetLane().
Referenced by change(), and startChangeSublane().
|
protected |
Definition at line 876 of file MSLaneChangerSublane.cpp.
References MSLeaderDistanceInfo::addLeader(), DEBUG_COND, MSLane::getEdge(), Named::getID(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicle::getLeftSideOnLane(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getRightSideOnLane(), MSAbstractLaneChangeModel::getShadowLane(), MSBaseVehicle::getVehicleType(), MSEdge::getWidth(), MSLane::getWidth(), MSGlobals::gLateralResolution, MAX2(), MIN2(), MSLane::myTmpVehicles, MSLeaderInfo::setSublaneOffset(), SIMTIME, and MSLeaderDistanceInfo::toString().
Referenced by checkChangeSublane().
|
protectedinherited |
Execute TraCI LC-commands.
Definition at line 425 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().
|
protectedinherited |
avoid opposite-diretion deadlock when vehicles are stopped on both sides of the road The method may call saveBlockerLength to affect vehicle speed in the next step
Definition at line 1630 of file MSLaneChanger.cpp.
References DEBUG_COND, MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), MSVehicle::getBrakeGap(), Named::getID(), Named::getIDSecure(), MSLane::getIndex(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicleType::getLengthWithGap(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getVehicleType(), MSBaseVehicle::getWaitingSeconds(), MSAbstractLaneChangeModel::isOpposite(), MAX2(), OPPOSITE_OVERTAKING_DEADLOCK_WAIT, MSAbstractLaneChangeModel::saveBlockerLength(), SIMTIME, and MSLaneChanger::yieldToDeadlockOncoming().
Referenced by MSLaneChanger::changeOpposite().
|
protectedvirtual |
Find a new candidate and try to change it.
myAllowsChanging
Reimplemented from MSLaneChanger.
Definition at line 114 of file MSLaneChangerSublane.cpp.
References abortLCManeuver(), MSVehicle::adaptBestLanesOccupation(), MSAbstractLaneChangeModel::alreadyChanged(), MSLaneChanger::changeOpposite(), checkChangeHelper(), MSLaneChanger::checkTraCICommands(), MSAbstractLaneChangeModel::clearNeighbors(), continueChangeSublane(), DEBUG_COND, MSAbstractLaneChangeModel::debugVehicle(), MSAbstractLaneChangeModel::decideDirection(), MSAbstractLaneChangeModel::StateAndDist::dir, MSLaneChanger::findCandidate(), findClosestLeader(), Named::getID(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), getLeaders(), MSAbstractLaneChangeModel::getManeuverDist(), MSAbstractLaneChangeModel::getSpeedLat(), MSBaseVehicle::getVClass(), MSLaneChanger::hasOppositeStop(), MSLeaderInfo::hasVehicles(), MSVehicle::influenceChangeDecision(), MSVehicle::isActive(), MSAbstractLaneChangeModel::isChangingLanes(), MSAbstractLaneChangeModel::isOpposite(), 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::myChangeToOpposite, myCheckedChangeOpposite, MSLaneChanger::registerUnchanged(), MSAbstractLaneChangeModel::setOwnState(), SIMTIME, startChangeSublane(), MSAbstractLaneChangeModel::StateAndDist::state, SVC_EMERGENCY, toString(), MSVehicle::updateBestLanes(), MSAbstractLaneChangeModel::updateExpectedSublaneSpeeds(), and MSLaneChanger::veh().
|
protectedinherited |
try changing to the opposite direction edge.
Definition at line 1189 of file MSLaneChanger.cpp.
References MSLane::allowsChangingLeft(), MSLane::allowsVehicleClass(), MSLaneChanger::avoidDeadlock(), MSLaneChanger::checkChangeOpposite(), MSLaneChanger::checkOppositeStop(), MSLaneChanger::computeOvertakingTime(), MSLaneChanger::computeSafeOppositeLength(), MSLaneChanger::computeSurplusGap(), DEBUG_COND, MSLane::FOLLOW_ONCOMING, MSLaneChanger::foundHilltop(), gDebugFlag5, MSVehicle::getBackPositionOnLane(), MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), MSLaneChanger::getBestLanesOpposite(), MSLaneChanger::getColumnleader(), MSLink::getDirection(), Named::getID(), Named::getIDSecure(), MSVehicle::getInfluencer(), MSNet::getInstance(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicle::Influencer::getLaneTimeLineDuration(), MSLane::getLeader(), MSLane::getLength(), MSVehicleType::getLength(), MSLane::getLinkTo(), MSLaneChanger::getMaxOvertakingSpeed(), MSVehicleType::getMinGap(), MSVehicle::getMutableLane(), MSLaneChanger::getOncomingOppositeVehicle(), MSLaneChanger::getOncomingVehicle(), MSLane::getOpposite(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), MSAbstractLaneChangeModel::getOppositeSafetyFactor(), MSLane::getParallelLane(), MSVehicle::getPosition(), MSVehicle::getPositionOnLane(), MSVehicle::Influencer::getRespectJunctionPriority(), MSVehicle::getSlope(), MSLane::getSpeedLimit(), MSLink::getState(), MSBaseVehicle::getVClass(), MSVehicleType::getVehicleClass(), MSLane::getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), MSLink::getViaLaneOrLane(), MSBaseVehicle::getWaitingSeconds(), MSGlobals::gLefthand, MSNet::hasElevation(), MSVehicle::hasInfluencer(), MSLaneChanger::hasOppositeStop(), MSLink::havePriority(), MSLink::haveRed(), MSLink::haveYellow(), MSVehicle::ignoreRed(), MSVehicle::influenceChangeDecision(), MSLane::isInternal(), MSAbstractLaneChangeModel::isOpposite(), MSBaseVehicle::isStopped(), LCA_LEFT, LCA_TRACI, LINKSTATE_ZIPPER, MAX2(), MIN2(), MSLaneChanger::myChangeToOpposite, MSVehicle::nextStopDist(), OPPOSITE_OVERTAKING_DEADLOCK_WAIT, OPPOSITE_OVERTAKING_HILLTOP_THRESHOHOLD, OPPOSITE_OVERTAKING_MAX_SPACE_TO_OVERTAKE, OPPOSITE_OVERTAKING_ONCOMING_LOOKAHEAD, MSLaneChanger::resolveDeadlock(), SIMTIME, STEPS2TIME, STRAIGHT, SVC_EMERGENCY, TIME2STEPS, toString(), TS, MSVehicle::VEH_SIGNAL_BLINKER_LEFT, MSVehicle::VEH_SIGNAL_BLINKER_RIGHT, MSLaneChanger::yieldToOppositeWaiting(), and Position::z().
Referenced by MSLaneChanger::change(), and change().
|
protectedinherited |
Definition at line 744 of file MSLaneChanger.cpp.
References ACCEL2SPEED, MSCFModel::brakeGap(), MSAbstractLaneChangeModel::checkChangeBeforeCommitting(), 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(), MSAbstractLaneChangeModel::isOpposite(), 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_URGENT, 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::checkChangeOpposite(), and MSLaneChanger::checkChangeWithinEdge().
|
protected |
helper function that calls checkChangeSublane and sets blocker information
Definition at line 293 of file MSLaneChangerSublane.cpp.
References checkChangeSublane(), MSAbstractLaneChangeModel::StateAndDist::dir, MSVehicle::getBestLanes(), MSLaneChanger::getBestLanesOpposite(), MSVehicle::getLaneChangeModel(), MSAbstractLaneChangeModel::isOpposite(), MSAbstractLaneChangeModel::StateAndDist::latDist, LCA_BLOCKED, LCA_URGENT, LCA_WANTS_LANECHANGE, MSAbstractLaneChangeModel::StateAndDist::maneuverDist, MSLaneChanger::mayChange(), MSLaneChanger::myCandi, and MSAbstractLaneChangeModel::StateAndDist::state.
Referenced by change().
|
protectedvirtual |
Reimplemented from MSLaneChanger.
Definition at line 750 of file MSLaneChangerSublane.cpp.
References MSLane::addLeaders(), DEBUG_COND, MSLeaderDistanceInfo::fixOppositeGaps(), MSLane::FOLLOW_ONCOMING, MSVehicle::getBackPositionOnLane(), MSLane::getEdge(), MSLane::getFollowersOnConsecutive(), Named::getID(), MSLane::getIndex(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSEdge::getLanes(), MSVehicleType::getLength(), MSLane::getOppositePos(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getVehicleType(), MSLane::getWidth(), MSVehicle::influenceChangeDecision(), MSAbstractLaneChangeModel::isOpposite(), LCA_BLOCKED, LCA_LEFT, LCA_NONE, LCA_RIGHT, LCA_WANTS_LANECHANGE, MSLaneChanger::mayChange(), MSLaneChanger::myCandi, myCheckedChangeOpposite, MSLeaderInfo::numSublanes(), MSLeaderDistanceInfo::patchGaps(), MSAbstractLaneChangeModel::saveLCState(), MSAbstractLaneChangeModel::saveNeighbors(), MSAbstractLaneChangeModel::setOwnState(), MSAbstractLaneChangeModel::setSpeedLat(), SIMTIME, startChangeSublane(), MSLeaderDistanceInfo::toString(), toString(), UNUSED_PARAMETER, MSAbstractLaneChangeModel::updateExpectedSublaneSpeeds(), and MSAbstractLaneChangeModel::wantsChangeSublane().
|
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 645 of file MSLaneChangerSublane.cpp.
References MSLeaderDistanceInfo::addLeaders(), addOutsideLeaders(), DEBUG_COND, MSVehicle::getBackPositionOnLane(), MSAbstractLaneChangeModel::getCanceledState(), Named::getID(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSLane::getRightSideOnEdge(), MSLane::getWidth(), MSLeaderInfo::hasVehicles(), MSVehicle::influenceChangeDecision(), MSLeaderDistanceInfo::moveSamePosTo(), 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 522 of file MSLaneChangerSublane.cpp.
References MSVehicle::getBackPositionOnLane(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicle::getLateralPositionOnLane(), getLeaders(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSLane::getWidth(), MSAbstractLaneChangeModel::haveLCOutput(), MSVehicle::isActive(), MSAbstractLaneChangeModel::isOpposite(), MSLaneChanger::mayChange(), MSVehicle::State::myPosLat, MSVehicle::myState, MSAbstractLaneChangeModel::setFollowerGaps(), MSAbstractLaneChangeModel::setLeaderGaps(), MSAbstractLaneChangeModel::setOrigLeaderGaps(), and MSAbstractLaneChangeModel::startLaneChangeManeuver().
Referenced by startChangeSublane().
|
protectedinherited |
Definition at line 726 of file MSLaneChanger.cpp.
References MSLaneChanger::checkChange(), MSLaneChanger::getRealFollower(), MSLaneChanger::getRealLeader(), and MSLaneChanger::myCandi.
Referenced by MSLaneChanger::change().
|
protectedinherited |
decide whether to change (back or forth) for an opposite stop
Definition at line 1095 of file MSLaneChanger.cpp.
References MSLaneChanger::checkChangeOpposite(), MSLaneChanger::computeSurplusGap(), DEBUG_COND, MSLaneChanger::getBestLanesOpposite(), MSVehicle::getCarFollowModel(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSCFModel::getMaxAccel(), MSVehicleType::getMaxSpeedLat(), MSBaseVehicle::getNextStop(), MSAbstractLaneChangeModel::getNormalizedLaneIndex(), MSLaneChanger::getOncomingVehicle(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSVehicle::getSpeed(), MSLane::getSpeedLimit(), MSLane::getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), MSGlobals::gLaneChangeDuration, MSGlobals::gLateralResolution, MSAbstractLaneChangeModel::isOpposite(), MSStop::lane, MAX2(), MSVehicle::nextStopDist(), OPPOSITE_OVERTAKING_MAX_LOOKAHEAD, OPPOSITE_OVERTAKING_ONCOMING_LOOKAHEAD, STEPS2TIME, and SUMO_const_laneWidth.
Referenced by MSLaneChanger::changeOpposite().
|
protectedinherited |
Take into account traci LC-commands.
Definition at line 404 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 2196 of file MSLaneChanger.cpp.
References DEBUG_COND, MSVehicle::getAcceleration(), MSVehicle::getCarFollowModel(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicleType::getLength(), MSVehicleType::getLengthWithGap(), MSCFModel::getMaxAccel(), MSCFModel::getMaxDecel(), MSVehicleType::getMaxSpeedLat(), MSVehicleType::getMinGap(), MSAbstractLaneChangeModel::getOppositeSafetyFactor(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSBaseVehicle::getStopDuration(), MSLane::getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), MSLane::getWidth(), MSGlobals::gSublane, MAX2(), OPPOSITE_OVERTAKING_SAFE_TIMEGAP, OPPOSITE_OVERTAKING_SAFETY_FACTOR, STEPS2TIME, and TS.
Referenced by MSLaneChanger::changeOpposite().
|
protectedinherited |
determine for how long the vehicle can drive safely on the opposite side
Definition at line 1871 of file MSLaneChanger.cpp.
References MSCFModel::brakeGap(), DEBUG_COND, MSVehicle::getCarFollowModel(), Named::getID(), MSVehicle::getLaneChangeModel(), MSCFModel::getMaxDecel(), MSLane::getOppositeFollower(), MSLane::getOppositePos(), MSVehicle::getPositionOnLane(), MSAbstractLaneChangeModel::getShadowLane(), MSVehicle::getSpeed(), MSAbstractLaneChangeModel::isOpposite(), MSBaseVehicle::isStopped(), MAX2(), MIN2(), MSVehicle::nextStopDist(), SIMTIME, TIME2STEPS, and MSLaneChanger::yieldToOppositeWaiting().
Referenced by MSLaneChanger::changeOpposite().
|
staticprotectedinherited |
Definition at line 2067 of file MSLaneChanger.cpp.
References DEBUG_COND, MSVehicle::getCarFollowModel(), MSCFModel::getHeadwayTime(), Named::getID(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSAbstractLaneChangeModel::getShadowLane(), MSLane::getVehicleMaxSpeed(), MSBaseVehicle::getWaitingSeconds(), MSAbstractLaneChangeModel::isOpposite(), MSBaseVehicle::isStopped(), OPPOSITE_OVERTAKING_DEADLOCK_WAIT, OPPOSITE_OVERTAKING_SAFETYGAP_HEADWAY_FACTOR, and SIMTIME.
Referenced by MSLaneChanger::changeOpposite(), and MSLaneChanger::checkOppositeStop().
continue a lane change maneuver and return whether the vehicle has completely moved onto the new lane (used if gLaneChangeDuration > 0)
Definition at line 467 of file MSLaneChanger.cpp.
References MSVehicle::computeAngle(), DEBUG_COND, MSAbstractLaneChangeModel::endLaneChangeManeuver(), MSLane::getEdge(), Named::getID(), Named::getIDSecure(), MSLane::getIndex(), MSVehicle::getLane(), MSAbstractLaneChangeModel::getLaneChangeCompletion(), MSAbstractLaneChangeModel::getLaneChangeDirection(), MSVehicle::getLaneChangeModel(), MSVehicle::getLateralPositionOnLane(), MSLane::getParallelLane(), MSAbstractLaneChangeModel::getShadowLane(), MSAbstractLaneChangeModel::getSpeedLat(), MSLane::getWidth(), Position::INVALID, MSAbstractLaneChangeModel::isChangingLanes(), MSAbstractLaneChangeModel::isOpposite(), M_PI, MSVehicle::myAngle, MSVehicle::myCachedPosition, MSLaneChanger::myCandi, MSLaneChanger::myChanger, MSVehicle::State::myPosLat, MSVehicle::myState, MSAbstractLaneChangeModel::primaryLaneChanged(), MSLane::requireCollisionCheck(), SIMTIME, SPEED2DIST, MSAbstractLaneChangeModel::updateCompletion(), and MSAbstractLaneChangeModel::updateShadowLane().
Referenced by MSLaneChanger::applyTraCICommands(), MSLaneChanger::change(), MSLaneChanger::checkChangeOpposite(), and MSLaneChanger::startChange().
|
protected |
Continue a sublane-lane change maneuver and return whether the midpoint was passed in this step.
Definition at line 318 of file MSLaneChangerSublane.cpp.
References MSAbstractLaneChangeModel::computeSpeedLat(), DEBUG_COND, Named::getID(), MSVehicle::getLaneChangeModel(), MSAbstractLaneChangeModel::getManeuverDist(), MSAbstractLaneChangeModel::getOwnState(), LCA_URGENT, SIMTIME, SPEED2DIST, and startChangeSublane().
Referenced by change().
|
protectedinherited |
Find current candidate. If there is none, myChanger.end() is returned.
Definition at line 217 of file MSLaneChanger.cpp.
References Named::getID(), MSVehicle::getPositionOnLane(), MSVehicle::isFrontOnLane(), MSLaneChanger::myChanger, SIMTIME, and MSLaneChanger::veh().
Referenced by MSLaneChanger::change(), and change().
|
staticprotected |
find the closest leader that prevents ego vehicle from passing on the current lane
Definition at line 856 of file MSLaneChangerSublane.cpp.
References MSVehicle::getLane(), MSVehicleType::getMinGapLat(), MSBaseVehicle::getVehicleType(), MSLane::getWidth(), MSVehicleType::getWidth(), and MSLeaderInfo::numSublanes().
Referenced by change().
|
staticprotectedinherited |
Definition at line 2101 of file MSLaneChanger.cpp.
References DEBUG_COND, MSLaneChanger::foundHilltop(), Named::getID(), MSLane::getShape(), MSLane::interpolateGeometryPosToLanePos(), and SIMTIME.
Referenced by MSLaneChanger::changeOpposite(), and MSLaneChanger::foundHilltop().
|
staticprotectedinherited |
add LaneQ for opposite lanes
Definition at line 1151 of file MSLaneChanger.cpp.
References DEBUG_COND, MSVehicle::getBestLanes(), MSLane::getEdge(), MSAbstractLaneChangeModel::getForwardPos(), Named::getID(), MSLane::getIndex(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSEdge::getLanes(), MSEdge::getNormalSuccessor(), MSEdge::getNumLanes(), MSEdge::getOppositeEdge(), MSAbstractLaneChangeModel::isOpposite(), MSVehicle::nextStopDist(), and SIMTIME.
Referenced by MSLaneChanger::changeOpposite(), checkChangeHelper(), and MSLaneChanger::checkOppositeStop().
|
inlineinherited |
return changer (only to be used by MSLaneChangerSublane from another instance)
Definition at line 117 of file MSLaneChanger.h.
References MSLaneChanger::myChanger.
Referenced by startChangeSublane().
|
staticprotectedinherited |
return the closer follower of ego
Definition at line 711 of file MSLaneChanger.cpp.
References MSVehicle::getPositionOnLane().
Referenced by MSLaneChanger::getRealFollower().
|
staticprotectedinherited |
return leader vehicle that is to be overtaken
[out] | maxSpace | The maxium space that can be used for the overtaking maneuver (limits speed) |
[in] | vehicle | The vehicle that wants to overtake |
[in] | leader | The vehicle to be overtaken and the gap to this vehicle |
[in] | maxLookAhead | The maximum lookahead distance |
This methods calls itself recursively to find the leader of a column of vehicles to be overtaken (if there is no sufficient gap for stopping in between)
Definition at line 2319 of file MSLaneChanger.cpp.
References MSCFModel::brakeGap(), DEBUG_COND, MSVehicle::getBackPositionOnLane(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), MSLaneChanger::getColumnleader(), 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, SVC_EMERGENCY, and toString().
Referenced by MSLaneChanger::changeOpposite(), and MSLaneChanger::getColumnleader().
|
staticprotectedinherited |
return the next lane in conts beyond lane or nullptr
Definition at line 2508 of file MSLaneChanger.cpp.
References MSLane::getLinkTo(), and MSLink::havePriority().
Referenced by MSLaneChanger::getColumnleader().
|
protected |
get leaders for ego on the given lane
Definition at line 597 of file MSLaneChangerSublane.cpp.
References MSLeaderDistanceInfo::addLeader(), DEBUG_COND, MSVehicle::getBackPositionOnLane(), Named::getID(), MSVehicle::getLane(), MSVehicle::getLeftSideOnLane(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getRightSideOnLane(), MSBaseVehicle::getVehicleType(), MSGlobals::gLateralResolution, MSLeaderInfo::numSublanes(), MSLeaderInfo::setSublaneOffset(), SIMTIME, MSLeaderDistanceInfo::toString(), toString(), and MSLaneChanger::veh().
Referenced by change(), and checkChangeToNewLane().
|
staticprotectedinherited |
compute maximum maneuver speed
Definition at line 2529 of file MSLaneChanger.cpp.
References MSVehicle::getCarFollowModel(), MSCFModel::getMaxAccel(), and MSCFModel::getMaxDecel().
Referenced by MSLaneChanger::changeOpposite().
|
protectedinherited |
Definition at line 2022 of file MSLaneChanger.cpp.
References gDebugFlag5, MSVehicle::getBestLanesContinuation(), Named::getID(), Named::getIDSecure(), MSVehicle::getLane(), MSLane::getLeader(), MSVehicleType::getLengthWithGap(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getVehicleType(), and SIMTIME.
Referenced by MSLaneChanger::changeOpposite(), and MSLaneChanger::resolveDeadlock().
|
protectedinherited |
Definition at line 1983 of file MSLaneChanger.cpp.
References gDebugFlag5, MSLane::getFollower(), MAX2(), MIN2(), and SIMTIME.
Referenced by MSLaneChanger::changeOpposite(), and MSLaneChanger::checkOppositeStop().
|
protectedinherited |
Definition at line 633 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 524 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().
|
staticprotectedinherited |
whether vehicle has an opposite-direction stop within relevant range
Definition at line 1083 of file MSLaneChanger.cpp.
References MSBaseVehicle::getNextStop(), MSBaseVehicle::hasStops(), MSStop::isOpposite, MSVehicle::nextStopDist(), and OPPOSITE_OVERTAKING_MAX_LOOKAHEAD.
Referenced by MSLaneChanger::change(), change(), and MSLaneChanger::changeOpposite().
|
protectedvirtual |
Initialize the changer before looping over all vehicles.
Reimplemented from MSLaneChanger.
Definition at line 73 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 141 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 256 of file MSLaneChanger.cpp.
References MSBaseVehicle::getVClass(), MSLaneChanger::myAllowsChanging, MSLaneChanger::myCandi, and MSLaneChanger::veh().
Referenced by MSLaneChanger::change(), change(), checkChangeHelper(), checkChangeOpposite(), checkChangeToNewLane(), and startChangeSublane().
|
private |
Assignment operator.
|
protected |
optional output for end of lane-change maneuvre
Definition at line 584 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 556 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 394 of file MSLaneChanger.cpp.
References MSVehicle::getLaneChangeModel(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSLaneChanger::myCandi, MSAbstractLaneChangeModel::unchanged(), and MSLaneChanger::veh().
Referenced by MSLaneChanger::change(), change(), and MSLaneChanger::startChange().
|
protectedinherited |
keep stopping to resolve opposite-diretion deadlock while there is oncoming traffic The method may call saveBlockerLength to affect vehicle speed in the next step
Definition at line 1799 of file MSLaneChanger.cpp.
References DEBUG_COND, MSVehicle::getBestLanes(), Named::getID(), Named::getIDSecure(), MSLane::getIndex(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicleType::getLengthWithGap(), MSVehicleType::getMinGap(), MSLaneChanger::getOncomingOppositeVehicle(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getVehicleType(), MSBaseVehicle::getWaitingSeconds(), OPPOSITE_OVERTAKING_DEADLOCK_WAIT, MSAbstractLaneChangeModel::saveBlockerLength(), SIMTIME, UNUSED_PARAMETER, and MSLaneChanger::yieldToDeadlockOncoming().
Referenced by MSLaneChanger::changeOpposite().
|
protectedinherited |
Definition at line 447 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 340 of file MSLaneChangerSublane.cpp.
References abortLCManeuver(), checkChangeToNewLane(), MSVehicle::computeAngle(), DEBUG_COND, DELTA_T, DIST2SPEED, MSVehicle::getActionStepLength(), MSVehicle::getActionStepLengthSecs(), MSVehicle::getAngle(), MSLaneChanger::getChanger(), MSAbstractLaneChangeModel::getCommittedSpeed(), MSLane::getEdge(), Named::getID(), Named::getIDSecure(), MSLane::getIndex(), MSVehicle::getInfluencer(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicle::getLateralPositionOnLane(), MSVehicle::getLatOffset(), MSAbstractLaneChangeModel::getManeuverDist(), MSVehicleType::getMaxSpeedLat(), MSLane::getOpposite(), MSAbstractLaneChangeModel::getOwnState(), MSAbstractLaneChangeModel::getPreviousManeuverDist(), MSAbstractLaneChangeModel::getPrevState(), MSLane::getRightSideOnEdge(), MSAbstractLaneChangeModel::getShadowLane(), MSBaseVehicle::getVehicleType(), MSBaseVehicle::getWidth(), MSLane::getWidth(), Position::INVALID, MSAbstractLaneChangeModel::isOpposite(), MSVehicle::isRemoteControlled(), LCA_CHANGE_REASONS, LCA_TRACI, M_PI, MSLaneChanger::mayChange(), MSVehicle::myCachedPosition, MSLaneChanger::myChanger, MSVehicle::myFurtherLanesPosLat, MSEdge::myLaneChanger, MSVehicle::State::myPosLat, MSVehicle::myState, outputLCEnded(), outputLCStarted(), RAD2DEG, MSVehicle::setAngle(), MSAbstractLaneChangeModel::setManeuverDist(), MSAbstractLaneChangeModel::setSpeedLat(), MSVehicle::Influencer::setSublaneChange(), SIMTIME, std::swap(), toString(), MSAbstractLaneChangeModel::updateSafeLatDist(), MSAbstractLaneChangeModel::updateShadowLane(), and MSAbstractLaneChangeModel::updateTargetLane().
Referenced by change(), checkChangeOpposite(), and continueChangeSublane().
|
protectedvirtual |
After the possible change, update the changer.
Reimplemented from MSLaneChanger.
Definition at line 88 of file MSLaneChangerSublane.cpp.
References MSLane::getEdge(), MSLane::getIndex(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicle::getLeftSideOnLane(), MSLane::getRightSideOnEdge(), MSVehicle::getRightSideOnLane(), 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 199 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 141 of file MSLaneChanger.h.
Referenced by MSLaneChanger::change(), change(), 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 128 of file MSLaneChanger.h.
References MSLaneChanger::myChanger, and MSLaneChanger::veh().
Referenced by MSLaneChanger::laneChange().
|
protectedinherited |
check whether to keep stopping for oncoming vehicles in the deadlock zone
Definition at line 1748 of file MSLaneChanger.cpp.
References DEBUG_COND, MSVehicle::getFollower(), Named::getID(), Named::getIDSecure(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSBaseVehicle::getWaitingSeconds(), OPPOSITE_OVERTAKING_DEADLOCK_WAIT, and SIMTIME.
Referenced by MSLaneChanger::avoidDeadlock(), and MSLaneChanger::resolveDeadlock().
|
protectedinherited |
check whether to yield for oncoming vehicles that have waited longer for opposite overtaking
Definition at line 1776 of file MSLaneChanger.cpp.
References DEBUG_COND, MSVehicle::getFollower(), Named::getID(), MSBaseVehicle::getWaitingSeconds(), MSVehicle::getWaitingTime(), SIMTIME, and STEPS2TIME.
Referenced by MSLaneChanger::changeOpposite(), and MSLaneChanger::computeSafeOppositeLength().
|
protectedinherited |
Definition at line 320 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 316 of file MSLaneChanger.h.
Referenced by abortLCManeuver(), MSLaneChanger::applyTraCICommands(), MSLaneChanger::change(), change(), MSLaneChanger::checkChange(), checkChangeHelper(), MSLaneChanger::checkChangeOpposite(), checkChangeOpposite(), checkChangeSublane(), MSLaneChanger::checkChangeWithinEdge(), MSLaneChanger::continueChange(), 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 311 of file MSLaneChanger.h.
Referenced by MSLaneChanger::change(), change(), MSLaneChanger::continueChange(), MSLaneChanger::findCandidate(), MSLaneChanger::getChanger(), 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 323 of file MSLaneChanger.h.
Referenced by change(), and MSLaneChanger::changeOpposite().
|
protected |
whether checkChangeOpposite was called for the current vehicle
Definition at line 118 of file MSLaneChangerSublane.h.
Referenced by change(), and checkChangeOpposite().