113 void execute(
const unsigned int src,
const unsigned int dest);
117 std::deque<int>*
spread(
const std::vector<int>& approachingLanes,
int dest)
const;
156 bool updateEdgeGeometries =
false);
368 const NBEdge*
const possProhibitedFrom,
const NBEdge*
const possProhibitedTo,
369 bool regardNonSignalisedLowerPriority)
const;
380 const NBEdge*
const from2,
const NBEdge*
const to2)
const;
391 int fromLane,
bool mayDefinitelyPass,
const std::string& tlID)
const;
420 NBEdge* fromE,
int fromL,
NBEdge* toE,
int toL,
int numPoints = 5)
const;
483 unsigned int whichLaneOff,
unsigned int byLaneOff);
void replaceIncoming(NBEdge *which, NBEdge *by, unsigned int laneOff)
Replaces occurences of the first edge within the list of incoming by the second Connections are remap...
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...
A structure which describes a connection between edges or lanes.
void setRoundabout()
update the type of this node as a roundabout
Position getCenter() const
Returns a position that is guaranteed to lie within the node shape.
ApproachingDivider(EdgeVector *approaching, NBEdge *currentOutgoing)
Constructor.
PositionVector myPoly
the (outer) shape of the junction
NBEdge * getOppositeIncoming(NBEdge *e) const
const NBConnectionProhibits & getProhibitions()
void execute(const unsigned int src, const unsigned int dest)
SumoXMLNodeType myType
The type of the junction.
A container for traffic light definitions and built programs.
void reinit(const Position &position, SumoXMLNodeType type, bool updateEdgeGeometries=false)
Resets initial values.
bool isTLControlled() const
Returns whether this node is controlled by any tls.
PositionVector computeInternalLaneShape(NBEdge *fromE, int fromL, NBEdge *toE, int toL, int numPoints=5) const
Compute the shape for an internal lane.
This class computes shapes of junctions.
void computeNodeShape(bool leftHand)
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.
bool mustBrake(const NBEdge *const from, const NBEdge *const to, int toLane) const
Returns the information whether the described flow must let any other flow pass.
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.
The base class for traffic light logic definitions.
bool isJoinedTLSControlled() const
Returns whether this node is controlled by a tls that spans over more than one node.
bool checkIsRemovable() const
void removeTrafficLight(NBTrafficLightDefinition *tlDef)
Removes the given traffic light from this node.
NBConnectionProhibits myBlockedConnections
bool hasIncoming(const NBEdge *const e) const
Returns whether the given edge ends at this node.
void addOutgoingEdge(NBEdge *edge)
adds an outgoing edge
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
NBDistrict * myDistrict
The district the node is the centre of.
A class representing a single district.
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.
void computeLanes2Lanes()
computes the connections of lanes to edges
void invalidateIncomingConnections()
void setPriorityJunctionPriorities()
sets the priorites in case of a priority junction
const Position & getPosition() const
Returns the position of this node.
NBEdge * getPossiblySplittedIncoming(const std::string &edgeid)
const std::set< NBTrafficLightDefinition * > & getControllingTLS() const
Returns the traffic lights that were assigned to this node.
bool isSimpleContinuation() const
int operator()(NBNode *n1, NBNode *n2) const
Comparing operator.
A point in 2D or 3D with translation and scaling methods.
bool needsCont(NBEdge *fromE, NBEdge *toE, NBEdge *otherFromE, NBEdge *otherToE, const NBEdge::Connection &c) const
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.
const PositionVector & getShape() const
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.
Base class for objects which have an id.
std::vector< std::pair< NBEdge *, NBEdge * > > getEdgesToJoin() const
NBEdge * getPossiblySplittedOutgoing(const std::string &edgeid)
unsigned int removeSelfLoops(NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tc)
Removes edges which are both incoming and outgoing into this node.
EdgeVector myOutgoingEdges
Vector of outgoing edges.
NBEdge * myCurrentOutgoing
The approached current edge.
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
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 ...
void replaceOutgoing(NBEdge *which, NBEdge *by, unsigned int laneOff)
Replaces occurences of the first edge within the list of outgoing by the second Connections are remap...
~ApproachingDivider()
Destructor.
LinkState getLinkState(const NBEdge *incoming, NBEdge *outgoing, int fromLane, bool mayDefinitelyPass, const std::string &tlID) const
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
void replaceInConnectionProhibitions(NBEdge *which, NBEdge *by, unsigned int whichLaneOff, unsigned int byLaneOff)
std::vector< NBEdge * > EdgeVector
NBNode & operator=(const NBNode &s)
invalidated assignment operator
EdgeVector * myApproaching
The list of edges that approach the current edge.
A storage for options typed value containers)
std::deque< int > * spread(const std::vector< int > &approachingLanes, int dest) const
Represents a single node (junction) during network building.
NBNode(const std::string &id, const Position &position)
Constructor.
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
Static storage of an output device and its base (abstract) implementation.
Computes lane-2-lane connections.
bool writeLogic(OutputDevice &into, const bool checkLaneFoes) const
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.
void invalidateTLS(NBTrafficLightLogicCont &tlCont)
causes the traffic light to be computed anew
void reshiftPosition(SUMOReal xoff, SUMOReal yoff)
Applies an offset to the node.
void remapRemoved(NBTrafficLightLogicCont &tc, NBEdge *removed, const EdgeVector &incoming, const EdgeVector &outgoing)
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.
LinkDirection getDirection(const NBEdge *const incoming, const NBEdge *const outgoing) const
Returns the representation of the described stream's direction.