SUMO - Simulation of Urban MObility
|
#include <NBAlgorithms.h>
Static Public Member Functions | |
static void | computeEdgePriorities (NBNodeCont &nc) |
Computes edge priorities within a node. | |
Static Private Member Functions | |
static NBEdge * | extractAndMarkFirst (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. |
Definition at line 188 of file NBAlgorithms.h.
void NBEdgePriorityComputer::computeEdgePriorities | ( | NBNodeCont & | nc | ) | [static] |
Computes edge priorities within a node.
[in] | nc | The 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.
[in] | n | The node to set edges' priorities |
[in] | s | The vector of edges to get and mark the first from |
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.
[in] | e1 | The first edge |
[in] | e2 | The 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().
void NBEdgePriorityComputer::setPriorityJunctionPriorities | ( | NBNode & | n | ) | [static, private] |
Sets the priorites in case of a priority junction.
[in] | n | The 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().