![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <NBAlgorithms.h>
Static Public Member Functions | |
static void | computeEdgePriorities (NBNodeCont &nc) |
Computes edge priorities within a node. More... | |
Static Private Member Functions | |
static NBEdge * | extractAndMarkFirst (NBNode &n, std::vector< NBEdge * > &s, int prio=1) |
Sets the priorites in case of a priority junction. More... | |
static bool | hasDifferentPriorities (const EdgeVector &edges, const NBEdge *excluded) |
return whether the priorite attribute can be used to distinguish the edges More... | |
static void | markBestParallel (const NBNode &n, NBEdge *bestFirst, NBEdge *bestSecond) |
set priority for edges that are parallel to the best edges 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... | |
Definition at line 226 of file NBAlgorithms.h.
|
static |
Computes edge priorities within a node.
[in] | nc | The container of nodes to loop along |
Definition at line 299 of file NBAlgorithms.cpp.
References NBEdge::getIncomingEdges(), NBEdge::MINOR_ROAD, NODETYPE_ALLWAY_STOP, NODETYPE_NOJUNCTION, NODETYPE_RIGHT_BEFORE_LEFT, RIGHT_OF_WAY_EDGEPRIORITY, NBEdge::setJunctionPriority(), and setPriorityJunctionPriorities().
Referenced by NBNetBuilder::compute().
|
staticprivate |
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 |
[in] | prio | The priority to assign |
Definition at line 470 of file NBAlgorithms.cpp.
References NBEdge::setJunctionPriority().
Referenced by setPriorityJunctionPriorities().
|
staticprivate |
return whether the priorite attribute can be used to distinguish the edges
Definition at line 497 of file NBAlgorithms.cpp.
References NBEdge::getPriority().
Referenced by setPriorityJunctionPriorities().
|
staticprivate |
set priority for edges that are parallel to the best edges
Definition at line 450 of file NBAlgorithms.cpp.
References NBEdge::getAngleAtNode(), NBNode::getIncomingEdges(), GeomHelper::getMinAngleDiff(), and NBEdge::getPermissions().
Referenced by setPriorityJunctionPriorities().
|
staticprivate |
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 482 of file NBAlgorithms.cpp.
References NBEdge::getNumLanes(), NBEdge::getPriority(), and NBEdge::getSpeed().
Referenced by setPriorityJunctionPriorities().
|
staticprivate |
Sets the priorites in case of a priority junction.
[in] | n | The node to set edges' priorities |
Definition at line 325 of file NBAlgorithms.cpp.
References extractAndMarkFirst(), NBEdge::getAngleAtNode(), NBNode::getDirection(), GeomHelper::getMinAngleDiff(), NBEdge::getPriority(), hasDifferentPriorities(), LINKDIR_STRAIGHT, NBNode::markBentPriority(), markBestParallel(), NBNode::myIncomingEdges, NBNode::myOutgoingEdges, NBEdge::PRIORITY_ROAD, samePriority(), and NBEdge::setJunctionPriority().
Referenced by computeEdgePriorities().