Eclipse 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, int prio=1) |
Sets the priorites in case of a priority junction. | |
static double | getScore (const NBEdge *e1, const NBEdge *e2, int minPrio, int maxPrio, int maxNumLanes, double maxSpeed) |
score pair of edges for multi-criteria evaluatoin of angle, priority, laneNumber and speed | |
static bool | hasDifferentPriorities (const EdgeVector &edges, const NBEdge *excluded) |
return whether the priorite attribute can be used to distinguish the edges | |
static void | markBestParallel (const NBNode &n, NBEdge *bestFirst, NBEdge *bestSecond) |
set priority for edges that are parallel to the best edges | |
static bool | samePriority (const NBEdge *const e1, const NBEdge *const e2) |
Returns whether both edges have the same priority. | |
static void | setPriorityJunctionPriorities (NBNode &n, bool forceStraight=false) |
Sets the priorites in case of a priority junction. | |
Definition at line 218 of file NBAlgorithms.h.
|
static |
Computes edge priorities within a node.
[in] | nc | The container of nodes to loop along |
Definition at line 396 of file NBAlgorithms.cpp.
References ALLWAY_STOP, EDGEPRIORITY, LEFT_BEFORE_RIGHT, NBEdge::MINOR_ROAD, NOJUNCTION, RIGHT_BEFORE_LEFT, 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 651 of file NBAlgorithms.cpp.
References NBEdge::setJunctionPriority().
Referenced by setPriorityJunctionPriorities().
|
staticprivate |
score pair of edges for multi-criteria evaluatoin of angle, priority, laneNumber and speed
Definition at line 614 of file NBAlgorithms.cpp.
References NBEdge::getNumLanes(), NBEdge::getPriority(), and NBEdge::getSpeed().
Referenced by setPriorityJunctionPriorities().
|
staticprivate |
return whether the priorite attribute can be used to distinguish the edges
Definition at line 678 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 631 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 663 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 425 of file NBAlgorithms.cpp.
References DEBUGCOND, extractAndMarkFirst(), NBEdge::getAngleAtNode(), NBNode::getDirection(), NBEdge::getID(), Named::getID(), GeomHelper::getMinAngleDiff(), NBEdge::getPriority(), getScore(), hasDifferentPriorities(), NBNode::isTLControlled(), NBNode::markBentPriority(), markBestParallel(), MAX2(), MIN2(), NBEdge::MINOR_ROAD, NBNode::myAllEdges, NBNode::myIncomingEdges, NBNode::myOutgoingEdges, NBEdge::PRIORITY_ROAD, samePriority(), NBEdge::setJunctionPriority(), setPriorityJunctionPriorities(), STRAIGHT, and toString().
Referenced by computeEdgePriorities(), and setPriorityJunctionPriorities().