SUMO - Simulation of Urban MObility
NBEdgePriorityComputer Class Reference

#include <NBAlgorithms.h>

Static Public Member Functions

static void computeEdgePriorities (NBNodeCont &nc)
 Computes edge priorities within a node.

Static Private Member Functions

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

Detailed Description

Definition at line 188 of file NBAlgorithms.h.


Member Function Documentation

Computes edge priorities within a node.

Parameters:
[in]ncThe container of nodes to loop along

Definition at line 222 of file NBAlgorithms.cpp.

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

Referenced by NBNetBuilder::compute().

NBEdge * NBEdgePriorityComputer::extractAndMarkFirst ( NBNode n,
std::vector< NBEdge * > &  s 
) [static, private]

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
Returns:
The vector's first edge

Definition at line 353 of file NBAlgorithms.cpp.

References NBEdge::setJunctionPriority().

Referenced by setPriorityJunctionPriorities().

bool NBEdgePriorityComputer::samePriority ( const NBEdge *const  e1,
const NBEdge *const  e2 
) [static, private]

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 365 of file NBAlgorithms.cpp.

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

Referenced by setPriorityJunctionPriorities().

Sets the priorites in case of a priority junction.

Parameters:
[in]nThe node to set edges' priorities

Definition at line 242 of file NBAlgorithms.cpp.

References extractAndMarkFirst(), NBEdge::getAngle(), NBEdge::getAngleAtNode(), GeomHelper::getMinAngleDiff(), NBNode::myIncomingEdges, NBNode::myOutgoingEdges, samePriority(), NBEdge::setJunctionPriority(), and SUMOReal.

Referenced by computeEdgePriorities().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines