SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSLink Class Reference

#include <MSLink.h>

Collaboration diagram for MSLink:
Collaboration graph

Data Structures

struct  ApproachingVehicleInformation
 A structure holding the information about vehicles approaching a link. More...
 
struct  LinkLeader
 

Public Types

typedef std::vector< LinkLeaderLinkLeaders
 

Public Member Functions

void addBlockedLink (MSLink *link)
 
bool blockedAtTime (SUMOTime arrivalTime, SUMOTime leaveTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed, bool sameTargetLane, SUMOReal impatience, SUMOReal decel, SUMOTime waitingTime, std::vector< const SUMOVehicle * > *collectFoes=0) const
 Returns the information whether this link is blocked Valid after the vehicles have set their requests. More...
 
bool fromInternalLane () const
 return whether the fromLane of this link is an internal lane More...
 
ApproachingVehicleInformation getApproaching (const SUMOVehicle *veh) const
 
const std::map< const
SUMOVehicle
*, ApproachingVehicleInformation > & 
getApproaching () const
 return all approaching vehicles More...
 
MSLanegetApproachingLane () const
 Returns the lane leading to this link. More...
 
LinkDirection getDirection () const
 Returns the direction the vehicle passing this link take. More...
 
const std::vector< const
MSLane * > & 
getFoeLanes ()
 
SUMOReal getFoeVisibilityDistance () const
 Returns the distance on the approaching lane from which an approaching vehicle is able to see all relevant foes and may accelerate if the link is minor and no foe is approaching. More...
 
int getIndex () const
 Returns the respond index (for visualization) More...
 
const MSLanegetInternalLaneBefore () const
 return myInternalLaneBefore (always 0 when compiled without internal lanes) More...
 
SUMOReal getInternalLengthsAfter () const
 Returns the cumulative length of all internal lanes after this link. More...
 
MSJunctiongetJunction () const
 
MSLanegetLane () const
 Returns the connected lane. More...
 
const MSLanegetLaneBefore () const
 return the internalLaneBefore if it exists and the laneBefore otherwise More...
 
SUMOTime getLastStateChange () const
 
SUMOTime getLeaveTime (const SUMOTime arrivalTime, const SUMOReal arrivalSpeed, const SUMOReal leaveSpeed, const SUMOReal vehicleLength) const
 return the expected time at which the given vehicle will clear the link More...
 
SUMOReal getLength () const
 Returns the length of this link. More...
 
SUMOTime getMesoTLSPenalty () const
 Returns the time penalty for passing a tls-controlled link (meso) More...
 
MSLinkgetParallelLink (int direction) const
 return the link that is parallel to this lane or 0 More...
 
LinkState getState () const
 Returns the current state of the link. More...
 
int getTLIndex () const
 Returns the TLS index. More...
 
const MSTrafficLightLogicgetTLLogic () const
 Returns the TLS index. More...
 
MSLanegetViaLaneOrLane () const
 return the via lane if it exists and the lane otherwise More...
 
SUMOReal getZipperSpeed (const MSVehicle *ego, const SUMOReal dist, SUMOReal vSafe, SUMOTime arrivalTime, std::vector< const SUMOVehicle * > *collectFoes) const
 return the speed at which ego vehicle must approach the zipper link More...
 
bool hasApproachingFoe (SUMOTime arrivalTime, SUMOTime leaveTime, SUMOReal speed, SUMOReal decel) const
 Returns the information whether a vehicle is approaching on one of the link's foe streams. More...
 
bool hasFoes () const
 Returns whether this link belongs to a junction where more than one edge is incoming. More...
 
bool havePriority () const
 Returns whether this link is a major link. More...
 
bool haveRed () const
 Returns whether this link is blocked by a red (or redyellow) traffic light. More...
 
void initParallelLinks ()
 initialize parallel links (to be called after all links are loaded) More...
 
bool isBlockingAnyone () const
 
bool isCont () const
 
bool isExitLink () const
 return whether the fromLane of this link is an internal lane and toLane is a normal lane More...
 
bool isInternalJunctionLink () const
 return whether the fromLane and the toLane of this link are internal lanes More...
 
bool isLeader (const MSVehicle *ego, const MSVehicle *foe)
 
bool isTLSControlled () const
 
bool keepClear () const
 whether the junction after this link must be kept clear More...
 
bool lastWasContMajor () const
 whether this is a link past an internal junction which currently has priority More...
 
 MSLink (MSLane *predLane, MSLane *succLane, LinkDirection dir, LinkState state, SUMOReal length, SUMOReal foeVisibilityDistance, bool keepClear, MSTrafficLightLogic *logic, int tlLinkIdx)
 Constructor for simulation not using internal lanes. More...
 
bool opened (SUMOTime arrivalTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed, SUMOReal vehicleLength, SUMOReal impatience, SUMOReal decel, SUMOTime waitingTime, SUMOReal posLat=0, std::vector< const SUMOVehicle * > *collectFoes=0) const
 Returns the information whether the link may be passed. More...
 
void passedJunction (const MSVehicle *vehicle)
 erase vehicle from myLinkLeaders of this links junction More...
 
void removeApproaching (const SUMOVehicle *veh)
 removes the vehicle from myApproachingVehicles More...
 
void setApproaching (const SUMOVehicle *approaching, const SUMOTime arrivalTime, const SUMOReal arrivalSpeed, const SUMOReal leaveSpeed, const bool setRequest, const SUMOTime arrivalTimeBraking, const SUMOReal arrivalSpeedBraking, const SUMOTime waitingTime, SUMOReal dist)
 Sets the information about an approaching vehicle. More...
 
void setMesoTLSPenalty (const SUMOTime penalty)
 Sets the time penalty for passing a tls-controlled link (meso) More...
 
void setRequestInformation (int index, bool hasFoes, bool isCont, const std::vector< MSLink * > &foeLinks, const std::vector< MSLane * > &foeLanes, MSLane *internalLaneBefore=0)
 Sets the request information. More...
 
void setTLState (LinkState state, SUMOTime t)
 Sets the current tl-state. More...
 
bool willHaveBlockedFoe () const
 
void writeApproaching (OutputDevice &od, const std::string fromLaneID) const
 write information about all approaching vehicles to the given output device More...
 
 ~MSLink ()
 Destructor. More...
 

Static Public Attributes

static const SUMOReal ZIPPER_ADAPT_DIST
 

Private Member Functions

bool blockedByFoe (const SUMOVehicle *veh, const ApproachingVehicleInformation &avi, SUMOTime arrivalTime, SUMOTime leaveTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed, bool sameTargetLane, SUMOReal impatience, SUMOReal decel, SUMOTime waitingTime) const
 
MSLinkcomputeParallelLink (int direction)
 
 MSLink (const MSLink &s)
 invalidated copy constructor More...
 
MSLinkoperator= (const MSLink &s)
 invalidated assignment operator More...
 

Static Private Member Functions

static bool couldBrakeForLeader (SUMOReal followDist, SUMOReal leaderDist, const MSVehicle *follow, const MSVehicle *leader)
 whether fllower could stay behind leader (possibly by braking) More...
 
static bool maybeOccupied (MSLane *lane)
 returns whether the given lane may still be occupied by a vehicle currently on it More...
 
static bool unsafeMergeSpeeds (SUMOReal leaderSpeed, SUMOReal followerSpeed, SUMOReal leaderDecel, SUMOReal followerDecel)
 return whether the given vehicles may NOT merge safely More...
 

Private Attributes

bool myAmCont
 
std::map< const SUMOVehicle
*, ApproachingVehicleInformation
myApproachingVehicles
 
std::set< MSLink * > myBlockedFoeLinks
 
LinkDirection myDirection
 An abstract (hopefully human readable) definition of the link's direction. More...
 
std::vector< const MSLane * > myFoeLanes
 
std::vector< MSLink * > myFoeLinks
 
SUMOReal myFoeVisibilityDistance
 distance from which an approaching vehicle is able to see all relevant foes and may accelerate if the link is minor and no foe is approaching. Defaults to 4.5m. More...
 
bool myHasFoes
 Whether any foe links exist. More...
 
int myIndex
 The position within this respond. More...
 
MSJunctionmyJunction
 the junction to which this link belongs More...
 
bool myKeepClear
 
MSLanemyLane
 The lane behind the junction approached by this link. More...
 
MSLanemyLaneBefore
 The lane approaching this link. More...
 
SUMOTime myLastStateChange
 The time of the last state change. More...
 
SUMOReal myLength
 The length of the link. More...
 
const MSTrafficLightLogicmyLogic
 the controlling logic or 0 More...
 
SUMOTime myMesoTLSPenalty
 penalty time for mesoscopic simulation More...
 
MSLinkmyParallelLeft
 
MSLinkmyParallelRight
 
LinkState myState
 The state of the link. More...
 
std::vector< MSLink * > mySublaneFoeLinks
 
const int myTLIndex
 the traffic light index More...
 

Static Private Attributes

static const SUMOTime myLookaheadTime = TIME2STEPS(1)
 
static const SUMOTime myLookaheadTimeZipper = TIME2STEPS(4)
 

Detailed Description

Definition at line 77 of file MSLink.h.

Member Typedef Documentation

typedef std::vector<LinkLeader> MSLink::LinkLeaders

Definition at line 92 of file MSLink.h.

Constructor & Destructor Documentation

MSLink::MSLink ( MSLane predLane,
MSLane succLane,
LinkDirection  dir,
LinkState  state,
SUMOReal  length,
SUMOReal  foeVisibilityDistance,
bool  keepClear,
MSTrafficLightLogic logic,
int  tlLinkIdx 
)

Constructor for simulation not using internal lanes.

Parameters
[in]succLaneThe lane approached by this link
[in]dirThe direction of this link
[in]stateThe state of this link
[in]lengthThe length of this link
[in]keepClearWhether the junction after this link must be kept clear

Definition at line 69 of file MSLink.cpp.

MSLink::~MSLink ( )

Destructor.

Definition at line 113 of file MSLink.cpp.

MSLink::MSLink ( const MSLink s)
private

invalidated copy constructor

Member Function Documentation

void MSLink::addBlockedLink ( MSLink link)

Definition at line 277 of file MSLink.cpp.

References myBlockedFoeLinks.

bool MSLink::blockedAtTime ( SUMOTime  arrivalTime,
SUMOTime  leaveTime,
SUMOReal  arrivalSpeed,
SUMOReal  leaveSpeed,
bool  sameTargetLane,
SUMOReal  impatience,
SUMOReal  decel,
SUMOTime  waitingTime,
std::vector< const SUMOVehicle * > *  collectFoes = 0 
) const

Returns the information whether this link is blocked Valid after the vehicles have set their requests.

Parameters
[in]arrivalTimeThe arrivalTime of the vehicle who checks for an approaching foe
[in]leaveTimeThe leaveTime of the vehicle who checks for an approaching foe
[in]arrivalSpeedThe speed with which the checking vehicle plans to arrive at the link
[in]leaveSpeedThe speed with which the checking vehicle plans to leave the link
[in]sameTargetLaneWhether the link that calls this method has the same target lane as this link
[in]impatienceThe impatience of the checking vehicle
[in]decelThe maximum deceleration of the checking vehicle
[in]waitingTimeThe waiting time of the checking vehicle
[in]collectFoesIf a vector is passed the return value is always False, instead all blocking foes are collected and inserted into this vector
Returns
Whether this link is blocked
Note
Since this needs to be called without a SUMOVehicle (TraCI), we cannot simply pass the checking vehicle itself

Definition at line 387 of file MSLink.cpp.

References blockedByFoe(), and myApproachingVehicles.

MSLink * MSLink::computeParallelLink ( int  direction)
private
bool MSLink::couldBrakeForLeader ( SUMOReal  followDist,
SUMOReal  leaderDist,
const MSVehicle follow,
const MSVehicle leader 
)
staticprivate

whether fllower could stay behind leader (possibly by braking)

Definition at line 850 of file MSLink.cpp.

References MSVehicle::getCarFollowModel(), MSCFModel::getMaxDecel(), and MSVehicle::getSpeed().

Referenced by getZipperSpeed().

bool MSLink::fromInternalLane ( ) const

return whether the fromLane of this link is an internal lane

MSLink::ApproachingVehicleInformation MSLink::getApproaching ( const SUMOVehicle veh) const

Definition at line 301 of file MSLink.cpp.

References myApproachingVehicles.

Referenced by getZipperSpeed().

const std::map<const SUMOVehicle*, ApproachingVehicleInformation>& MSLink::getApproaching ( ) const
inline

return all approaching vehicles

Definition at line 205 of file MSLink.h.

References myApproachingVehicles.

MSLane * MSLink::getApproachingLane ( ) const

Returns the lane leading to this link.

Returns
The lane leading to this link

Definition at line 496 of file MSLink.cpp.

References MSLane::getIncomingLanes(), getIndex(), MSLane::getLinkCont(), myLane, toString(), and WRITE_WARNING.

Referenced by MSRailSignal::init().

LinkDirection MSLink::getDirection ( ) const

Returns the direction the vehicle passing this link take.

Returns
The direction of this link

Definition at line 476 of file MSLink.cpp.

References myDirection.

Referenced by MSVehicle::executeMove(), and TraCIServerAPI_Lane::processGet().

const std::vector<const MSLane*>& MSLink::getFoeLanes ( )
inline

Definition at line 456 of file MSLink.h.

References myFoeLanes.

SUMOReal MSLink::getFoeVisibilityDistance ( ) const
inline

Returns the distance on the approaching lane from which an approaching vehicle is able to see all relevant foes and may accelerate if the link is minor and no foe is approaching.

Returns
The foe-visibility-distance

Definition at line 359 of file MSLink.h.

References myFoeVisibilityDistance.

int MSLink::getIndex ( ) const
inline

Returns the respond index (for visualization)

Returns
The respond index for this link

Definition at line 312 of file MSLink.h.

References myIndex.

Referenced by GUILane::drawLinkNo(), and getApproachingLane().

const MSLane * MSLink::getInternalLaneBefore ( ) const

return myInternalLaneBefore (always 0 when compiled without internal lanes)

Definition at line 767 of file MSLink.cpp.

SUMOReal MSLink::getInternalLengthsAfter ( ) const

Returns the cumulative length of all internal lanes after this link.

Returns
sum of the lengths of all internal lanes following this link

Definition at line 583 of file MSLink.cpp.

References MSEdge::EDGEFUNCTION_INTERNAL, MSLane::getEdge(), MSLane::getLength(), MSLane::getLinkCont(), MSEdge::getPurpose(), and SUMOReal.

Referenced by MSLCM_LC2013::distanceAlongNextRoundabout(), and MSLCM_LC2013::getRoundaboutAheadInfo().

MSJunction* MSLink::getJunction ( ) const
inline

Definition at line 259 of file MSLink.h.

References myJunction.

const MSLane * MSLink::getLaneBefore ( ) const

return the internalLaneBefore if it exists and the laneBefore otherwise

Definition at line 711 of file MSLink.cpp.

References myLaneBefore.

Referenced by computeParallelLink().

SUMOTime MSLink::getLastStateChange ( ) const
inline

Definition at line 274 of file MSLink.h.

References myLastStateChange.

SUMOTime MSLink::getLeaveTime ( const SUMOTime  arrivalTime,
const SUMOReal  arrivalSpeed,
const SUMOReal  leaveSpeed,
const SUMOReal  vehicleLength 
) const

return the expected time at which the given vehicle will clear the link

Definition at line 312 of file MSLink.cpp.

References getLength(), MAX2(), NUMERICAL_EPS, SUMOReal, and TIME2STEPS.

Referenced by opened(), and setApproaching().

SUMOReal MSLink::getLength ( ) const
inline

Returns the length of this link.

Returns
The length of this link

Definition at line 348 of file MSLink.h.

References myLength.

Referenced by MEVehicle::estimateLeaveSpeed(), MSVehicle::estimateLeaveSpeed(), getLeaveTime(), and TraCIServerAPI_Lane::processGet().

SUMOTime MSLink::getMesoTLSPenalty ( ) const
inline

Returns the time penalty for passing a tls-controlled link (meso)

Definition at line 447 of file MSLink.h.

References myMesoTLSPenalty.

Referenced by MESegment::getTLSPenalty(), and MSEdge::recalcCache().

MSLink * MSLink::getParallelLink ( int  direction) const

return the link that is parallel to this lane or 0

Definition at line 725 of file MSLink.cpp.

References myParallelLeft, and myParallelRight.

Referenced by MSVehicle::checkRewindLinkLanes(), MSVehicle::executeMove(), and GUIVehicle::selectBlockingFoes().

LinkState MSLink::getState ( ) const
inline
int MSLink::getTLIndex ( ) const
inline

Returns the TLS index.

Definition at line 317 of file MSLink.h.

References myTLIndex.

const MSTrafficLightLogic* MSLink::getTLLogic ( ) const
inline

Returns the TLS index.

Definition at line 322 of file MSLink.h.

References myLogic.

bool MSLink::hasApproachingFoe ( SUMOTime  arrivalTime,
SUMOTime  leaveTime,
SUMOReal  speed,
SUMOReal  decel 
) const

Returns the information whether a vehicle is approaching on one of the link's foe streams.

Valid after the vehicles have set their requests

Parameters
[in]arrivalTimeThe arrivalTime of the vehicle who checks for an approaching foe
[in]leaveTimeThe leaveTime of the vehicle who checks for an approaching foe
[in]speedThe speed with which the checking vehicle plans to leave the link
[in]decelThe maximum deceleration of the checking vehicle
Returns
Whether a foe of this link is approaching

Definition at line 460 of file MSLink.cpp.

References myFoeLanes, myFoeLinks, and myLane.

Referenced by TraCIServerAPI_Lane::processGet().

bool MSLink::hasFoes ( ) const
inline

Returns whether this link belongs to a junction where more than one edge is incoming.

Returns
Whether any foe links exist

Definition at line 368 of file MSLink.h.

References myHasFoes.

Referenced by MSVehicle::checkRewindLinkLanes(), and setRequestInformation().

bool MSLink::havePriority ( ) const
inline

Returns whether this link is a major link.

Returns
Whether the link has a large priority

Definition at line 329 of file MSLink.h.

References myState.

Referenced by MSLaneChanger::changeOpposite(), MSVehicle::checkRewindLinkLanes(), GUILane::drawGL(), MESegment::isOpen(), lastWasContMajor(), MSVehicle::nextLinkPriority(), opened(), and TraCIServerAPI_Lane::processGet().

bool MSLink::haveRed ( ) const
inline

Returns whether this link is blocked by a red (or redyellow) traffic light.

Returns
Whether the link has a red light

Definition at line 336 of file MSLink.h.

References LINKSTATE_TL_RED, LINKSTATE_TL_REDYELLOW, and myState.

Referenced by opened().

void MSLink::initParallelLinks ( )

initialize parallel links (to be called after all links are loaded)

Definition at line 859 of file MSLink.cpp.

References computeParallelLink(), myParallelLeft, and myParallelRight.

bool MSLink::isBlockingAnyone ( ) const
inline

Definition at line 240 of file MSLink.h.

References myApproachingVehicles.

bool MSLink::isCont ( ) const
inline

Definition at line 373 of file MSLink.h.

References myAmCont.

Referenced by MSVehicle::checkRewindLinkLanes(), and setRequestInformation().

bool MSLink::isExitLink ( ) const

return whether the fromLane of this link is an internal lane and toLane is a normal lane

bool MSLink::isInternalJunctionLink ( ) const

return whether the fromLane and the toLane of this link are internal lanes

bool MSLink::isLeader ( const MSVehicle ego,
const MSVehicle foe 
)

Definition at line 757 of file MSLink.cpp.

References MSJunction::isLeader(), and myJunction.

Referenced by GUIVehicle::selectBlockingFoes().

bool MSLink::isTLSControlled ( ) const
inline

Definition at line 340 of file MSLink.h.

References myLogic.

Referenced by MESegment::getTLSPenalty().

bool MSLink::keepClear ( ) const
inline

whether the junction after this link must be kept clear

Definition at line 379 of file MSLink.h.

References myKeepClear.

Referenced by MSVehicle::checkRewindLinkLanes().

bool MSLink::lastWasContMajor ( ) const

whether this is a link past an internal junction which currently has priority

Definition at line 524 of file MSLink.cpp.

References MSEdge::EDGEFUNCTION_INTERNAL, MSLinkContHelper::getConnectingLink(), MSLane::getEdge(), MSLane::getLogicalPredecessorLane(), MSEdge::getPurpose(), havePriority(), and myAmCont.

bool MSLink::maybeOccupied ( MSLane lane)
staticprivate

returns whether the given lane may still be occupied by a vehicle currently on it

Definition at line 444 of file MSLink.cpp.

References MSVehicle::getBackPositionOnLane(), MSVehicle::getCarFollowModel(), MSLane::getLastAnyVehicle(), MSLane::getLength(), MSCFModel::getMaxDecel(), MSVehicle::getSpeed(), and SUMOReal.

bool MSLink::opened ( SUMOTime  arrivalTime,
SUMOReal  arrivalSpeed,
SUMOReal  leaveSpeed,
SUMOReal  vehicleLength,
SUMOReal  impatience,
SUMOReal  decel,
SUMOTime  waitingTime,
SUMOReal  posLat = 0,
std::vector< const SUMOVehicle * > *  collectFoes = 0 
) const

Returns the information whether the link may be passed.

Valid after the junctions have set their reponds

Parameters
[in]collectFoesIf a vector is passed, all blocking foes are collected and inserted into this vector
Returns
Whether this link may be passed.

Definition at line 319 of file MSLink.cpp.

References blockedByFoe(), MSLane::getIndex(), getLane(), SUMOVehicle::getLateralPositionOnLane(), getLeaveTime(), MSGlobals::gLateralResolution, MSGlobals::gUseMesoSim, MSGlobals::gUsingInternalLanes, havePriority(), haveRed(), LINKSTATE_ALLWAY_STOP, LINKSTATE_STOP, LINKSTATE_ZIPPER, myAmCont, myApproachingVehicles, myFoeLinks, myLane, myState, and mySublaneFoeLinks.

Referenced by MSVehicle::checkRewindLinkLanes(), MSVehicle::executeMove(), MESegment::isOpen(), MSPModel_Striping::moveInDirectionOnLane(), TraCIServerAPI_Lane::processGet(), and GUIVehicle::selectBlockingFoes().

MSLink& MSLink::operator= ( const MSLink s)
private

invalidated assignment operator

void MSLink::passedJunction ( const MSVehicle vehicle)

erase vehicle from myLinkLeaders of this links junction

Definition at line 749 of file MSLink.cpp.

References myJunction, and MSJunction::passedJunction().

Referenced by MSVehicle::executeMove().

void MSLink::removeApproaching ( const SUMOVehicle veh)

removes the vehicle from myApproachingVehicles

Definition at line 295 of file MSLink.cpp.

References myApproachingVehicles.

Referenced by MEVehicle::replaceRoute().

void MSLink::setApproaching ( const SUMOVehicle approaching,
const SUMOTime  arrivalTime,
const SUMOReal  arrivalSpeed,
const SUMOReal  leaveSpeed,
const bool  setRequest,
const SUMOTime  arrivalTimeBraking,
const SUMOReal  arrivalSpeedBraking,
const SUMOTime  waitingTime,
SUMOReal  dist 
)

Sets the information about an approaching vehicle.

The information is stored in myApproachingVehicles.

Definition at line 267 of file MSLink.cpp.

References getLeaveTime(), MSVehicleType::getLength(), SUMOVehicle::getVehicleType(), and myApproachingVehicles.

Referenced by MSVehicle::checkRewindLinkLanes(), and MELoop::setApproaching().

void MSLink::setMesoTLSPenalty ( const SUMOTime  penalty)
inline

Sets the time penalty for passing a tls-controlled link (meso)

Definition at line 452 of file MSLink.h.

References myMesoTLSPenalty.

void MSLink::setRequestInformation ( int  index,
bool  hasFoes,
bool  isCont,
const std::vector< MSLink * > &  foeLinks,
const std::vector< MSLane * > &  foeLanes,
MSLane internalLaneBefore = 0 
)
void MSLink::setTLState ( LinkState  state,
SUMOTime  t 
)

Sets the current tl-state.

Parameters
[in]stateThe current state of the link
[in]tThe time of the state change

Definition at line 482 of file MSLink.cpp.

References myLastStateChange, and myState.

Referenced by MSTrafficLightLogic::addLink().

static bool MSLink::unsafeMergeSpeeds ( SUMOReal  leaderSpeed,
SUMOReal  followerSpeed,
SUMOReal  leaderDecel,
SUMOReal  followerDecel 
)
inlinestaticprivate

return whether the given vehicles may NOT merge safely

Definition at line 465 of file MSLink.h.

Referenced by blockedByFoe().

bool MSLink::willHaveBlockedFoe ( ) const

Definition at line 284 of file MSLink.cpp.

References myBlockedFoeLinks.

Field Documentation

bool MSLink::myAmCont
private

Definition at line 516 of file MSLink.h.

Referenced by isCont(), lastWasContMajor(), opened(), and setRequestInformation().

std::map<const SUMOVehicle*, ApproachingVehicleInformation> MSLink::myApproachingVehicles
private
std::set<MSLink*> MSLink::myBlockedFoeLinks
private

Definition at line 489 of file MSLink.h.

Referenced by addBlockedLink(), and willHaveBlockedFoe().

LinkDirection MSLink::myDirection
private

An abstract (hopefully human readable) definition of the link's direction.

Definition at line 507 of file MSLink.h.

Referenced by getDirection().

std::vector<const MSLane*> MSLink::myFoeLanes
private

Definition at line 545 of file MSLink.h.

Referenced by getFoeLanes(), hasApproachingFoe(), and setRequestInformation().

std::vector<MSLink*> MSLink::myFoeLinks
private

Definition at line 544 of file MSLink.h.

Referenced by getZipperSpeed(), hasApproachingFoe(), opened(), and setRequestInformation().

SUMOReal MSLink::myFoeVisibilityDistance
private

distance from which an approaching vehicle is able to see all relevant foes and may accelerate if the link is minor and no foe is approaching. Defaults to 4.5m.

Definition at line 523 of file MSLink.h.

Referenced by getFoeVisibilityDistance().

bool MSLink::myHasFoes
private

Whether any foe links exist.

Definition at line 513 of file MSLink.h.

Referenced by hasFoes(), and setRequestInformation().

int MSLink::myIndex
private

The position within this respond.

Definition at line 492 of file MSLink.h.

Referenced by getIndex(), and setRequestInformation().

MSJunction* MSLink::myJunction
private

the junction to which this link belongs

Definition at line 558 of file MSLink.h.

Referenced by getJunction(), getZipperSpeed(), isLeader(), passedJunction(), and setRequestInformation().

bool MSLink::myKeepClear
private

Definition at line 518 of file MSLink.h.

Referenced by keepClear().

MSLane* MSLink::myLane
private

The lane behind the junction approached by this link.

Definition at line 483 of file MSLink.h.

Referenced by getApproachingLane(), getLane(), getViaLaneOrLane(), hasApproachingFoe(), opened(), and setRequestInformation().

MSLane* MSLink::myLaneBefore
private

The lane approaching this link.

Definition at line 486 of file MSLink.h.

Referenced by getLaneBefore(), and setRequestInformation().

SUMOTime MSLink::myLastStateChange
private

The time of the last state change.

Definition at line 504 of file MSLink.h.

Referenced by getLastStateChange(), and setTLState().

SUMOReal MSLink::myLength
private

The length of the link.

Definition at line 510 of file MSLink.h.

Referenced by getLength().

const MSTrafficLightLogic* MSLink::myLogic
private

the controlling logic or 0

Definition at line 498 of file MSLink.h.

Referenced by getTLLogic(), and isTLSControlled().

const SUMOTime MSLink::myLookaheadTime = TIME2STEPS(1)
staticprivate

Definition at line 551 of file MSLink.h.

Referenced by blockedByFoe().

const SUMOTime MSLink::myLookaheadTimeZipper = TIME2STEPS(4)
staticprivate

Definition at line 552 of file MSLink.h.

Referenced by blockedByFoe().

SUMOTime MSLink::myMesoTLSPenalty
private

penalty time for mesoscopic simulation

Definition at line 526 of file MSLink.h.

Referenced by getMesoTLSPenalty(), and setMesoTLSPenalty().

MSLink* MSLink::myParallelLeft
private

Definition at line 555 of file MSLink.h.

Referenced by getParallelLink(), and initParallelLinks().

MSLink* MSLink::myParallelRight
private

Definition at line 554 of file MSLink.h.

Referenced by getParallelLink(), and initParallelLinks().

LinkState MSLink::myState
private

The state of the link.

Definition at line 501 of file MSLink.h.

Referenced by blockedByFoe(), getState(), havePriority(), haveRed(), opened(), and setTLState().

std::vector<MSLink*> MSLink::mySublaneFoeLinks
private

Definition at line 549 of file MSLink.h.

Referenced by opened(), and setRequestInformation().

const int MSLink::myTLIndex
private

the traffic light index

Definition at line 495 of file MSLink.h.

Referenced by getTLIndex().

const SUMOReal MSLink::ZIPPER_ADAPT_DIST
static

Definition at line 81 of file MSLink.h.

Referenced by getZipperSpeed(), and MSVehicle::unsafeLinkAhead().


The documentation for this class was generated from the following files: