117 return (
int)myAvailableLanes.size();
121 void execute(
const int src,
const int dest);
125 std::deque<int>*
spread(
const std::vector<int>& approachingLanes,
int dest)
const;
219 bool updateEdgeGeometries =
false);
440 bool mustBrake(
const NBEdge*
const from,
const NBEdge*
const to,
int fromLane,
int toLane,
bool includePedCrossings)
const;
453 const NBEdge* prohibitorFrom,
const NBEdge* prohibitorTo,
int prohibitorFromLane,
bool lefthand =
false);
464 const NBEdge*
const possProhibitedFrom,
const NBEdge*
const possProhibitedTo,
465 bool regardNonSignalisedLowerPriority)
const;
476 const NBEdge*
const from2,
const NBEdge*
const to2)
const;
488 int fromLane,
int toLane,
bool mayDefinitelyPass,
const std::string& tlID)
const;
566 NBNode* recordError = 0)
const;
667 const Crossing&
getCrossing(
const std::string&
id)
const;
739 int whichLaneOff,
int byLaneOff);
SUMOReal getDisplacementError() const
compute the displacement error during s-curve computation
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges.
Position getEmptyDir() const
Returns something like the most unused direction Should only be used to add source or sink nodes...
bool getKeepClear() const
Returns the keepClear flag.
A structure which describes a connection between edges or lanes.
int numAvailableLanes() const
void setRoundabout()
update the type of this node as a roundabout
std::vector< Crossing > myCrossings
Vector of crossings.
Position getCenter() const
Returns a position that is guaranteed to lie within the node shape.
SUMOReal width
This lane's width.
ApproachingDivider(EdgeVector *approaching, NBEdge *currentOutgoing)
Constructor.
void shiftTLConnectionLaneIndex(NBEdge *edge, int offset)
patches loaded signal plans by modifying lane indices
SUMOReal getRadius() const
Returns the turning radius of this node.
std::string id
the (edge)-id of this crossing
PositionVector myPoly
the (outer) shape of the junction
void execute(const int src, const int dest)
NBEdge * getOppositeIncoming(NBEdge *e) const
const NBConnectionProhibits & getProhibitions()
SUMOReal myRadius
the turning radius (for all corners) at this node in m.
SumoXMLNodeType myType
The type of the junction.
A container for traffic light definitions and built programs.
SUMOReal length
This lane's width.
void reinit(const Position &position, SumoXMLNodeType type, bool updateEdgeGeometries=false)
Resets initial values.
SUMOReal width
This lane's width.
bool isTLControlled() const
Returns whether this node is controlled by any tls.
int myCrossingsLoadedFromSumoNet
number of crossings loaded from a sumo net
This class computes shapes of junctions.
const Crossing & getCrossing(const std::string &id) const
return the crossing with the given id
void removeEdge(NBEdge *edge, bool removeFromConnections=true)
Removes edge from this node and optionally removes connections as well.
void addIncomingEdge(NBEdge *edge)
adds an incoming edge
The representation of a single edge during network building.
void setCrossingTLIndices(int startIndex)
set tl indices of this nodes crossing starting at the given index
int numNormalConnections() const
return the number of lane-to-lane connections at this junction (excluding crossings) ...
Used for sorting the cells by the begin time they describe.
bool hasOutgoing(const NBEdge *const e) const
Returns whether the given edge starts at this node.
A container for districts.
const std::vector< Crossing > & getCrossings() const
return this junctions pedestrian crossings
The base class for traffic light logic definitions.
EdgeVector edgesBetween(const NBEdge *e1, const NBEdge *e2) const
return all edges that lie clockwise between the given edges
bool isJoinedTLSControlled() const
Returns whether this node is controlled by a tls that spans over more than one node.
PositionVector computeInternalLaneShape(NBEdge *fromE, const NBEdge::Connection &con, int numPoints, NBNode *recordError=0) const
Compute the shape for an internal lane.
PositionVector shape
The lane's shape.
edge_by_direction_sorter(NBNode *n)
bool hasCustomShape() const
return whether the shape was set by the user
void buildWalkingAreas(int cornerDetail)
std::string id
the (edge)-id of this walkingArea
EdgeVector getEdgesSortedByAngleAtNodeCenter() const
returns the list of all edges sorted clockwise by getAngleAtNodeToCenter
bool checkIsRemovable() const
void mirrorX()
mirror coordinates along the x-axis
void removeTrafficLight(NBTrafficLightDefinition *tlDef)
Removes the given traffic light from this node.
void setCustomShape(const PositionVector &shape)
set the junction shape
NBConnectionProhibits myBlockedConnections
bool hasIncoming(const NBEdge *const e) const
Returns whether the given edge ends at this node.
int numCrossingsFromSumoNet() const
void addOutgoingEdge(NBEdge *edge)
adds an outgoing edge
#define UNUSED_PARAMETER(x)
void replaceOutgoing(NBEdge *which, NBEdge *by, int laneOff)
Replaces occurences of the first edge within the list of outgoing by the second Connections are remap...
static bool rightTurnConflict(const NBEdge *from, const NBEdge *to, int fromLane, const NBEdge *prohibitorFrom, const NBEdge *prohibitorTo, int prohibitorFromLane, bool lefthand=false)
return whether the given laneToLane connection is a right turn which must yield to a bicycle crossing...
bool priority
whether the pedestrians have priority
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
CustomShapeMap myCustomLaneShapes
NBDistrict * myDistrict
The district the node is the centre of.
A class representing a single district.
std::map< std::string, PositionVector > CustomShapeMap
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges.
const std::string & getID() const
Returns the id.
EdgeVector myAllEdges
Vector of incoming and outgoing edges.
bool needsCont(const NBEdge *fromE, const NBEdge *otherFromE, const NBEdge::Connection &c, const NBEdge::Connection &otherC) const
whether an internal junction should be built at from and respect other
void computeLanes2Lanes()
computes the connections of lanes to edges
void invalidateIncomingConnections()
SUMOReal myDisplacementError
geometry error after computation of internal lane shapes
void removeCrossing(const EdgeVector &edges)
remove a pedestrian crossing from this node (identified by its edges)
void setPriorityJunctionPriorities()
sets the priorites in case of a priority junction
const Position & getPosition() const
Returns the position of this node.
std::string prevWalkingArea
the lane-id of the previous walkingArea
NBEdge * getPossiblySplittedIncoming(const std::string &edgeid)
const std::set< NBTrafficLightDefinition * > & getControllingTLS() const
Returns the traffic lights that were assigned to this node.
int checkCrossing(EdgeVector candidates)
static const int FORWARD
edge directions (for pedestrian related stuff)
int operator()(NBNode *n1, NBNode *n2) const
Comparing operator.
void setRadius(SUMOReal radius)
set the turning radius
A point in 2D or 3D with translation and scaling methods.
bool mustBrakeForCrossing(const NBEdge *const from, const NBEdge *const to, const Crossing &crossing) const
Returns the information whether the described flow must brake for the given crossing.
void buildCrossingsAndWalkingAreas()
SumoXMLNodeType getType() const
Returns the type of this node.
bool geometryLike() const
whether this is structurally similar to a geometry node
void invalidateOutgoingConnections()
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
void removeTrafficLights()
Removes all references to traffic lights that control this tls.
EdgeVector * getEdgesThatApproach(NBEdge *currentOutgoing)
const EdgeVector & getEdges() const
Returns all edges which participate in this node.
std::set< NBTrafficLightDefinition * > myTrafficLights
Storage for edges, including some functionality operating on multiple edges.
void setCustomLaneShape(const std::string &laneID, const PositionVector &shape)
sets a custom shape for an internal lane
std::string nextCrossing
the lane-id of the next crossing
const CustomShapeMap & getCustomLaneShapes() const
sets a custom shape for an internal lane
LinkState getLinkState(const NBEdge *incoming, NBEdge *outgoing, int fromLane, int toLane, bool mayDefinitelyPass, const std::string &tlID) const
bool rightOnRedConflict(int index, int foeIndex) const
whether the given index must yield to the foeIndex while turing right on a red light ...
bool myDiscardAllCrossings
whether to discard all pedestrian crossings
NBNode * myNode
The node to compute the relative angle of.
void replaceInConnectionProhibitions(NBEdge *which, NBEdge *by, int whichLaneOff, int byLaneOff)
LinkDirection getDirection(const NBEdge *const incoming, const NBEdge *const outgoing, bool leftHand=false) const
Returns the representation of the described stream's direction.
const PositionVector & getShape() const
retrieve the junction shape
static PositionVector bezierControlPoints(const PositionVector &begShape, const PositionVector &endShape, bool isTurnaround, SUMOReal extrapolateBeg, SUMOReal extrapolateEnd, bool &ok, NBNode *recordError=0)
NBEdge * getConnectionTo(NBNode *n) const
EdgeVector myIncomingEdges
Vector of incoming edges.
bool isLeftMover(const NBEdge *const from, const NBEdge *const to) const
Computes whether the given connection is a left mover across the junction.
void setKeepClear(bool keepClear)
set the keepClear flag
Base class for objects which have an id.
std::vector< std::pair< NBEdge *, NBEdge * > > getEdgesToJoin() const
int operator()(NBEdge *e1, NBEdge *e2) const
void avoidOverlap()
fix overlap
NBEdge * getPossiblySplittedOutgoing(const std::string &edgeid)
EdgeVector myOutgoingEdges
Vector of outgoing edges.
NBEdge * myCurrentOutgoing
The approached current edge.
static const int BACKWARD
nodes_by_id_sorter()
Constructor.
void addTrafficLight(NBTrafficLightDefinition *tlDef)
Adds a traffic light to the list of traffic lights that control this node.
bool isNearDistrict() const
bool myHaveCustomPoly
whether this nodes shape was set by the user
void addCrossing(EdgeVector edges, SUMOReal width, bool priority, bool fromSumoNet=false)
add a pedestrian crossing to this node
Position myPosition
The position the node lies at.
std::map< NBConnection, NBConnectionVector > NBConnectionProhibits
Definition of a container for connection block dependencies Includes a list of all connections which ...
int removeSelfLoops(NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tc)
Removes edges which are both incoming and outgoing into this node.
~ApproachingDivider()
Destructor.
PositionVector computeSmoothShape(const PositionVector &begShape, const PositionVector &endShape, int numPoints, bool isTurnaround, SUMOReal extrapolateBeg, SUMOReal extrapolateEnd, NBNode *recordError=0) const
Compute a smooth curve between the given geometries.
std::vector< WalkingArea > myWalkingAreas
Vector of walking areas.
void replaceIncoming(NBEdge *which, NBEdge *by, int laneOff)
Replaces occurences of the first edge within the list of incoming by the second Connections are remap...
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
bool mustBrake(const NBEdge *const from, const NBEdge *const to, int fromLane, int toLane, bool includePedCrossings) const
Returns the information whether the described flow must let any other flow pass.
bool myKeepClear
whether the junction area must be kept clear
std::vector< int > myAvailableLanes
The available lanes to which connections shall be built.
Sorts outgoing before incoming edges.
int tlLinkNo
the traffic light index of this crossing (if controlled)
std::vector< NBEdge * > EdgeVector
void buildInnerEdges()
build internal lanes, pedestrian crossings and walking areas
NBNode & operator=(const NBNode &s)
invalidated assignment operator
A definition of a pedestrian walking area.
EdgeVector * myApproaching
The list of edges that approach the current edge.
A storage for options typed value containers)
const NBNode * node
The parent node of this crossing.
static const SUMOReal DEFAULT_CROSSING_WIDTH
default width of pedetrian crossings
std::deque< int > * spread(const std::vector< int > &approachingLanes, int dest) const
EdgeVector edges
The edges being crossed.
bool crossingBetween(const NBEdge *e1, const NBEdge *e2) const
return true if the given edges are connected by a crossing
Represents a single node (junction) during network building.
bool isSimpleContinuation(bool checkLaneNumbers=true) const
int guessCrossings()
guess pedestrian crossings and return how many were guessed
A definition of a pedestrian crossing.
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
Static storage of an output device and its base (abstract) implementation.
Computes lane-2-lane connections.
static const SUMOReal UNSPECIFIED_RADIUS
unspecified lane width
bool writeLogic(OutputDevice &into, const bool checkLaneFoes) const
WalkingArea(const std::string &_id, SUMOReal _width)
void computeLogic(const NBEdgeCont &ec, OptionsCont &oc)
computes the node's type, logic and traffic light
Container for nodes during the netbuilding process.
bool foes(const NBEdge *const from1, const NBEdge *const to1, const NBEdge *const from2, const NBEdge *const to2) const
Returns the information whether the given flows cross.
const std::vector< WalkingArea > & getWalkingAreas() const
return this junctions pedestrian walking areas
void invalidateTLS(NBTrafficLightLogicCont &tlCont)
causes the traffic light to be computed anew
std::string nextWalkingArea
the lane-id of the next walkingArea
NBNode(const std::string &id, const Position &position, SumoXMLNodeType type)
Constructor.
std::vector< std::string > prevSidewalks
the lane-id of the previous sidewalk lane or ""
static bool isTrafficLight(SumoXMLNodeType type)
return whether the given type is a traffic light
Crossing(const NBNode *_node, const EdgeVector &_edges, SUMOReal _width, bool _priority)
std::vector< std::string > nextSidewalks
the lane-id of the next sidewalk lane or ""
void reshiftPosition(SUMOReal xoff, SUMOReal yoff)
Applies an offset to the node.
void computeNodeShape(SUMOReal mismatchThreshold)
Compute the junction shape for this node.
void remapRemoved(NBTrafficLightLogicCont &tc, NBEdge *removed, const EdgeVector &incoming, const EdgeVector &outgoing)
void discardAllCrossings()
PositionVector shape
The polygonal shape.
A storage for available types of edges.
bool forbids(const NBEdge *const possProhibitorFrom, const NBEdge *const possProhibitorTo, const NBEdge *const possProhibitedFrom, const NBEdge *const possProhibitedTo, bool regardNonSignalisedLowerPriority) const
Returns the information whether "prohibited" flow must let "prohibitor" flow pass.
bool forbidsPedestriansAfter(std::vector< std::pair< NBEdge *, bool > > normalizedLanes, int startIndex)
return whether there is a non-sidewalk lane after the given index;
static bool isLongEnough(NBEdge *out, SUMOReal minLength)
static std::string getNodeIDFromInternalLane(const std::string id)
returns the node id for internal lanes, crossings and walkingareas
NBNode * getFromNode() const
Returns the origin node of the edge.