117 NBEdge*
retrieve(
const std::string&
id,
bool retrieveExtracted =
false)
const;
185 std::map<std::string, NBEdge*>::const_iterator
begin()
const {
193 std::map<std::string, NBEdge*>::const_iterator
end()
const {
272 const std::string& firstEdgeName,
const std::string& secondEdgeName,
273 int noLanesFirstEdge,
int noLanesSecondEdge,
274 const double speed = -1.,
const int changedLeft = 0);
293 const std::string& firstEdgeName,
const std::string& secondEdgeName,
294 int noLanesFirstEdge,
int noLanesSecondEdge,
295 const double speed = -1.,
const int changedLeft = 0);
362 void checkGeometries(
const double maxAngle,
const double minRadius,
bool fix);
420 void appendTurnarounds(
bool noTLSControlled,
bool onlyDeadends,
bool noGeometryLike);
540 void addPostProcessConnection(
const std::string& from,
int fromLane,
const std::string& to,
int toLane,
bool mayDefinitelyPass,
541 bool keepClear,
double contPos,
double visibility,
double speed,
585 void checkOverlap(
double threshold,
double zThreshold)
const;
627 bool mayDefinitelyPass_,
bool keepClear_,
double contPos_,
double visibility_,
double speed_,
631 from(from_), fromLane(fromLane_), to(to_), toLane(toLane_), mayDefinitelyPass(mayDefinitelyPass_), keepClear(keepClear_), contPos(contPos_),
632 visibility(visibility_),
634 customShape(customShape_),
635 uncontrolled(uncontrolled_),
636 warnOnly(warnOnly_) {
std::map< std::string, std::vector< PostProcessConnection > > myConnections
The list of connections to recheck.
split_sorter()
Constructor.
NBEdge * getByID(const std::string &edgeID) const
Returns the edge with id if it exists.
void sortOutgoingLanesConnections()
Sorts all lanes of all edges within the container by their direction.
void markRoundabouts()
mark edge priorities and prohibit turn-arounds for all roundabout edges
EdgeVector getGeneratedFrom(const std::string &id) const
Returns the edges which have been built by splitting the edge of the given id.
void reduceGeometries(const double minDist)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
A structure which describes changes of lane number or speed along the road.
double contPos
custom position for internal junction on this connection
A container for traffic light definitions and built programs.
int guessRoundabouts()
Determines which edges belong to roundabouts and increases their priority.
bool myRemoveEdgesAfterJoining
Whether edges shall be joined first, then removed.
NBEdge * getOppositeByID(const std::string &edgeID) const
Returns the edge with negated id if it exists.
std::string nameID
the default node id
std::map< std::string, NBEdge * > EdgeCont
The type of the dictionary where an edge may be found by its id.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
The representation of a single edge during network building.
void guessOpposites()
Sets opposite lane information for geometrically close edges.
void removeRoundabout(const NBNode *node)
remove roundabout that contains the given node
bool uncontrolled
whether this connection shall not be controlled by a traffic light
A container for districts.
void generateStreetSigns()
assigns street signs to edges based on toNode types
void rename(NBEdge *edge, const std::string &newID)
Renames the edge. Throws exception if newID already exists.
bool splitAt(NBDistrictCont &dc, NBEdge *edge, NBNode *node)
Splits the edge at the position nearest to the given node.
void recheckPostProcessConnections()
Try to set any stored connections.
std::string idAfter
The id for the edge after the split.
std::vector< NBRouterEdge * > RouterEdgeVector
std::map< std::string, NBEdge * >::const_iterator end() const
Returns the pointer to the end of the stored edges.
PositionVector customShape
custom shape for connection
int getNoEdgeSplits() const
Returns the number of edge splits.
void computeLanes2Edges()
Computes for each edge which lanes approach the next edges.
void checkGeometries(const double maxAngle, const double minRadius, bool fix)
void checkOverlap(double threshold, double zThreshold) const
check whether edges overlap
int joinLanes(SVCPermissions perms)
join adjacent lanes with the given permissions
void checkGrade(double threshold) const
check whether edges are to steep
PositionVector myPruningBoundary
Boundary within which an edge must be located in order to be kept.
double pos
The position of this change.
NBEdgeCont(NBTypeCont &tc)
Constructor.
int guessSpecialLanes(SUMOVehicleClass svc, double width, double minSpeed, double maxSpeed, bool fromPermissions, const std::string &excludeOpt)
add sidwalks to edges within the given limits or permissions and return the number of edges affected ...
RouterEdgeVector getAllRouterEdges() const
NBNode * node
The new node that is created for this split.
SVCPermissions myVehicleClasses2Keep
Set of vehicle types which must be allowed on edges in order to keep them.
bool keepClear
Whether the connection may be passed without braking.
int operator()(const Split &e1, const Split &e2) const
Comparing operator.
double myEdgesMinSpeed
The minimum speed an edge may have in order to be kept (default: -1)
std::map< std::string, NBEdge * >::const_iterator begin() const
Returns the pointer to the begin of the stored edges.
std::set< NBEdge * > EdgeSet
container for unique edges
void patchRoundabouts(NBEdge *orig, NBEdge *part1, NBEdge *part2, std::set< EdgeSet > &roundabouts)
fix roundabout information after splitting an edge
double visibility
custom foe visiblity for connection
bool insert(NBEdge *edge, bool ignorePrunning=false)
Adds an edge to the dictionary.
NBEdge * retrievePossiblySplit(const std::string &id, bool downstream) const
Tries to retrieve an edge, even if it is splitted.
int offsetFactor
direction in which to apply the offset (used by netgenerate for lefthand networks) ...
void removeUnwishedEdges(NBDistrictCont &dc)
Removes unwished edges (not in keep-edges)
void addPostProcessConnection(const std::string &from, int fromLane, const std::string &to, int toLane, bool mayDefinitelyPass, bool keepClear, double contPos, double visibility, double speed, const PositionVector &customShape, bool uncontrolled, bool warnOnly)
Adds a connection which could not be set during loading.
void extract(NBDistrictCont &dc, NBEdge *edge, bool remember=false)
Removes the given edge from the container like erase but does not delete it.
void applyOptions(OptionsCont &oc)
Initialises the storage by applying given options.
bool mayDefinitelyPass
Whether the connection may be passed without braking.
bool wasRemoved(std::string id) const
Returns whether the edge with the id was deleted explicitly.
std::set< std::string > myEdges2Keep
Set of ids of edges which shall explicitly be kept.
void computeEdge2Edges(bool noLeftMovers)
Computes for each edge the approached edges.
void computeLaneShapes()
Computes the shapes of all lanes of all edges stored in the container.
void clearControllingTLInformation() const
Clears information about controlling traffic lights for all connenections of all edges.
static double formFactor(const EdgeVector &loopEdges)
compute the form factor for a loop of edges
Storage for edges, including some functionality operating on multiple edges.
void processSplits(NBEdge *e, std::vector< Split > splits, NBNodeCont &nc, NBDistrictCont &dc, NBTrafficLightLogicCont &tlc)
void splitGeometry(NBNodeCont &nc)
Splits edges into multiple if they have a complex geometry.
EdgeCont myEdges
The instance of the dictionary (id->edge)
bool warnOnly
whether a failure to set this connection is a warning or an error
const std::set< EdgeSet > getRoundabouts() const
Returns the determined roundabouts.
std::vector< int > lanes
The lanes after this change.
void clear()
Deletes all edges.
EdgeCont myExtractedEdges
The extracted nodes which are kept for reference.
std::set< EdgeSet > myGuessedRoundabouts
Edges marked as belonging to a roundabout after guessing.
std::set< EdgeSet > myRoundabouts
Edges marked as belonging to a roundabout by the user (each EdgeVector is a roundabout) ...
PostProcessConnection(const std::string &from_, int fromLane_, const std::string &to_, int toLane_, bool mayDefinitelyPass_, bool keepClear_, double contPos_, double visibility_, double speed_, const PositionVector &customShape_, bool uncontrolled_, bool warnOnly_)
Constructor.
void joinSameNodeConnectingEdges(NBDistrictCont &dc, NBTrafficLightLogicCont &tlc, EdgeVector edges)
Joins the given edges because they connect the same nodes.
SVCPermissions myVehicleClasses2Remove
Set of vehicle types which need not be supported (edges which allow ONLY these are removed) ...
std::string from
The id of the edge the connection starts at.
std::set< std::string > myTypes2Keep
Set of edges types which shall be kept.
EdgeVector getAllEdges() const
return all edges
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
double speed
custom speed for connection
bool myNeedGeoTransformedPruningBoundary
whether a geo transform has been applied to the pruning boundary
int toLane
The number of the lane the connection ends at.
int size() const
Returns the number of edges.
A storage for options typed value containers)
void erase(NBDistrictCont &dc, NBEdge *edge)
Removes the given edge from the container (deleting it)
NBEdgeCont & operator=(const NBEdgeCont &s)
invalidated assignment operator
A structure representing a connection between two lanes.
double speed
The speed after this change.
Sorts splits by their position (increasing)
void appendRailwayTurnarounds(const NBPTStopCont &sc)
Appends turnarounds to all bidiRail edges with stops.
void ignore(std::string id)
mark the given edge id as ignored
bool hasPostProcessConnection(const std::string &from, const std::string &to="")
Represents a single node (junction) during network building.
NBTypeCont & myTypeCont
The network builder; used to obtain type information.
std::string to
The id of the edge the connection ends at.
void recheckLaneSpread()
Rechecks whether the lane spread is proper.
Static storage of an output device and its base (abstract) implementation.
void computeEdgeShapes(double smoothElevationThreshold=-1)
Computes the shapes of all edges stored in the container.
std::set< std::string > myTypes2Remove
Set of edges types which shall be removed.
bool wasIgnored(std::string id) const
Returns whether the edge with the id was ignored during parsing.
void recheckLanes()
Rechecks whether all lanes have a successor for each of the stored edges.
Container for nodes during the netbuilding process.
int fromLane
The number of the lane the connection starts at.
std::set< std::string > myIgnoredEdges
The ids of ignored edges.
void addRoundabout(const EdgeSet &roundabout)
add user specified roundabout
std::vector< std::string > getAllNames() const
Returns all ids of known edges.
int remapIDs(bool numericaIDs, bool reservedIDs, const std::string &prefix, NBPTStopCont &sc)
remap node IDs accoring to options –numerical-ids and –reserved-ids
std::string idBefore
The id for the edge before the split.
void appendTurnarounds(bool noTLSControlled, bool onlyDeadends, bool noGeometryLike)
Appends turnarounds to all edges stored in the container.
bool ignoreFilterMatch(NBEdge *edge)
Returns true if this edge matches one of the removal criteria.
A storage for available types of edges.
double offset
lateral offset to edge geometry
int myEdgesSplit
the number of splits of edges during the building
std::set< std::string > myEdges2Remove
Set of ids of edges which shall explicitly be removed.