Eclipse SUMO - Simulation of Urban MObility
NBRailwayTopologyAnalyzer Class Reference

#include <NBAlgorithms_Railway.h>

Collaboration diagram for NBRailwayTopologyAnalyzer:

Data Structures

class  Track
 routing edge More...
 

Static Public Member Functions

static void analyzeTopology (NBNetBuilder &nb)
 Computes highway on-/off-ramps (if wished) More...
 
static double getTravelTimeStatic (const Track *const track, const NBVehicle *const veh, double time)
 
static void makeAllBidi (NBNetBuilder &nb)
 
static void repairTopology (NBNetBuilder &nb)
 

Static Private Member Functions

static NBEdgeaddBidiEdge (NBNetBuilder &nb, NBEdge *edge, bool update=true)
 add bidi-edge for the given edge More...
 
static void addBidiEdgesBetweenSwitches (NBNetBuilder &nb)
 add bidi-edges to connect switches that are approached in both directions More...
 
static void addBidiEdgesForBufferStops (NBNetBuilder &nb)
 add bidi-edges to connect buffers stops in both directions More...
 
static void addBidiEdgesForStops (NBNetBuilder &nb)
 add bidi-edges to connect successive public transport stops More...
 
static void addBidiEdgesForStraightConnectivity (NBNetBuilder &nb)
 add bidi-edges to connect straight tracks More...
 
static bool allBidi (const EdgeVector &edges)
 
static bool allBroken (const NBNode *node, NBEdge *candOut, const EdgeVector &in, const EdgeVector &out)
 
static bool allSharp (const NBNode *node, const EdgeVector &in, const EdgeVector &out, bool countBidiAsSharp=false)
 
static int extendBidiEdges (NBNetBuilder &nb)
 add further bidi-edges near existing bidi-edges More...
 
static int extendBidiEdges (NBNetBuilder &nb, NBNode *node, NBEdge *bidiIn)
 
static std::set< NBNode * > getBrokenRailNodes (NBNetBuilder &nb, bool verbose=false)
 
static void getRailEdges (const NBNode *node, EdgeVector &inEdges, EdgeVector &outEdges)
 filter out rail edges among all edges of a the given node More...
 
static std::set< NBNode * > getRailNodes (NBNetBuilder &nb, bool verbose=false)
 
static bool hasStraightPair (const NBNode *node, const EdgeVector &edges, const EdgeVector &edges2)
 
static NBEdgeisBidiSwitch (const NBNode *n)
 
static bool isStraight (const NBNode *node, const NBEdge *e1, const NBEdge *e2)
 
static void reverseEdges (NBNetBuilder &nb)
 reverse edges sequences that are to broken nodes on both sides More...
 
static void updateTurns (NBEdge *edge)
 recompute turning directions for both nodes of the given edge More...
 

Detailed Description

Definition at line 48 of file NBAlgorithms_Railway.h.

Member Function Documentation

◆ addBidiEdge()

◆ addBidiEdgesBetweenSwitches()

void NBRailwayTopologyAnalyzer::addBidiEdgesBetweenSwitches ( NBNetBuilder nb)
staticprivate

add bidi-edges to connect switches that are approached in both directions

Definition at line 738 of file NBAlgorithms_Railway.cpp.

References addBidiEdge(), NBRailwayTopologyAnalyzer::Track::edge, getBrokenRailNodes(), NBEdge::getFromNode(), getRailEdges(), NBEdge::getToNode(), isBidiSwitch(), isStraight(), joinToString(), toString(), and WRITE_MESSAGE.

Referenced by repairTopology().

◆ addBidiEdgesForBufferStops()

void NBRailwayTopologyAnalyzer::addBidiEdgesForBufferStops ( NBNetBuilder nb)
staticprivate

◆ addBidiEdgesForStops()

◆ addBidiEdgesForStraightConnectivity()

void NBRailwayTopologyAnalyzer::addBidiEdgesForStraightConnectivity ( NBNetBuilder nb)
staticprivate

add bidi-edges to connect straight tracks

Definition at line 965 of file NBAlgorithms_Railway.cpp.

References addBidiEdge(), extendBidiEdges(), getBrokenRailNodes(), NBNetBuilder::getEdgeCont(), getRailEdges(), isRailway(), isStraight(), toString(), and WRITE_MESSAGE.

Referenced by repairTopology().

◆ allBidi()

bool NBRailwayTopologyAnalyzer::allBidi ( const EdgeVector edges)
staticprivate

Definition at line 466 of file NBAlgorithms_Railway.cpp.

Referenced by allSharp(), and getBrokenRailNodes().

◆ allBroken()

bool NBRailwayTopologyAnalyzer::allBroken ( const NBNode node,
NBEdge candOut,
const EdgeVector in,
const EdgeVector out 
)
staticprivate

Definition at line 426 of file NBAlgorithms_Railway.cpp.

References gDebugFlag1, NBEdge::getID(), and isStraight().

Referenced by reverseEdges().

◆ allSharp()

bool NBRailwayTopologyAnalyzer::allSharp ( const NBNode node,
const EdgeVector in,
const EdgeVector out,
bool  countBidiAsSharp = false 
)
staticprivate

Definition at line 448 of file NBAlgorithms_Railway.cpp.

References allBidi(), and isStraight().

Referenced by extendBidiEdges(), and getBrokenRailNodes().

◆ analyzeTopology()

void NBRailwayTopologyAnalyzer::analyzeTopology ( NBNetBuilder nb)
static

Computes highway on-/off-ramps (if wished)

Parameters

Definition at line 105 of file NBAlgorithms_Railway.cpp.

References getBrokenRailNodes().

Referenced by NBNetBuilder::compute().

◆ extendBidiEdges() [1/2]

int NBRailwayTopologyAnalyzer::extendBidiEdges ( NBNetBuilder nb)
staticprivate

◆ extendBidiEdges() [2/2]

int NBRailwayTopologyAnalyzer::extendBidiEdges ( NBNetBuilder nb,
NBNode node,
NBEdge bidiIn 
)
staticprivate

◆ getBrokenRailNodes()

◆ getRailEdges()

void NBRailwayTopologyAnalyzer::getRailEdges ( const NBNode node,
EdgeVector inEdges,
EdgeVector outEdges 
)
staticprivate

◆ getRailNodes()

std::set< NBNode * > NBRailwayTopologyAnalyzer::getRailNodes ( NBNetBuilder nb,
bool  verbose = false 
)
staticprivate

◆ getTravelTimeStatic()

double NBRailwayTopologyAnalyzer::getTravelTimeStatic ( const Track *const  track,
const NBVehicle *const  veh,
double  time 
)
static

◆ hasStraightPair()

bool NBRailwayTopologyAnalyzer::hasStraightPair ( const NBNode node,
const EdgeVector edges,
const EdgeVector edges2 
)
staticprivate

Definition at line 400 of file NBAlgorithms_Railway.cpp.

References isStraight().

Referenced by getBrokenRailNodes().

◆ isBidiSwitch()

NBEdge * NBRailwayTopologyAnalyzer::isBidiSwitch ( const NBNode n)
staticprivate

Definition at line 716 of file NBAlgorithms_Railway.cpp.

References getRailEdges(), and isStraight().

Referenced by addBidiEdgesBetweenSwitches().

◆ isStraight()

◆ makeAllBidi()

◆ repairTopology()

◆ reverseEdges()

void NBRailwayTopologyAnalyzer::reverseEdges ( NBNetBuilder nb)
staticprivate

◆ updateTurns()

void NBRailwayTopologyAnalyzer::updateTurns ( NBEdge edge)
staticprivate

recompute turning directions for both nodes of the given edge

Definition at line 1020 of file NBAlgorithms_Railway.cpp.

References NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::getFromNode(), and NBEdge::getToNode().

Referenced by addBidiEdge().


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