131 int operator()(
const std::unique_ptr<NBNode::Crossing>& c1,
const std::unique_ptr<NBNode::Crossing>& c2)
const {
135 return c1->edges.size() > c2->edges.size();
137 return (
int)(r1 < r2);
145 for (EdgeVector::const_iterator it = e.begin(); it != e.end(); ++it) {
147 result =
MIN2(result, rank);
162 const std::vector<NBEdge*>::iterator& i1,
163 const std::vector<NBEdge*>::iterator& i2);
232 static double getScore(
const NBEdge* e1,
const NBEdge* e2,
int minPrio,
int maxPrio,
int maxNumLanes,
double maxSpeed);
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
The representation of a single edge during network building.
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
int getNumericalID() const
Returns the index (numeric id) of the edge.
const std::string & getID() const
double getAngleAtNodeNormalized(const NBNode *const node) const
Returns the angle of the edge's geometry at the given node and disregards edge direction.
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 void markBestParallel(const NBNode &n, NBEdge *bestFirst, NBEdge *bestSecond)
set priority for edges that are parallel to the best edges
static NBEdge * extractAndMarkFirst(NBNode &n, std::vector< NBEdge * > &s, int prio=1)
Sets the priorites in case of a priority junction.
static bool hasDifferentPriorities(const EdgeVector &edges, const NBEdge *excluded)
return whether the priorite attribute can be used to distinguish the edges
static void computeEdgePriorities(NBNodeCont &nc)
Computes edge priorities within a node.
static void setPriorityJunctionPriorities(NBNode &n, bool forceStraight=false)
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.
Container for nodes during the netbuilding process.
Represents a single node (junction) during network building.
static bool isRailwayNode(const NBNode *n)
whether the given node only has rail edges
static void computeNodeTypes(NBNodeCont &nc, NBTrafficLightLogicCont &tlc)
Computes node types.
static void validateRailCrossings(NBNodeCont &nc, NBTrafficLightLogicCont &tlc)
Checks rail_crossing for validity.
Sorts crossings by minimum clockwise clockwise edge angle. Use the ordering found in myAllEdges of th...
int getMinRank(const EdgeVector &e) const
retrieves the minimum index in myAllEdges
int operator()(const std::unique_ptr< NBNode::Crossing > &c1, const std::unique_ptr< NBNode::Crossing > &c2) const
Sorts incoming and outgoing edges clockwise around the given node.
int operator()(NBEdge *e1, NBEdge *e2) const
edge_by_junction_angle_sorter(NBNode *n)
NBNode * myNode
The node to compute the relative angle of.
static void swapWhenReversed(const NBNode *const n, const std::vector< NBEdge * >::iterator &i1, const std::vector< NBEdge * >::iterator &i2)
Assures correct order for same-angle opposite-direction edges.
static void sortNodesEdges(NBNodeCont &nc, bool useNodeShape=false)
Sorts a node's edges clockwise regarding driving direction.
A container for traffic light definitions and built programs.
Sorts "Combination"s by decreasing angle.
int operator()(const Combination &c1, const Combination &c2) const
combination_by_angle_sorter()
static double getFarAngleAtNode(const NBEdge *e, const NBNode *n, double dist=50)
compute angle to junction at a point further away
static void computeTurnDirections(NBNodeCont &nc, bool warn=true)
Computes turnaround destinations for all edges (if exist)
static void computeTurnDirectionsForNode(NBNode *node, bool warn)
Computes turnaround destinations for all incoming edges of the given nodes (if any)
Stores the information about the angle between an incoming ("from") and an outgoing ("to") edge.