![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <NBAlgorithms_Railway.h>
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 NBEdge * | addBidiEdge (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, bool geometryLike) |
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 NBEdge * | isBidiSwitch (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... | |
Definition at line 47 of file NBAlgorithms_Railway.h.
|
staticprivate |
add bidi-edge for the given edge
Definition at line 156 of file NBAlgorithms_Railway.cpp.
References NBNetBuilder::getEdgeCont(), NBEdge::getFromNode(), NBEdge::getGeometry(), NBEdge::getID(), NBEdge::getLaneSpreadFunction(), NBEdge::getToNode(), NBEdgeCont::insert(), NBNode::invalidateIncomingConnections(), NBEdge::isBidiRail(), LANESPREAD_CENTER, NBEdgeCont::retrieve(), PositionVector::reverse(), updateTurns(), and WRITE_WARNING.
Referenced by addBidiEdgesBetweenSwitches(), addBidiEdgesForBufferStops(), addBidiEdgesForStops(), addBidiEdgesForStraightConnectivity(), extendBidiEdges(), and makeAllBidi().
|
staticprivate |
add bidi-edges to connect switches that are approached in both directions
Definition at line 739 of file NBAlgorithms_Railway.cpp.
References addBidiEdge(), getBrokenRailNodes(), NBEdge::getFromNode(), getRailEdges(), NBEdge::getToNode(), isBidiSwitch(), isStraight(), joinToString(), toString(), and WRITE_MESSAGE.
Referenced by repairTopology().
|
staticprivate |
add bidi-edges to connect buffers stops in both directions
Definition at line 646 of file NBAlgorithms_Railway.cpp.
References addBidiEdge(), getBrokenRailNodes(), NBEdge::getFromNode(), getRailEdges(), getRailNodes(), NBEdge::getToNode(), LANESPREAD_CENTER, NBEdge::setLaneSpreadFunction(), StringUtils::toBool(), toString(), WRITE_MESSAGE, and WRITE_WARNING.
Referenced by repairTopology().
|
staticprivate |
add bidi-edges to connect successive public transport stops
Definition at line 798 of file NBAlgorithms_Railway.cpp.
References addBidiEdge(), SUMOAbstractRouter< E, V >::compute(), extendBidiEdges(), NBEdgeCont::getAllEdges(), NBNetBuilder::getEdgeCont(), NBEdge::getID(), NBEdge::getLaneSpreadFunction(), NBPTLineCont::getLines(), NBEdge::getPermissions(), NBNetBuilder::getPTLineCont(), getRailEdges(), getRailNodes(), NBPTLine::getRef(), NBPTLine::getRouteEnd(), NBPTLine::getRouteStart(), NBPTLine::getStopEdges(), getTravelTimeStatic(), NBEdge::isBidiRail(), isStraight(), LANESPREAD_CENTER, NBEdgeCont::size(), SVC_RAIL_CLASSES, toString(), WRITE_MESSAGE, and WRITE_WARNING.
Referenced by repairTopology().
|
staticprivate |
add bidi-edges to connect straight tracks
Definition at line 971 of file NBAlgorithms_Railway.cpp.
References addBidiEdge(), extendBidiEdges(), getBrokenRailNodes(), NBNetBuilder::getEdgeCont(), getRailEdges(), isRailway(), isStraight(), toString(), and WRITE_MESSAGE.
Referenced by repairTopology().
|
staticprivate |
Definition at line 467 of file NBAlgorithms_Railway.cpp.
Referenced by allSharp(), and getBrokenRailNodes().
|
staticprivate |
Definition at line 427 of file NBAlgorithms_Railway.cpp.
References gDebugFlag1, NBEdge::getID(), and isStraight().
Referenced by reverseEdges().
|
staticprivate |
Definition at line 449 of file NBAlgorithms_Railway.cpp.
References allBidi(), and isStraight().
Referenced by extendBidiEdges(), and getBrokenRailNodes().
|
static |
Computes highway on-/off-ramps (if wished)
[in,changed] | nb The network builder which contains the current network representation | |
[in] | oc | The options container |
Definition at line 104 of file NBAlgorithms_Railway.cpp.
References getBrokenRailNodes().
Referenced by NBNetBuilder::compute().
|
staticprivate |
add further bidi-edges near existing bidi-edges
Definition at line 478 of file NBAlgorithms_Railway.cpp.
References NBEdgeCont::begin(), NBEdgeCont::end(), NBNetBuilder::getEdgeCont(), NBEdge::getFromNode(), getRailNodes(), NBEdge::getToNode(), NBEdge::getTurnDestination(), NBEdge::isBidiRail(), toString(), and WRITE_MESSAGE.
Referenced by addBidiEdgesForStops(), addBidiEdgesForStraightConnectivity(), extendBidiEdges(), and repairTopology().
|
staticprivate |
Definition at line 497 of file NBAlgorithms_Railway.cpp.
References addBidiEdge(), allSharp(), extendBidiEdges(), NBEdge::getID(), getRailEdges(), NBEdge::getToNode(), NBEdge::getTurnDestination(), isStraight(), LANESPREAD_CENTER, and WRITE_WARNING.
|
staticprivate |
Definition at line 196 of file NBAlgorithms_Railway.cpp.
References allBidi(), allSharp(), OutputDevice::close(), OutputDevice::closeTag(), OutputDevice::getDevice(), NBEdge::getID(), Named::getID(), OptionsCont::getOptions(), Parameterised::getParameter(), getRailEdges(), getRailNodes(), NBEdge::getTurnDestination(), hasStraightPair(), OutputDevice::openTag(), SUMO_ATTR_ID, SUMO_TAG_NODE, StringUtils::toBool(), toString(), WRITE_MESSAGE, OutputDevice::writeAttr(), and OutputDevice::writeXMLHeader().
Referenced by addBidiEdgesBetweenSwitches(), addBidiEdgesForBufferStops(), addBidiEdgesForStraightConnectivity(), analyzeTopology(), and reverseEdges().
|
staticprivate |
filter out rail edges among all edges of a the given node
Definition at line 179 of file NBAlgorithms_Railway.cpp.
References NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), and SVC_RAIL_CLASSES.
Referenced by addBidiEdgesBetweenSwitches(), addBidiEdgesForBufferStops(), addBidiEdgesForStops(), addBidiEdgesForStraightConnectivity(), extendBidiEdges(), getBrokenRailNodes(), isBidiSwitch(), and reverseEdges().
|
staticprivate |
Definition at line 351 of file NBAlgorithms_Railway.cpp.
References NBEdgeCont::begin(), NBEdgeCont::end(), NBNetBuilder::getEdgeCont(), NBEdgeCont::insert(), isRailway(), NODETYPE_RAIL_SIGNAL, toString(), and WRITE_MESSAGE.
Referenced by addBidiEdgesForBufferStops(), addBidiEdgesForStops(), extendBidiEdges(), and getBrokenRailNodes().
|
static |
Definition at line 1062 of file NBAlgorithms_Railway.cpp.
References NBRailwayTopologyAnalyzer::Track::edge, and NBEdge::getTravelTimeStatic().
Referenced by addBidiEdgesForStops().
|
staticprivate |
Definition at line 401 of file NBAlgorithms_Railway.cpp.
References isStraight().
Referenced by getBrokenRailNodes().
Definition at line 717 of file NBAlgorithms_Railway.cpp.
References getRailEdges(), and isStraight().
Referenced by addBidiEdgesBetweenSwitches().
|
staticprivate |
Definition at line 378 of file NBAlgorithms_Railway.cpp.
References NBEdge::getAngleAtNode(), NBEdge::getFromNode(), NBEdge::getToNode(), NBHelpers::normRelAngle(), SHARP_THRESHOLD, and SHARP_THRESHOLD_SAMEDIR.
Referenced by addBidiEdgesBetweenSwitches(), addBidiEdgesForStops(), addBidiEdgesForStraightConnectivity(), allBroken(), allSharp(), extendBidiEdges(), hasStraightPair(), and isBidiSwitch().
|
static |
Definition at line 125 of file NBAlgorithms_Railway.cpp.
References addBidiEdge(), NBEdgeCont::getAllEdges(), NBNetBuilder::getEdgeCont(), LANESPREAD_CENTER, SVC_RAIL_CLASSES, toString(), WRITE_MESSAGE, and WRITE_WARNING.
Referenced by NBNetBuilder::compute().
|
static |
Definition at line 110 of file NBAlgorithms_Railway.cpp.
References addBidiEdgesBetweenSwitches(), addBidiEdgesForBufferStops(), addBidiEdgesForStops(), addBidiEdgesForStraightConnectivity(), extendBidiEdges(), OptionsCont::getOptions(), and reverseEdges().
Referenced by NBNetBuilder::compute().
|
staticprivate |
reverse edges sequences that are to broken nodes on both sides
Definition at line 538 of file NBAlgorithms_Railway.cpp.
References allBroken(), DEBUGNODEID, getBrokenRailNodes(), NBNetBuilder::getEdgeCont(), Named::getID(), NBNetBuilder::getPTStopCont(), getRailEdges(), NBPTStopCont::getStops(), joinToString(), toString(), and WRITE_MESSAGE.
Referenced by repairTopology().
|
staticprivate |
recompute turning directions for both nodes of the given edge
Definition at line 1055 of file NBAlgorithms_Railway.cpp.
References NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::getFromNode(), and NBEdge::getToNode().
Referenced by addBidiEdge().