 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
59 if (!oc.
isSet(
"output-file")) {
63 std::map<SumoXMLAttr, std::string> attrs;
68 const int cornerDetail = oc.
getInt(
"junctions.corner-detail");
69 if (cornerDetail > 0) {
72 if (!oc.
isDefault(
"junctions.internal-link-detail")) {
75 if (oc.
getBool(
"rectangular-lane-cut")) {
81 if (oc.
getFloat(
"junctions.limit-turn-speed") > 0) {
84 if (!oc.
isDefault(
"check-lane-foes.all")) {
87 if (!oc.
isDefault(
"check-lane-foes.roundabout")) {
104 if (!oc.
getBool(
"no-internal-links")) {
106 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
115 bool noNames = !oc.
getBool(
"output.street-names");
116 for (std::map<std::string, NBEdge*>::const_iterator i = ec.
begin(); i != ec.
end(); ++i) {
117 writeEdge(device, *(*i).second, noNames);
125 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
129 const bool includeInternal = !oc.
getBool(
"no-internal-links");
130 if (includeInternal) {
133 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
142 int numConnections = 0;
143 for (std::map<std::string, NBEdge*>::const_iterator it_edge = ec.
begin(); it_edge != ec.
end(); it_edge++) {
144 NBEdge* from = it_edge->second;
145 const std::vector<NBEdge::Connection> connections = from->
getConnections();
146 numConnections += (int)connections.size();
147 for (std::vector<NBEdge::Connection>::const_iterator it_c = connections.begin(); it_c != connections.end(); it_c++) {
151 if (numConnections > 0) {
154 if (includeInternal) {
157 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
164 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
165 NBNode* node = (*i).second;
167 std::vector<NBNode::Crossing*> crossings = node->
getCrossings();
168 for (
auto c : crossings) {
173 for (
const std::string& cID : wa.nextCrossings) {
181 if (nextCrossing.
tlID !=
"") {
193 for (
const std::string& sw : wa.nextSidewalks) {
197 for (
const std::string& sw : wa.prevSidewalks) {
205 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
213 for (std::map<std::string, NBDistrict*>::const_iterator i = dc.
begin(); i != dc.
end(); i++) {
216 if (dc.
size() != 0) {
229 #ifdef DEBUG_OPPOSITE_INTERNAL
235 assert(succOpp != 0);
236 assert(predOpp != 0);
237 const std::vector<NBEdge::Connection>& connections = succOpp->
getConnections();
238 for (std::vector<NBEdge::Connection>::const_iterator it_c = connections.begin(); it_c != connections.end(); it_c++) {
241 && predOpp == conOpp.
toEdge
247 #ifdef DEBUG_OPPOSITE_INTERNAL
250 oppositeLength = conOpp.
length;
281 std::map<std::string, std::string> oppositeLaneID;
282 std::map<std::string, double> oppositeLengths;
283 for (
NBEdge* e : incoming) {
285 double oppositeLength = 0;
287 oppositeLaneID[c.getInternalLaneID()] = op;
289 oppositeLengths[c.id] = oppositeLength;
293 if (oppositeLengths.size() > 0) {
294 for (
NBEdge* e : incoming) {
296 if (oppositeLengths.count(c.id) > 0) {
297 c.length = (c.length + oppositeLengths[c.id]) / 2;
303 for (EdgeVector::const_iterator i = incoming.begin(); i != incoming.end(); i++) {
304 const std::vector<NBEdge::Connection>& elv = (*i)->getConnections();
305 if (elv.size() > 0) {
306 bool haveVia =
false;
307 std::string edgeID =
"";
309 for (std::vector<NBEdge::Connection>::const_iterator k = elv.begin(); k != elv.end(); ++k) {
310 if ((*k).toEdge ==
nullptr) {
314 if (edgeID != (*k).id) {
323 if ((*i)->isBidiRail() && (*k).toEdge->isBidiRail() &&
324 (*i) != (*k).toEdge->getTurnDestination(
true)) {
327 0, (*i)->getTurnDestination(
true), 0);
330 std::cout <<
" could not find bidi-connection\n";
337 const NBEdge::Lane& successor = (*k).toEdge->getLanes()[(*k).toLane];
338 const double width = n.
isConstantWidthTransition() && (*i)->getNumLanes() > (*k).toEdge->getNumLanes() ? (*i)->getLaneWidth((*k).fromLane) : successor.
width;
339 writeLane(into, (*k).getInternalLaneID(), (*k).vmax,
342 std::map<int, double>(), width, (*k).shape, &(*k),
343 (*k).length, (*k).internalLaneIndex, oppositeLaneID[(*k).getInternalLaneID()],
"");
344 haveVia = haveVia || (*k).haveVia;
350 for (std::vector<NBEdge::Connection>::const_iterator k = elv.begin(); k != elv.end(); ++k) {
354 if ((*k).toEdge ==
nullptr) {
358 const NBEdge::Lane& successor = (*k).toEdge->getLanes()[(*k).toLane];
364 std::map<int, double>(), successor.
width, (*k).viaShape, &(*k),
380 std::map<int, double>(), c->width, c->shape,
nullptr,
381 MAX2(c->shape.length(),
POSITION_EPS), 0,
"",
"",
false, c->customShape.size() != 0);
385 const std::vector<NBNode::WalkingArea>& WalkingAreas = n.
getWalkingAreas();
386 for (std::vector<NBNode::WalkingArea>::const_iterator it = WalkingAreas.begin(); it != WalkingAreas.end(); it++) {
393 std::map<int, double>(), wa.
width, wa.
shape,
nullptr, wa.
length, 0,
"",
"",
false, wa.
hasCustomShape);
437 const std::vector<NBEdge::Lane>& lanes = e.
getLanes();
441 for (
int i = 0; i < (int) lanes.size(); i++) {
443 std::map<int, double> stopOffsets;
462 double startOffset,
double endOffset,
463 std::map<SVCPermissions, double> stopOffsets,
double width,
PositionVector shape,
465 const std::string& oppositeID,
466 const std::string& type,
467 bool accelRamp,
bool customShape) {
479 WRITE_WARNING(
"Lane '" + lID +
"' has a maximum allowed speed of 0.");
480 }
else if (speed < 0) {
481 throw ProcessError(
"Negative allowed speed (" +
toString(speed) +
") on lane '" + lID +
"', use --speed.minimum to prevent this.");
497 if (endOffset > 0 || startOffset > 0) {
498 if (startOffset + endOffset < shape.
length()) {
513 if (stopOffsets.size() != 0) {
517 if (oppositeID !=
"" && oppositeID !=
"-") {
523 if (params !=
nullptr) {
538 std::string incLanes;
540 for (std::vector<NBEdge*>::const_iterator i = incoming.begin(); i != incoming.end(); ++i) {
541 int noLanes = (*i)->getNumLanes();
542 for (
int j = 0; j < noLanes; j++) {
543 incLanes += (*i)->getLaneID(j);
544 if (i != incoming.end() - 1 || j < noLanes - 1) {
549 std::vector<NBNode::Crossing*> crossings = n.
getCrossings();
550 std::set<std::string> prevWAs;
552 for (
auto c : crossings) {
553 if (prevWAs.count(c->prevWalkingArea) == 0) {
554 incLanes +=
' ' + c->prevWalkingArea +
"_0";
555 prevWAs.insert(c->prevWalkingArea);
560 std::string intLanes;
563 for (EdgeVector::const_iterator i = incoming.begin(); i != incoming.end(); i++) {
564 const std::vector<NBEdge::Connection>& elv = (*i)->getConnections();
565 for (std::vector<NBEdge::Connection>::const_iterator k = elv.begin(); k != elv.end(); ++k) {
566 if ((*k).toEdge ==
nullptr) {
573 intLanes += (*k).getInternalLaneID();
575 intLanes += (*k).viaID +
"_0";
582 for (
auto c : crossings) {
583 intLanes +=
' ' + c->id +
"_0";
617 std::vector<std::string> internalLaneIDs;
618 std::map<std::string, std::string> viaIDs;
619 for (EdgeVector::const_iterator i = incoming.begin(); i != incoming.end(); i++) {
620 const std::vector<NBEdge::Connection>& elv = (*i)->getConnections();
621 for (std::vector<NBEdge::Connection>::const_iterator k = elv.begin(); k != elv.end(); ++k) {
622 if ((*k).toEdge !=
nullptr) {
623 internalLaneIDs.push_back((*k).getInternalLaneID());
624 viaIDs[(*k).getInternalLaneID()] = ((*k).viaID);
629 internalLaneIDs.push_back(c->id +
"_0");
632 for (std::vector<NBEdge*>::const_iterator i = incoming.begin(); i != incoming.end(); i++) {
633 const std::vector<NBEdge::Connection>& elv = (*i)->getConnections();
634 for (std::vector<NBEdge::Connection>::const_iterator k = elv.begin(); k != elv.end(); ++k) {
635 if ((*k).toEdge ==
nullptr || !(*k).haveVia) {
642 std::string incLanes = (*k).getInternalLaneID();
643 std::vector<std::string> foeIDs;
644 for (std::string incLane : (*k).foeIncomingLanes) {
645 incLanes +=
" " + incLane;
646 if (incLane[0] ==
':' && viaIDs[incLane] !=
"") {
648 foeIDs.push_back(viaIDs[incLane] +
"_0");
652 const std::vector<int>& foes = (*k).foeInternalLinks;
653 for (std::vector<int>::const_iterator it = foes.begin(); it != foes.end(); ++it) {
654 foeIDs.push_back(internalLaneIDs[*it]);
695 if (style !=
PLAIN) {
696 if (includeInternal) {
725 for (std::vector<NBEdge*>::const_iterator i = incoming.begin(); i != incoming.end(); ++i) {
727 const std::vector<NBEdge::Connection>& connections = from->
getConnections();
728 for (std::vector<NBEdge::Connection>::const_iterator j = connections.begin(); j != connections.end(); ++j) {
749 const std::string& from,
const std::string& to,
750 int fromLane,
int toLane,
const std::string& via,
775 std::vector<std::vector<std::string> > edgeIDs;
776 for (std::set<EdgeSet>::const_iterator i = roundabouts.begin(); i != roundabouts.end(); ++i) {
777 std::vector<std::string> tEdgeIDs;
778 for (EdgeSet::const_iterator j = (*i).begin(); j != (*i).end(); ++j) {
781 tEdgeIDs.push_back((*j)->getID());
783 std::sort(tEdgeIDs.begin(), tEdgeIDs.end());
784 edgeIDs.push_back(tEdgeIDs);
786 std::sort(edgeIDs.begin(), edgeIDs.end());
788 for (std::vector<std::vector<std::string> >::const_iterator i = edgeIDs.begin(); i != edgeIDs.end(); ++i) {
791 if (roundabouts.size() != 0) {
800 std::vector<std::string> validEdgeIDs;
801 std::vector<std::string> invalidEdgeIDs;
802 std::vector<std::string> nodeIDs;
803 for (std::vector<std::string>::const_iterator i = edgeIDs.begin(); i != edgeIDs.end(); ++i) {
805 if (edge !=
nullptr) {
807 validEdgeIDs.push_back(edge->
getID());
809 invalidEdgeIDs.push_back(*i);
812 std::sort(nodeIDs.begin(), nodeIDs.end());
813 if (validEdgeIDs.size() > 0) {
818 if (invalidEdgeIDs.size() > 0) {
820 +
joinToString(invalidEdgeIDs,
" ") +
"' no longer exist'");
839 for (
int i = 0; i < (int)sources.size(); i++) {
846 for (
int i = 0; i < (int)sinks.size(); i++) {
859 if (time == std::floor(time)) {
869 for (NBConnectionProhibits::const_iterator j = prohibitions.begin(); j != prohibitions.end(); j++) {
872 for (NBConnectionVector::const_iterator k = prohibiting.begin(); k != prohibiting.end(); k++) {
891 std::vector<NBTrafficLightLogic*> logics = tllCont.
getComputed();
892 for (std::vector<NBTrafficLightLogic*>::iterator it = logics.begin(); it != logics.end(); it++) {
899 const bool varPhaseLength = (*it)->getType() !=
TLTYPE_STATIC;
900 const std::vector<NBTrafficLightLogic::PhaseDefinition>& phases = (*it)->getPhases();
901 for (std::vector<NBTrafficLightLogic::PhaseDefinition>::const_iterator j = phases.begin(); j != phases.end(); ++j) {
908 if (varPhaseLength) {
919 if (j->next.size() > 0) {
925 (*it)->writeParams(into);
928 if (logics.size() > 0) {
936 if (stopOffsets.size() == 0) {
939 assert(stopOffsets.size() == 1);
940 std::pair<int, double> offset = *stopOffsets.begin();
942 if (ss_vclasses.length() == 0) {
948 if (ss_vclasses.length() <= ss_exceptions.length()) {
951 if (ss_exceptions.length() == 0) {
static void writeLocation(OutputDevice &into)
writes the location element
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.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
static const double UNSPECIFIED_OFFSET
unspecified lane offset
Information on vClass specific stop offsets at lane end.
static void writeEdge(OutputDevice &into, const NBEdge &e, bool noNames)
Writes an edge (<edge ...)
const SVCPermissions SVC_UNSPECIFIED
permissions not specified
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
NBEdge * toEdge
The edge the connections yields in.
double speed
The speed allowed on this lane.
static void writeTrafficLights(OutputDevice &into, const NBTrafficLightLogicCont &tllCont)
writes the traffic light logics to the given device
bool haveVia
check if Connection have a Via
LinkState getLinkState(const NBEdge *incoming, NBEdge *outgoing, int fromLane, int toLane, bool mayDefinitelyPass, const std::string &tlID) const
get link state
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
PositionVector shape
The polygonal shape.
double length
computed length (average of all internal lane shape lengths that share an internal edge)
#define WRITE_WARNING(msg)
An upper class for objects with additional parameters.
const std::vector< NBEdge * > & getSourceEdges() const
Returns the sources.
Storage for edges, including some functionality operating on multiple edges.
const std::vector< double > & getSourceWeights() const
Returns the weights of the sources.
std::string type
the type of this lane
std::map< std::string, NBDistrict * >::const_iterator begin() const
Returns the pointer to the begin of the stored districts.
Instance responsible for building networks.
const std::vector< NBEdge * > & getSinkEdges() const
Returns the sinks.
PositionVector simplified() const
return the same shape with intermediate colinear points removed
A container for traffic light definitions and built programs.
Static storage of an output device and its base (abstract) implementation.
const double NETWORK_VERSION
version for written networks and default version for loading
std::map< std::string, NBNode * >::const_iterator end() const
Returns the pointer to the end of the stored nodes.
Connection getConnection(int fromLane, const NBEdge *to, int toLane) const
Returns the specified connection This method goes through "myConnections" and returns the specified o...
bool uncontrolled
check if Connection is uncontrolled
PositionVector getSubpart(double beginOffset, double endOffset) const
get subpart of a position vector
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
a source within a district (connection road)
bool hasDefaultGeometry() const
Returns whether the geometry consists only of the node positions.
bool hasCustomShape
whether this walkingArea has a custom shape
static std::string prohibitionConnection(const NBConnection &c)
the attribute value for a prohibition
whether a given shape is user-defined
double contPos
custom position for internal junction on this connection
static void normaliseSum(std::vector< T > &v, T msum=1.0)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
static void writeJunction(OutputDevice &into, const NBNode &n)
Writes a junction (<junction ...)
static bool writeInternalEdges(OutputDevice &into, const NBEdgeCont &ec, const NBNode &n)
Writes internal edges (<edge ... with id[0]==':') of the given node.
bool isBidiRail(bool ignoreSpread=false) const
whether this edge is part of a bidirectional railway
begin/end of the description of a single lane
NBEdge * getFrom() const
returns the from-edge (start of the connection)
link,node: the traffic light id responsible for this link
const std::vector< double > & getSinkWeights() const
Returns the weights of the sinks.
const static int InvalidTlIndex
std::map< std::string, NBNode * >::const_iterator begin() const
Returns the pointer to the begin of the stored nodes.
NBEdge * getTo() const
returns the to-edge (end of the connection)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
SumoXMLNodeType getType() const
Returns the type of this node.
int getPriority() const
Returns the priority of the edge.
static void writeLane(OutputDevice &into, const std::string &lID, double speed, SVCPermissions permissions, SVCPermissions preferred, double startOffset, double endOffset, std::map< SVCPermissions, double > stopOffsets, double width, PositionVector shape, const Parameterised *params, double length, int index, const std::string &oppositeID, const std::string &type, bool accelRamp=false, bool customShape=false)
Writes a lane (<lane ...) of an edge.
foe visibility distance of a link
double length() const
Returns the length.
bool getKeepClear() const
Returns the keepClear flag.
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)....
bool isConstantWidthTransition() const
detects whether a given junction splits or merges lanes while keeping constant road width
int tlLinkIndex
The index of this connection within the controlling traffic light.
a single phase description
This is an uncontrolled, major link, may pass.
A definition of a pedestrian walking area.
void close()
Closes the device and removes it from the dictionary.
A container for districts.
The link has no direction (is a dead end link)
static void writeConnection(OutputDevice &into, const NBEdge &from, const NBEdge::Connection &c, bool includeInternal, ConnectionStyle style=SUMONET)
Writes connections outgoing from the given edge (also used in NWWriter_XML)
The information about how to spread the lanes from the given position.
bool writeLogic(OutputDevice &into) const
writes the XML-representation of the logic as a bitset-logic XML representation
The abstract direction of a link.
NBEdgeCont & getEdgeCont()
Container for nodes during the netbuilding process.
int fromLane
The lane the connections starts at.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into a SUMO-file.
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
The representation of a single edge during network building.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static void writeProhibitions(OutputDevice &into, const NBConnectionProhibits &prohibitions)
writes the given prohibitions
double speed
custom speed for connection
int toLane
The lane the connections yields in.
const Position & getPosition() const
prohibition of circulation between two edges
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
static std::string getOppositeInternalID(const NBEdgeCont &ec, const NBEdge *from, const NBEdge::Connection &con, double &oppositeLength)
retrieve the id of the opposite direction internal lane if it exists
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic,...
begin/end of the description of a neighboring lane
const std::vector< WalkingArea > & getWalkingAreas() const
return this junctions pedestrian walking areas
The link is a straight direction.
static std::string writeSUMOTime(SUMOTime time)
writes a SUMOTime as int if possible, otherwise as a float
NBNode * getToNode() const
Returns the destination node of the edge.
static bool writeInternalNodes(OutputDevice &into, const NBNode &n)
Writes internal junctions (<junction with id[0]==':' ...) of the given node.
const PositionVector & getGeometry() const
Returns the geometry of the edge.
void writePreferences(OutputDevice &into, SVCPermissions preferred)
writes allowed disallowed attributes if needed;
static void writeRoundabout(OutputDevice &into, const std::vector< std::string > &r, const NBEdgeCont &ec)
Writes a roundabout.
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
Whether vehicles must keep the junction clear.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
const std::map< int, double > & getStopOffsets() const
Returns the stopOffset to the end of the edge.
static const SUMOTime UNSPECIFIED_DURATION
static const double UNSPECIFIED_CONTPOS
unspecified internal junction position
std::string getDescription(const NBEdge *parent) const
get string describing this connection
double getRadius() const
Returns the turning radius of this node.
std::string getLaneID(int lane) const
get lane ID
LinkDirection getDirection(const NBEdge *const incoming, const NBEdge *const outgoing, bool leftHand=false) const
Returns the representation of the described stream's direction.
void writePermissions(OutputDevice &into, SVCPermissions permissions)
writes allowed disallowed attributes if needed;
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.
bool priority
whether the pedestrians have priority
begin/end of the description of an edge
bool hasLoadedLength() const
Returns whether a length was set explicitly.
std::map< int, double > stopOffsets
stopOffsets.second - The stop offset for vehicles stopping at the lane's end. Applies if vClass is in...
const std::string & getVehicleClassNames(SVCPermissions permissions, bool expand)
Returns the ids of the given classes, divided using a ' '.
A point in 2D or 3D with translation and scaling methods.
A storage for options typed value containers)
double width
This lane's width.
static const double UNSPECIFIED_VISIBILITY_DISTANCE
unspecified foe visibility for connections
This is an uncontrolled, minor link, has to brake.
static const double UNSPECIFIED_SPEED
unspecified lane speed
static bool writeInternalConnections(OutputDevice &into, const NBNode &n)
Writes inner connections within the node.
static void interpretLaneID(const std::string &lane_id, std::string &edge_id, int &index)
parses edge-id and index from lane-id
std::vector< Crossing * > getCrossings() const
return this junctions pedestrian crossings
std::map< std::string, NBEdge * >::const_iterator end() const
Returns the pointer to the end of the stored edges.
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
bool hasCustomShape() const
return whether the shape was set by the user
std::vector< NBTrafficLightLogic * > getComputed() const
Returns a list of all computed logics.
const std::string & getStreetName() const
Returns the street name of this edge.
The turning radius at an intersection in m.
double getLoadedLength() const
Returns the length was set explicitly or the computed length if it wasn't set.
a traffic assignment zone
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
double getEndOffset() const
Returns the offset to the destination node.
std::map< NBConnection, NBConnectionVector > NBConnectionProhibits
Definition of a container for connection block dependencies Includes a list of all connections which ...
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const PositionVector & getShape() const
retrieve the junction shape
PositionVector customShape
A custom shape for this lane set by the user.
a sink within a district (connection road)
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
void writeTypes(OutputDevice &into) const
writes all types a s XML
int tlLinkIndex
the traffic light index of this crossing (if controlled)
std::string id
id of Connection
link: the index of the link within the traffic light
NBTrafficLightLogicCont & getTLLogicCont()
Returns a reference to the traffic light logics container.
std::string viaID
if Connection have a via, ID of it
An (internal) definition of a single lane of an edge.
FringeType getFringeType() const
Returns fringe type.
double width
This lane's width.
bool keepClear
whether the junction must be kept clear when using this connection
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges (The edges which yield in this node)
std::string oppositeID
An opposite lane ID, if given.
static const double UNSPECIFIED_RADIUS
unspecified lane width
void lf()
writes a line feed if applicable
std::vector< NBConnection > NBConnectionVector
Definition of a connection vector.
NBDistrictCont & getDistrictCont()
Returns a reference the districts container.
SVCPermissions permissions
List of vehicle types that are allowed on this lane.
How to compute right of way.
connectio between two lanes
static void writeDistrict(OutputDevice &into, const NBDistrict &d)
Writes a district.
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
static const double UNSPECIFIED_WIDTH
unspecified lane width
PositionVector customShape
custom shape for connection
static void writeStopOffsets(OutputDevice &into, const std::map< SVCPermissions, double > &stopOffsets)
Write a stopOffset element into output device.
bool isMacroscopicConnector() const
Returns whether this edge was marked as a macroscopic connector.
Crossing * getCrossing(const std::string &id) const
return the crossing with the given id
double getFinalLength() const
get length that will be assigned to the lanes in the final network
double length
This lane's width.
const std::string & getTypeID() const
get ID of type
maximum duration of a phase
bool accelRamp
Whether this lane is an acceleration lane.
static void writePositionLong(const Position &pos, OutputDevice &dev)
Writes the given position to device in long format (one attribute per dimension)
std::string getInternalLaneID() const
get ID of internal lane
static void writeInternalConnection(OutputDevice &into, const std::string &from, const std::string &to, int fromLane, int toLane, const std::string &via, LinkDirection dir=LINKDIR_STRAIGHT, const std::string &tlID="", int linkIndex=NBConnection::InvalidTlIndex)
Writes a single internal connection.
std::map< std::string, NBDistrict * >::const_iterator end() const
Returns the pointer to the end of the stored districts.
static void writeRoundabouts(OutputDevice &into, const std::set< EdgeSet > &roundabouts, const NBEdgeCont &ec)
Writes roundabouts.
double endOffset
This lane's offset to the intersection begin.
PositionVector shape
The lane's shape.
the edges crossed by a pedestrian crossing
bool writeXMLHeader(const std::string &rootElement, const std::string &schemaFile, std::map< SumoXMLAttr, std::string > attrs=std::map< SumoXMLAttr, std::string >())
Writes an XML header with optional configuration.
Represents a single node (junction) during network building.
roundabout defined in junction
NBNodeCont & getNodeCont()
Returns a reference to the node container.
A definition of a pedestrian crossing.
A structure which describes a connection between edges or lanes.
NBTypeCont & getTypeCont()
Returns a reference to the type container.
double visibility
custom foe visiblity for connection
edge: the shape in xml-definition
int internalLaneIndex
The lane index of this internal lane within the internal edge.
RightOfWay getRightOfWay() const
Returns hint on how to compute right of way.
const std::string & getID() const
Returns the id.
std::map< std::string, NBEdge * >::const_iterator begin() const
Returns the pointer to the begin of the stored edges.
std::string tlID
The id of the traffic light that controls this connection.
const std::vector< Connection > & getConnections() const
Returns the connections.
A class representing a single district.
NBNode * getFromNode() const
Returns the origin node of the edge.
std::string id
the (edge)-id of this walkingArea
const std::set< EdgeSet > getRoundabouts() const
Returns the determined roundabouts.
int size() const
Returns the number of districts inside the container.
const PositionVector & getShape() const
Returns the shape.
double getDistance() const
begin/end of the description of a junction
LaneSpreadFunction getLaneSpreadFunction() const
Returns how this edge's lanes' lateral offset is computed.
a list of node ids, used for controlling joining
NBEdge * getTurnDestination(bool possibleDestination=false) const
const std::string & getID() const
OutputDevice & writePadding(const std::string &val)
writes padding (ignored for binary output)