SUMO - Simulation of Urban MObility
NBEdgePriorityComputer Class Reference

#include <NBAlgorithms.h>

Collaboration diagram for NBEdgePriorityComputer:
Collaboration graph

Static Public Member Functions

static void computeEdgePriorities (NBNodeCont &nc)
 Computes edge priorities within a node. More...
 
static void computeEdgePrioritiesSingleNode (NBNode *node)
 Computes edge priorities within a single node. More...
 

Static Private Member Functions

static NBEdgeextractAndMarkFirst (NBNode &n, std::vector< NBEdge *> &s, int prio=1)
 Sets the priorites in case of a priority junction. More...
 
static bool samePriority (const NBEdge *const e1, const NBEdge *const e2)
 Returns whether both edges have the same priority. More...
 
static void setPriorityJunctionPriorities (NBNode &n)
 Sets the priorites in case of a priority junction. More...
 

Detailed Description

Definition at line 225 of file NBAlgorithms.h.

Member Function Documentation

◆ computeEdgePriorities()

void NBEdgePriorityComputer::computeEdgePriorities ( NBNodeCont nc)
static

Computes edge priorities within a node.

Parameters
[in]ncThe container of nodes to loop along

Definition at line 266 of file NBAlgorithms.cpp.

References NBNodeCont::begin(), NBNodeCont::end(), NBEdge::MINOR_ROAD, NBNode::myAllEdges, NBNode::myIncomingEdges, NBNode::myOutgoingEdges, NBNode::myType, and NODETYPE_RIGHT_BEFORE_LEFT.

Referenced by NBNetBuilder::compute().

◆ computeEdgePrioritiesSingleNode()

void NBEdgePriorityComputer::computeEdgePrioritiesSingleNode ( NBNode node)
static

Computes edge priorities within a single node.

Parameters
[in]nodethe single node

Definition at line 286 of file NBAlgorithms.cpp.

References NBNode::getType(), NBEdge::MINOR_ROAD, NBNode::myAllEdges, NBNode::myIncomingEdges, NBNode::myOutgoingEdges, and NODETYPE_RIGHT_BEFORE_LEFT.

Referenced by NBNetBuilder::computeSingleNode().

◆ extractAndMarkFirst()

NBEdge * NBEdgePriorityComputer::extractAndMarkFirst ( NBNode n,
std::vector< NBEdge *> &  s,
int  prio = 1 
)
staticprivate

Sets the priorites in case of a priority junction.

Parameters
[in]nThe node to set edges' priorities
[in]sThe vector of edges to get and mark the first from
[in]prioThe priority to assign
Returns
The vector's first edge

Definition at line 420 of file NBAlgorithms.cpp.

References NBEdge::setJunctionPriority().

◆ samePriority()

bool NBEdgePriorityComputer::samePriority ( const NBEdge *const  e1,
const NBEdge *const  e2 
)
staticprivate

Returns whether both edges have the same priority.

Parameters
[in]e1The first edge
[in]e2The second edge Whether both edges have the same priority

Definition at line 432 of file NBAlgorithms.cpp.

References NBEdge::getNumLanes(), NBEdge::getPriority(), and NBEdge::getSpeed().

◆ setPriorityJunctionPriorities()

void NBEdgePriorityComputer::setPriorityJunctionPriorities ( NBNode n)
staticprivate

Sets the priorites in case of a priority junction.

Parameters
[in]nThe node to set edges' priorities

Definition at line 302 of file NBAlgorithms.cpp.

References NBEdge::getAngleAtNode(), GeomHelper::getMinAngleDiff(), NBNode::myIncomingEdges, NBNode::myOutgoingEdges, NBEdge::PRIORITY_ROAD, and NBEdge::setJunctionPriority().


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