SUMO - Simulation of Urban MObility
NIXMLConnectionsHandler.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
20 // Importer for edge connections stored in XML
21 /****************************************************************************/
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <string>
34 #include <iostream>
35 #include <xercesc/sax/HandlerBase.hpp>
36 #include <xercesc/sax/AttributeList.hpp>
37 #include <xercesc/sax/SAXParseException.hpp>
38 #include <xercesc/sax/SAXException.hpp>
40 #include <netbuild/NBEdge.h>
41 #include <netbuild/NBEdgeCont.h>
42 #include <netbuild/NBNodeCont.h>
44 #include <netbuild/NBNode.h>
45 #include <netbuild/NBNetBuilder.h>
49 #include <utils/common/ToString.h>
54 
55 
56 // ===========================================================================
57 // method definitions
58 // ===========================================================================
60  SUMOSAXHandler("xml-connection-description"),
61  myEdgeCont(ec),
62  myNodeCont(nc),
63  myTLLogicCont(tlc),
64  myHaveWarnedAboutDeprecatedLanes(false),
65  myErrorMsgHandler(OptionsCont::getOptions().getBool("ignore-errors.connections") ?
66  MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()) {}
67 
68 
70 
71 
72 void
74  const SUMOSAXAttributes& attrs) {
75  if (element == SUMO_TAG_DELETE) {
76  bool ok = true;
77  std::string from = attrs.get<std::string>(SUMO_ATTR_FROM, 0, ok);
78  std::string to = attrs.get<std::string>(SUMO_ATTR_TO, 0, ok);
79  if (!ok) {
80  return;
81  }
82  // these connections were removed when the edge was deleted
83  if (myEdgeCont.wasRemoved(from) || myEdgeCont.wasRemoved(to)) {
84  return;
85  }
86  NBEdge* fromEdge = myEdgeCont.retrieve(from);
87  NBEdge* toEdge = myEdgeCont.retrieve(to);
88  if (fromEdge == 0) {
89  myErrorMsgHandler->inform("The connection-source edge '" + from + "' to reset is not known.");
90  return;
91  }
92  if (toEdge == 0) {
93  myErrorMsgHandler->inform("The connection-destination edge '" + to + "' to reset is not known.");
94  return;
95  }
96  if (!fromEdge->isConnectedTo(toEdge) && fromEdge->getStep() >= NBEdge::EDGE2EDGES) {
97  WRITE_WARNING("Target edge '" + toEdge->getID() + "' is not connected with '" + fromEdge->getID() + "'; the connection cannot be reset.");
98  return;
99  }
100  int fromLane = -1; // Assume all lanes are to be reset.
101  int toLane = -1;
102  if (attrs.hasAttribute(SUMO_ATTR_LANE)
104  || attrs.hasAttribute(SUMO_ATTR_TO_LANE)) {
105  if (!parseLaneInfo(attrs, fromEdge, toEdge, &fromLane, &toLane)) {
106  return;
107  }
108  // we could be trying to reset a connection loaded from a sumo net and which has become obsolete.
109  // In this case it's ok to encounter invalid lance indices
110  if (!fromEdge->hasConnectionTo(toEdge, toLane) && fromEdge->getStep() >= NBEdge::LANES2EDGES) {
111  WRITE_WARNING("Edge '" + fromEdge->getID() + "' has no connection to lane " + toString(toLane) + " of edge '" + toEdge->getID() + "'; the connection cannot be reset.");
112  }
113  }
114  fromEdge->removeFromConnections(toEdge, fromLane, toLane, true);
115  }
116 
117  if (element == SUMO_TAG_CONNECTION) {
118  bool ok = true;
119  std::string from = attrs.get<std::string>(SUMO_ATTR_FROM, "connection", ok);
120  std::string to = attrs.getOpt<std::string>(SUMO_ATTR_TO, "connection", ok, "");
121  if (!ok || myEdgeCont.wasIgnored(from) || myEdgeCont.wasIgnored(to)) {
122  return;
123  }
124  // extract edges
125  NBEdge* fromEdge = myEdgeCont.retrieve(from);
126  NBEdge* toEdge = to.length() != 0 ? myEdgeCont.retrieve(to) : 0;
127  // check whether they are valid
128  if (fromEdge == 0) {
129  myErrorMsgHandler->inform("The connection-source edge '" + from + "' is not known.");
130  return;
131  }
132  if (toEdge == 0 && to.length() != 0) {
133  myErrorMsgHandler->inform("The connection-destination edge '" + to + "' is not known.");
134  return;
135  }
136  fromEdge->getToNode()->invalidateTLS(myTLLogicCont, true, false);
137  // parse optional lane information
139  parseLaneBound(attrs, fromEdge, toEdge);
140  } else {
141  fromEdge->addEdge2EdgeConnection(toEdge);
142  }
143  }
144  if (element == SUMO_TAG_PROHIBITION) {
145  bool ok = true;
146  std::string prohibitor = attrs.getOpt<std::string>(SUMO_ATTR_PROHIBITOR, 0, ok, "");
147  std::string prohibited = attrs.getOpt<std::string>(SUMO_ATTR_PROHIBITED, 0, ok, "");
148  if (!ok) {
149  return;
150  }
151  NBConnection prohibitorC = parseConnection("prohibitor", prohibitor);
152  NBConnection prohibitedC = parseConnection("prohibited", prohibited);
153  if (prohibitorC == NBConnection::InvalidConnection || prohibitedC == NBConnection::InvalidConnection) {
154  // something failed
155  return;
156  }
157  NBNode* n = prohibitorC.getFrom()->getToNode();
158  n->addSortedLinkFoes(prohibitorC, prohibitedC);
159  }
160  if (element == SUMO_TAG_CROSSING) {
161  addCrossing(attrs);
162  }
163  if (element == SUMO_TAG_WALKINGAREA) {
164  addWalkingArea(attrs);
165  }
166 }
167 
168 
170 NIXMLConnectionsHandler::parseConnection(const std::string& defRole, const std::string& def) {
171  // split from/to
172  const std::string::size_type div = def.find("->");
173  if (div == std::string::npos) {
174  myErrorMsgHandler->inform("Missing connection divider in " + defRole + " '" + def + "'");
176  }
177  std::string fromDef = def.substr(0, div);
178  std::string toDef = def.substr(div + 2);
179 
180  // retrieve the edges
181  // check whether the definition includes a lane information (do not process it)
182  if (fromDef.find('_') != std::string::npos) {
183  fromDef = fromDef.substr(0, fromDef.find('_'));
184  }
185  if (toDef.find('_') != std::string::npos) {
186  toDef = toDef.substr(0, toDef.find('_'));
187  }
188  // retrieve them now
189  NBEdge* fromE = myEdgeCont.retrieve(fromDef);
190  NBEdge* toE = myEdgeCont.retrieve(toDef);
191  // check
192  if (fromE == 0) {
193  myErrorMsgHandler->inform("Could not find edge '" + fromDef + "' in " + defRole + " '" + def + "'");
195  }
196  if (toE == 0) {
197  myErrorMsgHandler->inform("Could not find edge '" + toDef + "' in " + defRole + " '" + def + "'");
199  }
200  return NBConnection(fromE, toE);
201 }
202 
203 
204 void
206  if (to == 0) {
207  // do nothing if it's a dead end
208  return;
209  }
210  bool ok = true;
211  const bool mayDefinitelyPass = attrs.getOpt<bool>(SUMO_ATTR_PASS, 0, ok, false);
212  const bool keepClear = attrs.getOpt<bool>(SUMO_ATTR_KEEP_CLEAR, 0, ok, true);
213  const double contPos = attrs.getOpt<double>(SUMO_ATTR_CONTPOS, 0, ok, NBEdge::UNSPECIFIED_CONTPOS);
214  const double visibility = attrs.getOpt<double>(SUMO_ATTR_VISIBILITY_DISTANCE, 0, ok, NBEdge::UNSPECIFIED_VISIBILITY_DISTANCE);
215  const double speed = attrs.getOpt<double>(SUMO_ATTR_SPEED, 0, ok, NBEdge::UNSPECIFIED_SPEED);
217  if (!NBNetBuilder::transformCoordinates(customShape)) {
218  WRITE_ERROR("Unable to project shape for connection from edge '" + from->getID() + "' to edge '" + to->getID() + "'.");
219  }
220  if (!ok) {
221  return;
222  }
223  // get the begin and the end lane
224  int fromLane;
225  int toLane;
226  try {
227  if (!parseLaneInfo(attrs, from, to, &fromLane, &toLane)) {
228  return;
229  }
230  if (fromLane < 0) {
231  myErrorMsgHandler->inform("Invalid value '" + toString(fromLane) +
232  "' for " + toString(SUMO_ATTR_FROM_LANE) + " in connection from '" +
233  from->getID() + "' to '" + to->getID() + "'.");
234  return;
235  }
236  if (toLane < 0) {
237  myErrorMsgHandler->inform("Invalid value '" + toString(toLane) +
238  "' for " + toString(SUMO_ATTR_TO_LANE) + " in connection from '" +
239  from->getID() + "' to '" + to->getID() + "'.");
240  return;
241  }
242  if (from->hasConnectionTo(to, toLane) && from->getToNode()->getType() != NODETYPE_ZIPPER) {
243  WRITE_WARNING("Target lane '" + to->getLaneID(toLane) + "' is already connected from '" + from->getID() + "'.");
244  }
245  if (!from->addLane2LaneConnection(fromLane, to, toLane, NBEdge::L2L_USER, true, mayDefinitelyPass, keepClear, contPos, visibility, speed, customShape)) {
246  if (OptionsCont::getOptions().getBool("show-errors.connections-first-try")) {
247  WRITE_WARNING("Could not set loaded connection from '" + from->getLaneID(fromLane) + "' to '" + to->getLaneID(toLane) + "'.");
248  }
249  // set as to be re-applied after network processing
250  myEdgeCont.addPostProcessConnection(from->getID(), fromLane, to->getID(), toLane, mayDefinitelyPass, keepClear, contPos, visibility, speed, customShape);
251  }
252  } catch (NumberFormatException&) {
253  myErrorMsgHandler->inform("At least one of the defined lanes was not numeric");
254  }
255  //
256  bool keepUncontrolled = attrs.getOpt<bool>(SUMO_ATTR_UNCONTROLLED, 0, ok, false);
257  if (keepUncontrolled) {
258  from->disableConnection4TLS(fromLane, to, toLane);
259  }
260 }
261 
262 bool
264  int* fromLane, int* toLane) {
265  if (attributes.hasAttribute(SUMO_ATTR_LANE)) {
266  return parseDeprecatedLaneDefinition(attributes, fromEdge, toEdge, fromLane, toLane);
267  } else {
268  return parseLaneDefinition(attributes, fromLane, toLane);
269  }
270 }
271 
272 
273 inline bool
275  NBEdge* from, NBEdge* to,
276  int* fromLane, int* toLane) {
277  bool ok = true;
280  WRITE_WARNING("'" + toString(SUMO_ATTR_LANE) + "' is deprecated, please use '" +
282  "' instead.");
283  }
284 
285  std::string laneConn = attributes.get<std::string>(SUMO_ATTR_LANE, 0, ok);
286  StringTokenizer st(laneConn, ':');
287  if (!ok || st.size() != 2) {
288  myErrorMsgHandler->inform("Invalid lane to lane connection from '" +
289  from->getID() + "' to '" + to->getID() + "'.");
290  return false; // There was an error.
291  }
292 
293  *fromLane = TplConvert::_2intSec(st.next().c_str(), -1);
294  *toLane = TplConvert::_2intSec(st.next().c_str(), -1);
295 
296  return true; // We succeeded.
297 }
298 
299 
300 inline bool
302  int* fromLane,
303  int* toLane) {
304  bool ok = true;
305  *fromLane = attributes.get<int>(SUMO_ATTR_FROM_LANE, 0, ok);
306  *toLane = attributes.get<int>(SUMO_ATTR_TO_LANE, 0, ok);
307  return ok;
308 }
309 
310 
311 void
313  bool ok = true;
314  NBNode* node = 0;
315  EdgeVector edges;
316  const std::string nodeID = attrs.get<std::string>(SUMO_ATTR_NODE, 0, ok);
317  const double width = attrs.getOpt<double>(SUMO_ATTR_WIDTH, nodeID.c_str(), ok, NBEdge::UNSPECIFIED_WIDTH, true);
318  const bool discard = attrs.getOpt<bool>(SUMO_ATTR_DISCARD, nodeID.c_str(), ok, false, true);
319  int tlIndex = attrs.getOpt<int>(SUMO_ATTR_TLLINKINDEX, 0, ok, -1);
320  std::vector<std::string> edgeIDs;
321  if (!attrs.hasAttribute(SUMO_ATTR_EDGES)) {
322  if (discard) {
323  node = myNodeCont.retrieve(nodeID);
324  if (node == 0) {
325  WRITE_ERROR("Node '" + nodeID + "' in crossing is not known.");
326  return;
327  }
328  node->discardAllCrossings(true);
329  return;
330  } else {
331  WRITE_ERROR("No edges specified for crossing at node '" + nodeID + "'.");
332  return;
333  }
334  }
335  SUMOSAXAttributes::parseStringVector(attrs.get<std::string>(SUMO_ATTR_EDGES, 0, ok), edgeIDs);
336  if (!ok) {
337  return;
338  }
339  for (std::vector<std::string>::const_iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) {
340  NBEdge* edge = myEdgeCont.retrieve(*it);
341  if (edge == 0) {
342  WRITE_ERROR("Edge '" + (*it) + "' for crossing at node '" + nodeID + "' is not known.");
343  return;
344  }
345  if (node == 0) {
346  if (edge->getToNode()->getID() == nodeID) {
347  node = edge->getToNode();
348  } else if (edge->getFromNode()->getID() == nodeID) {
349  node = edge->getFromNode();
350  } else {
351  WRITE_ERROR("Edge '" + (*it) + "' does not touch node '" + nodeID + "'.");
352  return;
353  }
354  } else {
355  if (edge->getToNode() != node && edge->getFromNode() != node) {
356  WRITE_ERROR("Edge '" + (*it) + "' does not touch node '" + nodeID + "'.");
357  return;
358  }
359  }
360  edges.push_back(edge);
361  }
362  bool priority = attrs.getOpt<bool>(SUMO_ATTR_PRIORITY, nodeID.c_str(), ok, node->isTLControlled(), true);
363  if (node->isTLControlled() && !priority) {
364  // traffic_light nodes should always have priority crossings
365  WRITE_WARNING("Crossing at controlled node '" + nodeID + "' must be prioritized");
366  priority = true;
367  }
369  if (!NBNetBuilder::transformCoordinates(customShape)) {
370  WRITE_ERROR("Unable to project shape for crossing at node '" + node->getID() + "'.");
371  }
372  if (discard) {
373  node->removeCrossing(edges);
374  } else {
375  node->addCrossing(edges, width, priority, tlIndex, customShape);
376  }
377 }
378 
379 
380 void
382  bool ok = true;
383  NBNode* node = 0;
384  EdgeVector edges;
385  const std::string nodeID = attrs.get<std::string>(SUMO_ATTR_NODE, 0, ok);
386  std::vector<std::string> edgeIDs;
387  if (!attrs.hasAttribute(SUMO_ATTR_EDGES)) {
388  WRITE_ERROR("No edges specified for walkingArea at node '" + nodeID + "'.");
389  return;
390  }
391  SUMOSAXAttributes::parseStringVector(attrs.get<std::string>(SUMO_ATTR_EDGES, 0, ok), edgeIDs);
392  if (!ok) {
393  return;
394  }
395  for (std::vector<std::string>::const_iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) {
396  NBEdge* edge = myEdgeCont.retrieve(*it);
397  if (edge == 0) {
398  WRITE_ERROR("Edge '" + (*it) + "' for walkingArea at node '" + nodeID + "' is not known.");
399  return;
400  }
401  if (node == 0) {
402  if (edge->getToNode()->getID() == nodeID) {
403  node = edge->getToNode();
404  } else if (edge->getFromNode()->getID() == nodeID) {
405  node = edge->getFromNode();
406  } else {
407  WRITE_ERROR("Edge '" + (*it) + "' does not touch node '" + nodeID + "'.");
408  return;
409  }
410  } else {
411  if (edge->getToNode() != node && edge->getFromNode() != node) {
412  WRITE_ERROR("Edge '" + (*it) + "' does not touch node '" + nodeID + "'.");
413  return;
414  }
415  }
416  edges.push_back(edge);
417  }
419  if (!NBNetBuilder::transformCoordinates(customShape)) {
420  WRITE_ERROR("Unable to project shape for walkingArea at node '" + node->getID() + "'.");
421  }
422  node->addWalkingAreaShape(edges, customShape);
423 }
424 
425 /****************************************************************************/
426 
static const PositionVector EMPTY
empty Vector
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
Definition: NBNodeCont.cpp:108
Whether vehicles must keep the junction clear.
static const double UNSPECIFIED_VISIBILITY_DISTANCE
unspecified foe visibility for connections
Definition: NBEdge.h:266
The relationships between edges are computed/loaded.
Definition: NBEdge.h:93
bool isConnectedTo(const NBEdge *e) const
Returns the information whethe a connection to the given edge has been added (or computed) ...
Definition: NBEdge.cpp:1084
void addCrossing(const SUMOSAXAttributes &attrs)
Parses a crossing and updates the referenced node.
static const NBConnection InvalidConnection
Definition: NBConnection.h:126
A container for traffic light definitions and built programs.
bool myHaveWarnedAboutDeprecatedLanes
Information whether we have a deprecated attribute.
connectio between two lanes
bool parseLaneInfo(const SUMOSAXAttributes &attributes, NBEdge *fromEdge, NBEdge *toEdge, int *fromLane, int *toLane)
Parses information about lane-2-lane connection when it describes a lane-2-lane relationship.
The representation of a single edge during network building.
Definition: NBEdge.h:70
foe visibility distance of a link
void removeFromConnections(NBEdge *toEdge, int fromLane=-1, int toLane=-1, bool tryLater=false, const bool adaptToLaneRemoval=false)
Removes the specified connection(s)
Definition: NBEdge.cpp:1201
static bool transformCoordinates(PositionVector &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
NBEdge * getFrom() const
returns the from-edge (start of the connection)
void parseLaneBound(const SUMOSAXAttributes &attrs, NBEdge *from, NBEdge *to)
Parses a connection when it describes a lane-2-lane relationship.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
const std::string & getID() const
Returns the id.
Definition: Named.h:74
SAX-handler base for SUMO-files.
bool parseLaneDefinition(const SUMOSAXAttributes &attributes, int *fromLane, int *toLane)
Parses information about lane-2-lane connection.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list...
static const double UNSPECIFIED_WIDTH
unspecified lane width
Definition: NBEdge.h:254
prohibition of circulation between two edges
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:199
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:64
static const double UNSPECIFIED_SPEED
unspecified lane speed
Definition: NBEdge.h:260
NBEdgeCont & myEdgeCont
The edge container to fill.
void invalidateTLS(NBTrafficLightLogicCont &tlCont, bool removedConnections, bool addedConnections)
causes the traffic light to be computed anew
Definition: NBNode.cpp:347
bool parseDeprecatedLaneDefinition(const SUMOSAXAttributes &attributes, NBEdge *fromEdge, NBEdge *toEdge, int *fromLane, int *toLane)
Parses information about lane-2-lane connection in deprecated format.
bool addEdge2EdgeConnection(NBEdge *dest)
Adds a connection to another edge.
Definition: NBEdge.cpp:897
NBConnection parseConnection(const std::string &defRole, const std::string &def)
Returns the connection described by def.
bool isTLControlled() const
Returns whether this node is controlled by any tls.
Definition: NBNode.h:297
static void parseStringVector(const std::string &def, std::vector< std::string > &into)
Splits the given string.
void removeCrossing(const EdgeVector &edges)
remove a pedestrian crossing from this node (identified by its edges)
Definition: NBNode.cpp:2645
the edges of a route
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:55
Encapsulated SAX-Attributes.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
std::string getLaneID(int lane) const
get Lane ID (Secure)
Definition: NBEdge.cpp:2783
walking area for pedestrians
A list of positions.
bool wasRemoved(std::string id) const
Returns whether the edge with the id was deleted explicitly.
Definition: NBEdgeCont.h:485
static const double UNSPECIFIED_CONTPOS
unspecified internal junction position
Definition: NBEdge.h:263
bool hasConnectionTo(NBEdge *destEdge, int destLane, int fromLane=-1) const
Retrieves info about a connection to a certain lane of a certain edge.
Definition: NBEdge.cpp:1078
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
NBNodeCont & myNodeCont
The edge container to fill.
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
EdgeBuildingStep getStep() const
The building step of this edge.
Definition: NBEdge.h:515
edge: the shape in xml-definition
void discardAllCrossings(bool rejectAll)
discard all current (and optionally future) crossings
Definition: NBNode.cpp:2056
The connection was given by the user.
Definition: NBEdge.h:112
void addCrossing(EdgeVector edges, double width, bool priority, int tlIndex=-1, const PositionVector &customShape=PositionVector::EMPTY, bool fromSumoNet=false)
add a pedestrian crossing to this node
Definition: NBNode.cpp:2635
MsgHandler *const myErrorMsgHandler
the handler for loading errors
#define WRITE_ERROR(msg)
Definition: MsgHandler.h:205
void addWalkingAreaShape(EdgeVector edges, const PositionVector &shape)
add custom shape for walkingArea
Definition: NBNode.cpp:2587
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
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)
Adds a connection between the specified this edge&#39;s lane and an approached one.
Definition: NBEdge.cpp:921
void disableConnection4TLS(int fromLane, NBEdge *toEdge, int toLane)
disable connections for TLS
Definition: NBEdge.cpp:2587
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
Definition: NBCont.h:40
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 warnOnly=false)
Adds a connection which could not be set during loading.
Definition: NBEdgeCont.cpp:857
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
Definition: NBEdgeCont.cpp:250
void inform(std::string msg, bool addType=true)
adds a new error to the list
Definition: MsgHandler.cpp:84
A storage for options typed value containers)
Definition: OptionsCont.h:98
SumoXMLNodeType getType() const
Returns the type of this node.
Definition: NBNode.h:266
NIXMLConnectionsHandler(NBEdgeCont &ec, NBNodeCont &nc, NBTrafficLightLogicCont &tlc)
Constructor.
crossing between edges for pedestrians
void addWalkingArea(const SUMOSAXAttributes &attrs)
Parses a walkingArea and updates the referenced node.
Represents a single node (junction) during network building.
Definition: NBNode.h:74
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
add shorted link FOES
Definition: NBNode.cpp:1238
link: the index of the link within the traffic light
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:426
bool wasIgnored(std::string id) const
Returns whether the edge with the id was ignored during parsing.
Definition: NBEdgeCont.h:474
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:66
delete certain element
static int _2intSec(const E *const data, int def)
converts a 0-terminated char-type array into the integer value described by it
Definition: TplConvert.h:195
Lanes to edges - relationships are computed/loaded.
Definition: NBEdge.h:95
NBTrafficLightLogicCont & myTLLogicCont
The traffic lights container to add built tls to (when invalidating tls)
NBNode * getToNode() const
Returns the destination node of the edge.
Definition: NBEdge.h:433