Eclipse SUMO - Simulation of Urban MObility
MSRailSignal::DriveWay Struct Reference

#include <MSRailSignal.h>

Collaboration diagram for MSRailSignal::DriveWay:

Public Member Functions

void buildRoute (MSLink *origin, double length, MSRouteIterator next, MSRouteIterator end, LaneSet &visited)
 
void checkCrossingFlanks (MSLink *dwLink, const LaneSet &visited)
 find links that cross the driveway without entering it More...
 
void checkFlanks (const std::vector< MSLane * > &lanes, const LaneSet &visited, bool allFoes)
 find switches that threathen this driveway More...
 
bool conflictLaneOccupied () const
 whether any of myConflictLanes is occupied More...
 
bool conflictLinkApproached () const
 Whether any of the conflict linkes have approaching vehicles. More...
 
 DriveWay (int index)
 Constructor. More...
 
void findFlankProtection (MSLink *link, double length, LaneSet &visited, MSLink *origLink)
 find upstream protection from the given link More...
 
bool findProtection (const Approaching &veh, MSLink *link) const
 find protection for the given vehicle starting at a switch More...
 
bool hasLinkConflict (const Approaching &closest, MSLink *foeLink) const
 Whether the approaching vehicle is prevent from driving by another vehicle approaching the given link. More...
 
bool overlap (const DriveWay &other) const
 Wether this driveway overlaps with the given one. More...
 
bool reserve (const Approaching &closest, MSEdgeVector &occupied)
 attempt reserve this driveway for the given vehicle More...
 
void writeBlocks (OutputDevice &od) const
 Write block items for this driveway. More...
 

Data Fields

const SUMOVehiclemyActive
 whether the current signal is switched green for a train approaching this block More...
 
std::vector< MSLane * > myBidi
 
std::vector< const MSLane * > myConflictLanes
 the lanes that must be clear of trains before this signal can switch to green More...
 
std::vector< MSLink * > myConflictLinks
 
std::vector< const MSLane * > myFlank
 
std::vector< MSLink * > myFlankSwitches
 
std::vector< MSLane * > myForward
 
int myIndex
 index in the list of driveways More...
 
double myMaxFlankLength
 the maximum flank length searched while building this driveway More...
 
std::vector< MSLink * > myProtectingSwitches
 
std::vector< const MSEdge * > myRoute
 list of lanes for matching against train routes More...
 

Detailed Description

Definition at line 220 of file MSRailSignal.h.

Constructor & Destructor Documentation

◆ DriveWay()

MSRailSignal::DriveWay::DriveWay ( int  index)
inline

Constructor.

Definition at line 223 of file MSRailSignal.h.

Member Function Documentation

◆ buildRoute()

◆ checkCrossingFlanks()

void MSRailSignal::DriveWay::checkCrossingFlanks ( MSLink dwLink,
const LaneSet visited 
)

◆ checkFlanks()

void MSRailSignal::DriveWay::checkFlanks ( const std::vector< MSLane * > &  lanes,
const LaneSet visited,
bool  allFoes 
)

find switches that threathen this driveway

Definition at line 812 of file MSRailSignal.cpp.

References joinNamedToString(), and toString().

◆ conflictLaneOccupied()

bool MSRailSignal::DriveWay::conflictLaneOccupied ( ) const

whether any of myConflictLanes is occupied

Definition at line 608 of file MSRailSignal.cpp.

References gDebugFlag4, and SIMTIME.

Referenced by hasLinkConflict(), and MSRailSignal::updateCurrentPhase().

◆ conflictLinkApproached()

bool MSRailSignal::DriveWay::conflictLinkApproached ( ) const

Whether any of the conflict linkes have approaching vehicles.

Definition at line 531 of file MSRailSignal.cpp.

Referenced by MSRailSignal::updateCurrentPhase().

◆ findFlankProtection()

void MSRailSignal::DriveWay::findFlankProtection ( MSLink link,
double  length,
LaneSet visited,
MSLink origLink 
)

◆ findProtection()

◆ hasLinkConflict()

bool MSRailSignal::DriveWay::hasLinkConflict ( const Approaching closest,
MSLink foeLink 
) const

Whether the approaching vehicle is prevent from driving by another vehicle approaching the given link.

Definition at line 542 of file MSRailSignal.cpp.

References conflictLaneOccupied(), gDebugFlag4, MSLink::getApproaching(), MSRailSignal::getClosest(), MSLink::getTLIndex(), MSRailSignal::getTLLinkID(), MSLink::getTLLogic(), and MSRailSignal::myLinkInfos.

◆ overlap()

bool MSRailSignal::DriveWay::overlap ( const DriveWay other) const

Wether this driveway overlaps with the given one.

Definition at line 685 of file MSRailSignal.cpp.

References MSEdge::getFromJunction(), MSEdge::getToJunction(), and myRoute.

◆ reserve()

bool MSRailSignal::DriveWay::reserve ( const Approaching closest,
MSEdgeVector occupied 
)

attempt reserve this driveway for the given vehicle

Definition at line 491 of file MSRailSignal.cpp.

References gDebugFlag4, and MSRailSignal::getTLLinkID().

Referenced by findProtection(), and MSRailSignal::updateCurrentPhase().

◆ writeBlocks()

void MSRailSignal::DriveWay::writeBlocks ( OutputDevice od) const

Field Documentation

◆ myActive

const SUMOVehicle* MSRailSignal::DriveWay::myActive

whether the current signal is switched green for a train approaching this block

Definition at line 236 of file MSRailSignal.h.

◆ myBidi

std::vector<MSLane*> MSRailSignal::DriveWay::myBidi

Definition at line 248 of file MSRailSignal.h.

Referenced by MSRailSignal::hasOncomingRailTraffic().

◆ myConflictLanes

std::vector<const MSLane*> MSRailSignal::DriveWay::myConflictLanes

the lanes that must be clear of trains before this signal can switch to green

Definition at line 255 of file MSRailSignal.h.

Referenced by findProtection().

◆ myConflictLinks

std::vector<MSLink*> MSRailSignal::DriveWay::myConflictLinks

Definition at line 270 of file MSRailSignal.h.

Referenced by findProtection(), and MSRailSignal::hasOncomingRailTraffic().

◆ myFlank

std::vector<const MSLane*> MSRailSignal::DriveWay::myFlank

Definition at line 252 of file MSRailSignal.h.

Referenced by findProtection(), and MSRailSignal::hasOncomingRailTraffic().

◆ myFlankSwitches

std::vector<MSLink*> MSRailSignal::DriveWay::myFlankSwitches

Definition at line 259 of file MSRailSignal.h.

◆ myForward

std::vector<MSLane*> MSRailSignal::DriveWay::myForward

Definition at line 243 of file MSRailSignal.h.

◆ myIndex

int MSRailSignal::DriveWay::myIndex

index in the list of driveways

Definition at line 230 of file MSRailSignal.h.

◆ myMaxFlankLength

double MSRailSignal::DriveWay::myMaxFlankLength

the maximum flank length searched while building this driveway

Definition at line 233 of file MSRailSignal.h.

◆ myProtectingSwitches

std::vector<MSLink*> MSRailSignal::DriveWay::myProtectingSwitches

Definition at line 265 of file MSRailSignal.h.

Referenced by findProtection().

◆ myRoute

std::vector<const MSEdge*> MSRailSignal::DriveWay::myRoute

list of lanes for matching against train routes

Definition at line 239 of file MSRailSignal.h.

Referenced by findProtection(), and overlap().


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