169 Connection(
int fromLane_,
NBEdge* toEdge_,
int toLane_,
bool mayDefinitelyPass_,
170 bool keepClear_ =
true,
174 bool haveVia_ =
false,
175 bool uncontrolled_ =
false,
245 std::string getInternalLaneID()
const;
248 std::string getDescription(
const NBEdge* parent)
const;
313 NBEdge(
const std::string&
id,
315 double speed,
int nolanes,
int priority,
317 const std::string& streetName =
"",
342 NBEdge(
const std::string&
id,
344 double speed,
int nolanes,
int priority,
347 const std::string& streetName =
"",
348 const std::string& origID =
"",
350 bool tryIgnoreNodePositions =
false);
363 NBEdge(
const std::string&
id,
390 double speed,
int nolanes,
int priority,
392 const std::string& streetName,
394 bool tryIgnoreNodePositions =
false);
589 const std::vector<NBEdge::Lane>&
getLanes()
const {
725 void checkGeometry(
const double maxAngle,
const double minRadius,
bool fix);
768 bool mayUseSameDestination =
false,
769 bool mayDefinitelyPass =
false,
770 bool keepClear =
true,
771 double contPos = UNSPECIFIED_CONTPOS,
772 double visibility = UNSPECIFIED_VISIBILITY_DISTANCE,
773 double speed = UNSPECIFIED_SPEED,
775 const bool uncontrolled = UNSPECIFIED_CONNECTION_UNCONTROLLED);
795 NBEdge* dest,
int toLane,
int no,
797 bool mayDefinitelyPass =
false);
812 bool mayUseSameDestination =
false,
813 bool mayDefinitelyPass =
false,
814 bool keepClear =
true,
815 double contPos = UNSPECIFIED_CONTPOS,
816 double visibility = UNSPECIFIED_VISIBILITY_DISTANCE,
817 double speed = UNSPECIFIED_SPEED,
819 const bool uncontrolled = UNSPECIFIED_CONNECTION_UNCONTROLLED);
918 void removeFromConnections(
NBEdge* toEdge,
int fromLane = -1,
int toLane = -1,
bool tryLater =
false,
const bool adaptToLaneRemoval =
false);
1055 void appendTurnaround(
bool noTLSControlled,
bool onlyDeadends,
bool checkPermissions);
1142 void deleteLane(
int index,
bool recompute,
bool shiftIndices);
1145 void addLane(
int index,
bool recomputeShape,
bool recomputeConnections,
bool shiftIndices);
1188 bool setStopOffsets(
int lane, std::map<int, double> offsets,
bool overwrite =
false);
1200 void setOrigID(
const std::string origID);
1208 assert(lane < (
int)
myLanes.size());
1215 assert(lane < (
int)
myLanes.size());
1251 bool isBidiRail(
bool ignoreSpread =
false)
const;
1315 : myTransitions(transitions) { }
1321 void execute(
const int lane,
const int virtEdge);
1347 enum Direction { DIR_RIGHTMOST, DIR_LEFTMOST, DIR_FORWARD };
1396 void init(
int noLanes,
bool tryIgnoreNodePositions,
const std::string& origID);
1568 if (e.
to != myDefinition.to) {
1571 if (e.
fromLane != myDefinition.fromLane) {
1574 if (e.
toLane != myDefinition.toLane) {
1595 myHasFromLane(hasFromLane),
1596 myEdge2Find(edge2find) { }
1600 return c.
toEdge == myEdge2Find && (!myHasFromLane || c.
fromLane != -1);
1620 myEdge2Find(edge2find),
1621 myLane2Find(lane2find),
1622 myFromLane2Find(fromLane2find) { }
1626 return c.
toEdge == myEdge2Find && c.
toLane == myLane2Find && (myFromLane2Find < 0 || c.
fromLane == myFromLane2Find);
1650 myFromLane(fromLane), myEdge2Find(edge2find), myLane2Find(lane2find), myInvertEdge2find(invertEdge2find) { }
1654 return ((c.
fromLane == myFromLane || myFromLane == -1)
1655 && ((!myInvertEdge2find && c.
toEdge == myEdge2Find) || (myInvertEdge2find && c.
toEdge != myEdge2Find))
1656 && (c.
toLane == myLane2Find || myLane2Find == -1));
1683 myFromLane(fromLane), myEdge2Find(edge2find), myCheckRight(checkRight) { }
1687 return (((myCheckRight && c.
fromLane < myFromLane) || (!myCheckRight && c.
fromLane > myFromLane))
1689 && c.
toEdge == myEdge2Find);
ToEdgeConnectionsAdder(const EdgeVector &transitions)
constructor
bool mayBeTLSControlled(int fromLane, NBEdge *toEdge, int toLane) const
return true if certain connection must be controlled by TLS
LaneSpreadFunction getLaneSpreadFunction() const
Returns how this edge's lanes' lateral offset is computed.
static const PositionVector EMPTY
empty Vector
std::string id
id of Connection
void moveConnectionToRight(int lane)
void invalidateConnections(bool reallowSetting=false)
invalidate current connections of edge
bool bothLeftIntersect(const NBNode &n, const PositionVector &shape, LinkDirection dir, NBEdge *otherFrom, const NBEdge::Connection &otherCon, int numPoints, double width2) const
determine conflict between opposite left turns
bool expandableBy(NBEdge *possContinuation, std::string &reason) const
Check if Node is expandable.
void init(int noLanes, bool tryIgnoreNodePositions, const std::string &origID)
Initialization routines common to all constructors.
void appendTurnaround(bool noTLSControlled, bool onlyDeadends, bool checkPermissions)
Add a connection to the previously computed turnaround, if wished.
static const bool UNSPECIFIED_CONNECTION_UNCONTROLLED
TLS-controlled despite its node controlled not specified.
std::vector< Lane > myLanes
Lane information.
double vmax
maximum velocity
double getLength() const
Returns the computed length of the edge.
double getAngleAtNodeToCenter(const NBNode *const node) const
Returns the angle of from the node shape center to where the edge meets the node shape.
bool setControllingTLInformation(const NBConnection &c, const std::string &tlID)
Returns if the link could be set as to be controlled.
void divideOnEdges(const EdgeVector *outgoing)
divides the lanes on the outgoing edges
A structure which describes a connection between edges or lanes.
int getFirstAllowedLaneIndex(int direction) const
return the first lane that permits at least 1 vClass or the last lane if search direction of there is...
int toLane
The lane the connections yields in.
A class representing a single street sign.
void debugPrintConnections(bool outgoing=true, bool incoming=false) const
debugging helper to print all connections
connections_conflict_finder(int fromLane, NBEdge *const edge2find, bool checkRight)
constructor
PositionVector shape
The lane's shape.
static const double UNSPECIFIED_LOADED_LENGTH
no length override given
std::vector< TLSDisabledConnection > myTLSDisabledConnections
vector with the disabled connections
const std::map< int, double > & getStopOffsets() const
Returns the stopOffset to the end of the edge.
connections_relative_edgelane_sorter(NBEdge *e)
constructor
LaneSpreadFunction myLaneSpreadFunction
The information about how to spread the lanes.
void sortOutgoingConnectionsByAngle()
sorts the outgoing connections by their angle relative to their junction
std::string viaID
if Connection have a via, ID of it
void addSign(NBSign sign)
add Sign
NBEdge * toEdge
The edge the connections yields in.
EdgeVector getIncomingEdges() const
Returns the list of incoming edges unsorted.
void mirrorX()
mirror coordinates along the x-axis
static PositionVector startShapeAt(const PositionVector &laneShape, const NBNode *startNode, PositionVector nodeShape)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
static NBEdge DummyEdge
Dummy edge to use when a reference must be supplied in the no-arguments constructor (FOX technicality...
static const double UNSPECIFIED_VISIBILITY_DISTANCE
unspecified foe visibility for connections
void setEndOffset(int lane, double offset)
set lane specific end-offset (negative lane implies set for all lanes)
bool setConnection(int lane, NBEdge *destEdge, int destLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, bool keepClear=true, double contPos=UNSPECIFIED_CONTPOS, double visibility=UNSPECIFIED_VISIBILITY_DISTANCE, double speed=UNSPECIFIED_SPEED, const PositionVector &customShape=PositionVector::EMPTY, const bool uncontrolled=UNSPECIFIED_CONNECTION_UNCONTROLLED)
Adds a connection to a certain lane of a certain edge.
The relationships between edges are computed/loaded.
double getLaneSpeed(int lane) const
get lane speed
void computeEdgeShape(double smoothElevationThreshold=-1)
Recomputeds the lane shapes to terminate at the node shape For every lane the intersection with the f...
bool hasPermissions() const
whether at least one lane has restrictions
bool isConnectedTo(const NBEdge *e) const
Returns the information whethe a connection to the given edge has been added (or computed) ...
void reduceGeometry(const double minDist)
Removes points with a distance lesser than the given.
bool hasSignalisedConnectionTo(const NBEdge *const e) const
Check if edge has signalised connections.
bool operator()(const Connection &c) const
operator ()
std::vector< std::pair< const NBEdge *, const NBEdge * > > NBConstEdgePairVector
double myLaneWidth
This width of this edge's lanes.
std::map< int, double > myStopOffsets
A vClass specific stop offset - assumed of length 0 (unspecified) or 1. For the latter case the int i...
std::vector< NBSign > mySigns
the street signs along this edge
double myEndOffset
This edges's offset to the intersection begin (will be applied to all lanes)
void addLane(int index, bool recomputeShape, bool recomputeConnections, bool shiftIndices)
add lane
void setSpeed(int lane, double speed)
set lane specific speed (negative lane implies set for all lanes)
Holds (- relative to the edge it is build from -!!!) the list of main directions a vehicle that drive...
double getSignalOffset() const
Returns the offset of a traffic signal from the end of this edge.
static const double ANGLE_LOOKAHEAD
the distance at which to take the default angle
int myLane2Find
lane to find
int getJunctionPriority(const NBNode *const node) const
Returns the junction priority (normalised for the node currently build)
void moveConnectionToLeft(int lane)
~ToEdgeConnectionsAdder()
destructor
int getPriority() const
Returns the priority of the edge.
const std::string & getTypeID() const
get ID of type
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
const std::vector< NBSign > & getSigns() const
get Signs
int myFromLane2Find
from lane to find
std::map< NBEdge *, std::vector< int > > myConnections
map of edges to this edge's lanes that reach them
The representation of a single edge during network building.
void reinitNodes(NBNode *from, NBNode *to)
Resets nodes but keeps all other values the same (used when joining)
void clearControllingTLInformation()
clears tlID for all connections
void setNodeBorder(const NBNode *node, const Position &p, const Position &p2, bool rectangularCut)
Set Node border.
Lane2LaneInfoType
Modes of setting connections between lanes.
std::vector< int > * prepareEdgePriorities(const EdgeVector *outgoing)
recomputes the edge priorities and manipulates them for a distribution of lanes on edges which is mor...
Lane(NBEdge *e, const std::string &_origID)
constructor
bool hasLaneSpecificSpeed() const
whether lanes differ in speed
static const double UNSPECIFIED_SIGNAL_OFFSET
unspecified signal offset
bool isBidiRail(bool ignoreSpread=false) const
whether this edge is part of a bidirectional railway
void setStreetName(const std::string &name)
sets the street name of this edge
std::vector< Direction > myDirs
list of the main direction within the following junction relative to the edge
void markAsInLane2LaneState()
mark edge as in lane to state lane
static const double UNSPECIFIED_OFFSET
unspecified lane offset
void removeFromConnections(NBEdge *toEdge, int fromLane=-1, int toLane=-1, bool tryLater=false, const bool adaptToLaneRemoval=false)
Removes the specified connection(s)
double getMaxLaneOffset()
get max lane offset
TLS Disabled Connections.
Lanes to lanes - relationships are computed; should be recheked.
double length
computed length (average of all internal lane shape lengths that share an internal edge) ...
bool hasLoadedLength() const
Returns whether a length was set explicitly.
NBEdge * getTurnDestination(bool possibleDestination=false) const
void setPermissions(SVCPermissions permissions, int lane=-1)
set allowed/disallowed classes for the given lane or for all lanes if -1 is given ...
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
int myFromJunctionPriority
The priority normalised for the node the edge is outgoing of.
void setLoadedLength(double val)
set loaded lenght
void computeLaneShapes()
compute lane shapes
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
tls_disable_finder(const TLSDisabledConnection &tpl)
constructor
double endOffset
This lane's offset to the intersection begin.
PositionVector myGeom
The geometry for the edge.
double visibility
custom foe visiblity for connection
bool operator()(const Connection &c) const
operator ()
void remapConnections(const EdgeVector &incoming)
Remaps the connection in a way that allows the removal of it.
const NBEdge *const myEdge2Find
edge to find
bool connectionsDone
Whether connection information for this lane is already completed.
std::vector< int > getConnectionLanes(NBEdge *currentOutgoing) const
Returns the list of lanes that may be used to reach the given edge.
Lane & getLaneStruct(int lane)
PositionVector myFromBorder
intersection borders (because the node shape might be invalid)
void restoreBikelane(std::vector< NBEdge::Lane > oldLanes, PositionVector oldGeometry, std::vector< NBEdge::Connection > oldConnections)
restore an previously added BikeLane
bool isRailDeadEnd() const
whether this edge is a railway edge that does not continue
bool setStopOffsets(int lane, std::map< int, double > offsets, bool overwrite=false)
set lane and vehicle class specific stopOffset (negative lane implies set for all lanes) ...
void addSidewalk(double width)
add a pedestrian sidewalk of the given width and shift existing connctions
void setGeometry(const PositionVector &g, bool inner=false)
(Re)sets the edge's geometry
bool hasLaneSpecificStopOffsets() const
whether lanes differ in stopOffsets
double getShapeStartAngle() const
Returns the angle at the start of the edge.
static const double UNSPECIFIED_WIDTH
unspecified lane width
void setInternal()
Marks this edge being within an intersection.
const EdgeVector & myTransitions
the transition from the virtual lane to the edge it belongs to
void assignInternalLaneLength(std::vector< Connection >::iterator i, int numLanes, double lengthSum)
assign length to all lanes of an internal edge
PositionVector customShape
custom shape for connection
The connection was computed and validated.
bool hasDefaultGeometryEndpoints() const
Returns whether the geometry is terminated by the node positions This default may be violated by init...
void shortenGeometryAtNode(const NBNode *node, double reduction)
linearly extend the geometry at the given node
void setLaneShape(int lane, const PositionVector &shape)
sets a custom lane shape
bool accelRamp
Whether this lane is an acceleration lane.
void setAcceleration(int lane, bool accelRamp)
marks one lane as acceleration lane
PositionVector cutAtIntersection(const PositionVector &old) const
cut shape at the intersection shapes
The edge has been loaded, nothing is computed yet.
NBNode * tryGetNodeAtPosition(double pos, double tolerance=5.0) const
Returns the node at the given edges length (using an epsilon)
int getFirstNonPedestrianLaneIndex(int direction, bool exclusive=false) const
return the first lane with permissions other than SVC_PEDESTRIAN and 0
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
bool myInvertEdge2find
invert edge to find
int myToJunctionPriority
The priority normalised for the node the edge is incoming in.
PositionVector shape
shape of Connection
static const double UNSPECIFIED_SPEED
unspecified lane speed
void restoreSidewalk(std::vector< NBEdge::Lane > oldLanes, PositionVector oldGeometry, std::vector< NBEdge::Connection > oldConnections)
restore an previously added sidewalk
bool addLane2LaneConnection(int fromLane, NBEdge *dest, int toLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, bool keepClear=true, double contPos=UNSPECIFIED_CONTPOS, double visibility=UNSPECIFIED_VISIBILITY_DISTANCE, double speed=UNSPECIFIED_SPEED, const PositionVector &customShape=PositionVector::EMPTY, const bool uncontrolled=UNSPECIFIED_CONNECTION_UNCONTROLLED)
Adds a connection between the specified this edge's lane and an approached one.
bool keepClear
whether the junction must be kept clear when using this connection
void addRestrictedLane(double width, SUMOVehicleClass vclass)
add a lane of the given width, restricted to the given class and shift existing connections ...
std::vector< Connection > getConnectionsFromLane(int lane) const
Returns connections from a given lane.
An (internal) definition of a single lane of an edge.
SVCPermissions permissions
List of vehicle types that are allowed on this lane.
bool addEdge2EdgeConnection(NBEdge *dest)
Adds a connection to another edge.
void incLaneNo(int by)
increment lane
bool myAmMacroscopicConnector
Information whether this edge is a (macroscopic) connector.
bool computeLanes2Edges()
computes the edge, step2: computation of which lanes approach the edges)
NBEdge * myTurnDestination
The turn destination edge (if a connection exists)
bool operator()(const Connection &c) const
operator ()
double myStartAngle
The angles of the edge.
bool hasLaneSpecificWidth() const
whether lanes differ in width
connections_finder(int fromLane, NBEdge *const edge2find, int lane2find, bool invertEdge2find=false)
constructor
double speed
custom speed for connection
Lanes to lanes - relationships are loaded; no recheck is necessary/wished.
bool hasLaneSpecificEndOffset() const
whether lanes differ in offset
void addCrossingPointsAsIncomingWithGivenOutgoing(NBEdge *o, PositionVector &into)
add crossing points as incoming with given outgoing
bool hasDefaultGeometryEndpointAtNode(const NBNode *node) const
Returns whether the geometry is terminated by the node positions This default may be violated by init...
void decLaneNo(int by)
decrement lane
std::string tlID
The id of the traffic light that controls this connection.
SVCPermissions preferred
List of vehicle types that are preferred on this lane.
std::string getLaneID(int lane) const
get Lane ID (Secure)
int getNumLanes() const
Returns the number of lanes.
int fromLane
The lane the connections starts at.
A point in 2D or 3D with translation and scaling methods.
NBEdge()
constructor for dummy edge
TLSDisabledConnection myDefinition
definition of disable connection
NBEdge & operator=(const NBEdge &s)
invalidated assignment operator
int getNumericalID() const
Returns the index (numeric id) of the edge.
bool addLane2LaneConnections(int fromLane, NBEdge *dest, int toLane, int no, Lane2LaneInfoType type, bool invalidatePrevious=false, bool mayDefinitelyPass=false)
Builds no connections starting at the given lanes.
void setOrigID(const std::string origID)
set origID for all lanes
const PositionVector getInnerGeometry() const
Returns the geometry of the edge without the endpoints.
void moveOutgoingConnectionsFrom(NBEdge *e, int laneOff)
move outgoing connection
static int computePrioritySum(const std::vector< int > &priorities)
computes the sum of the given list's entries (sic!)
static bool connections_sorter(const Connection &c1, const Connection &c2)
connections_sorter sort by fromLane, toEdge and toLane
void resetNodeBorder(const NBNode *node)
static const double UNSPECIFIED_CONTPOS
unspecified internal junction position
bool needsLaneSpecificOutput() const
whether at least one lane has values differing from the edges values
connections_toedge_finder(const NBEdge *const edge2find, bool hasFromLane=false)
constructor
std::vector< Connection > & getConnections()
Returns the connections.
const Lane & getLaneStruct(int lane) const
void deleteLane(int index, bool recompute, bool shiftIndices)
delete lane
bool hasConnectionTo(NBEdge *destEdge, int destLane, int fromLane=-1) const
Retrieves info about a connection to a certain lane of a certain edge.
EdgeBuildingStep
Current state of the edge within the building process.
bool operator()(const TLSDisabledConnection &e) const
operator ()
NBEdge * myPossibleTurnDestination
The edge that would be the turn destination if there was one.
void setAsMacroscopicConnector()
bool hasDefaultGeometry() const
Returns whether the geometry consists only of the node positions.
void setSignalOffset(double offset)
sets the offset of a traffic signal from the end of this edge
static int getLaneIndexFromLaneID(const std::string laneID)
int myPriority
The priority of the edge.
static double firstIntersection(const PositionVector &v1, const PositionVector &v2, double width2)
compute the first intersection point between the given lane geometries considering their rspective wi...
NBConstEdgePairVector myViaSuccessors
Storage for edges, including some functionality operating on multiple edges.
std::string getSidewalkID()
get the lane id for the canonical sidewalk lane
EdgeBuildingStep myStep
The building step.
EdgeBuildingStep getStep() const
The building step of this edge.
const bool myHasFromLane
check if has from lane
const std::string & getStreetName() const
Returns the street name of this edge.
double getAngleAtNode(const NBNode *const node) const
Returns the angle of the edge's geometry at the given node.
Class to sort edges by their angle.
A vehicle as used by router.
void buildInnerEdges(const NBNode &n, int noInternalNoSplits, int &linkIndex, int &splitIndex)
PositionVector getCWBoundaryLine(const NBNode &n) const
get the outer boundary of this edge when going clock-wise around the given node
double getEndOffset() const
Returns the offset to the destination node.
std::vector< Connection > myConnections
List of connections to following edges.
std::string getLaneIDInsecure(int lane) const
get Lane ID (Insecure)
connections_fromlane_finder(int lane2find)
The connection was given by the user.
An upper class for objects with additional parameters.
double speed
The speed allowed on this lane.
double width
This lane's width.
std::set< SVCPermissions > getPermissionVariants(int iStart, int iEnd) const
return all permission variants within the specified lane range [iStart, iEnd[
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
bool lanesWereAssigned() const
Check if lanes were assigned.
double getFinalLength() const
get length that will be assigned to the lanes in the final network
bool myAmInnerEdge
Information whether this is a junction-inner edge.
int myIndex
the index of the edge in the list of all edges. Set by NBEdgeCont and requires re-set whenever the li...
int tlLinkIndex
The index of this connection within the controlling traffic light.
bool hasLaneSpecificPermissions() const
whether lanes differ in allowed vehicle classes
Base class for objects which have an id.
bool recheckLanes()
recheck whether all lanes within the edge are all right and optimises the connections once again ...
int myLane2Find
index of lane to find
bool hasLaneParams() const
whether one of the lanes has parameters set
void reinit(NBNode *from, NBNode *to, const std::string &type, double speed, int nolanes, int priority, PositionVector geom, double width, double endOffset, const std::string &streetName, LaneSpreadFunction spread=LANESPREAD_RIGHT, bool tryIgnoreNodePositions=false)
Resets initial values.
double mySpeed
The maximal speed.
double getSpeed() const
Returns the speed allowed on this edge.
int internalLaneIndex
The lane index of this internal lane within the internal edge.
const PositionVector & getGeometry() const
Returns the geometry of the edge.
void extendGeometryAtNode(const NBNode *node, double maxExtent)
linearly extend the geometry at the given node
int myLane2Find
lane to find
A road/street connecting two junctions (netedit-version)
bool myCheckRight
check if is right
JunctionPriority
junction priority values set by setJunctionPriority
Connection getConnection(int fromLane, const NBEdge *to, int toLane) const
Returns the specified connection This method goes through "myConnections" and returns the specified o...
double getLaneWidth() const
Returns the default width of lanes of this edge.
double getTotalAngle() const
Returns the angle at the start of the edge.
void setTurningDestination(NBEdge *e, bool onlyPossible=false)
Sets the turing destination at the given edge.
int myFromLane
index of from lane
void addStraightConnections(const EdgeVector *outgoing, const std::vector< int > &availableLanes, const std::vector< int > *priorities)
add some straight connections
void disableConnection4TLS(int fromLane, NBEdge *toEdge, int toLane)
disable connections for TLS
PositionVector viaShape
shape of via
std::string oppositeID
An opposite lane ID, if given.
bool hasAccelLane() const
whether one of the lanes is an acceleration lane
const PositionVector & getLaneShape(int i) const
Returns the shape of the nth lane.
const std::vector< Connection > & getConnections() const
Returns the connections.
PositionVector myToBorder
std::map< int, double > stopOffsets
stopOffsets.second - The stop offset for vehicles stopping at the lane's end. Applies if vClass is in...
double getCrossingAngle(NBNode *node)
return the angle for computing pedestrian crossings at the given node
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
double getTotalWidth() const
Returns the combined width of all lanes of this edge.
static const int UNSPECIFIED_INTERNAL_LANE_INDEX
internal lane computation not yet done
NBEdge * myEdge
the edge to compute the relative angle of
void setPreferredVehicleClass(SVCPermissions permissions, int lane=-1)
set preferred Vehicle Class
const PositionVector & getNodeBorder(const NBNode *node)
double mySignalOffset
the offset of a traffic light signal from the end of this edge (-1 for None)
The edge has been loaded and connections shall not be added.
bool hasCustomLaneShape() const
whether one of the lanes has a custom shape
bool operator()(const Connection &c) const
operator ()
std::vector< Connection > myConnectionsToDelete
List of connections marked for delayed removal.
double contPos
custom position for internal junction on this connection
std::vector< std::string > foeIncomingLanes
FOE Incomings lanes.
bool uncontrolled
check if Connection is uncontrolled
connections_toedgelane_finder(NBEdge *const edge2find, int lane2find, int fromLane2find)
constructor
void setJunctionPriority(const NBNode *const node, int prio)
Sets the junction priority of the edge.
void addBikeLane(double width)
add a bicycle lane of the given width and shift existing connctions
const EdgeVector * getConnectedSorted()
Returns the list of outgoing edges without the turnaround sorted in clockwise direction.
static double getTravelTimeStatic(const NBEdge *const edge, const NBVehicle *const, double)
NBEdge *const myEdge2Find
edge to find
void restoreRestrictedLane(SUMOVehicleClass vclass, std::vector< NBEdge::Lane > oldLanes, PositionVector oldGeometry, std::vector< NBEdge::Connection > oldConnections)
restore a restricted lane
void sortOutgoingConnectionsByIndex()
sorts the outgoing connections by their from-lane-index and their to-lane-index
NBEdge *const myEdge2Find
edge to find
std::string myType
The type of the edge.
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge's lateral offset shal...
void append(NBEdge *continuation)
append another edge
double getStartAngle() const
Returns the angle at the start of the edge (relative to the node shape center) The angle is computed ...
bool isTurningDirectionAt(const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
void declareConnectionsAsLoaded(EdgeBuildingStep step=LANES2LANES_USER)
declares connections as fully loaded. This is needed to avoid recomputing connections if an edge has ...
The connection was computed.
bool operator()(const Connection &c) const
operator ()
Represents a single node (junction) during network building.
bool isInternal() const
Returns whether this edge was marked as being within an intersection.
void dismissVehicleClassInformation()
dimiss vehicle class information
Lanes to lanes - relationships are computed; no recheck is necessary/wished.
const NBConstEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges for the given vClass.
void replaceInConnections(NBEdge *which, NBEdge *by, int laneOff)
replace in current connections of edge
EdgeVector getConnectedEdges() const
Returns the list of outgoing edges unsorted.
Static storage of an output device and its base (abstract) implementation.
Direction
enum of possible directions
const EdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges for the given vClass.
void preferVehicleClass(int lane, SUMOVehicleClass vclass)
prefer certain vehicle class
bool isMacroscopicConnector() const
Returns whether this edge was marked as a macroscopic connector.
void checkGeometry(const double maxAngle, const double minRadius, bool fix)
Check the angles of successive geometry segments.
void allowVehicleClass(int lane, SUMOVehicleClass vclass)
set allowed class for the given lane or for all lanes if -1 is given
void insertConnection(NBEdge::Connection connection)
insert a previously created NBEdge::connection
void addGeometryPoint(int index, const Position &p)
Adds a further geometry point.
void shiftToLanesToEdge(NBEdge *to, int laneOff)
modifify the toLane for all connections to the given edge
void computeAngle()
computes the angle of this edge and stores it in myAngle
NBNode * getFromNode() const
Returns the origin node of the edge.
Container for nodes during the netbuilding process.
bool computeEdge2Edges(bool noLeftMovers)
computes the edge (step1: computation of approached edges)
PositionVector getCCWBoundaryLine(const NBNode &n) const
get the outer boundary of this edge when going counter-clock-wise around the given node ...
int myFromLane
index of from lane
bool haveVia
check if Connection have a Via
double getLoadedLength() const
Returns the length was set explicitly or the computed length if it wasn't set.
void setLaneSpreadFunction(LaneSpreadFunction spread)
(Re)sets how the lanes lateral offset shall be computed
double myLength
The length of the edge.
void divideSelectedLanesOnEdges(const EdgeVector *outgoing, const std::vector< int > &availableLanes, const std::vector< int > *priorities)
divide selected lanes on edges
PositionVector computeLaneShape(int lane, double offset) const
Computes the shape for the given lane.
double getShapeEndAngle() const
Returns the angle at the end of the edge.
double myLoadedLength
An optional length to use (-1 if not valid)
Lanes to edges - relationships are computed/loaded.
std::string myStreetName
The street name (or whatever arbitrary string you wish to attach)
PositionVector customShape
A custom shape for this lane set by the user.
NBNode * myFrom
The source and the destination node.
bool canMoveConnection(const Connection &con, int newFromLane) const
whether the connection can originate on newFromLane
Connection & getConnectionRef(int fromLane, const NBEdge *to, int toLane)
Returns reference to the specified connection This method goes through "myConnections" and returns th...
bool isNearEnough2BeJoined2(NBEdge *e, double threshold) const
Check if edge is near enought to be joined to another edge.
NBNode * getToNode() const
Returns the destination node of the edge.
std::vector< int > foeInternalLinks
FOE Internal links.
void setNumericalID(int index)
sets the index of the edge in the list of all network edges
void shiftPositionAtNode(NBNode *node, NBEdge *opposite)
shift geometry at the given node to avoid overlap
NBEdge *const myEdge2Find
edge to find
vehicles ignoring classes
void disallowVehicleClass(int lane, SUMOVehicleClass vclass)
set disallowed class for the given lane or for all lanes if -1 is given
void copyConnectionsFrom(NBEdge *src)
copy connections from antoher edge
A class that being a bresenham-callback assigns the incoming lanes to the edges.
void setLaneWidth(int lane, double width)
set lane specific width (negative lane implies set for all lanes)
double getEndAngle() const
Returns the angle at the end of the edge (relative to the node shape center) The angle is computed in...
void reshiftPosition(double xoff, double yoff)
Applies an offset to the edge.
const std::map< NBEdge *, std::vector< int > > & getBuiltConnections() const
get built connections
NBEdge::Lane getFirstNonPedestrianLane(int direction) const
get first non-pedestrian lane
bool splitGeometry(NBEdgeCont &ec, NBNodeCont &nc)
Splits this edge at geometry points.