 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
41 {
"VSYS", VISUM_SYS },
42 {
"STRECKENTYP", VISUM_LINKTYPE },
43 {
"KNOTEN", VISUM_NODE },
44 {
"BEZIRK", VISUM_DISTRICT },
45 {
"PUNKT", VISUM_POINT },
46 {
"STRECKE", VISUM_LINK },
48 {
"VSYSSET", VISUM_TYPES },
49 {
"RANG", VISUM_RANK },
50 {
"KAPIV", VISUM_CAPACITY },
51 {
"XKOORD", VISUM_XCOORD },
52 {
"YKOORD", VISUM_YCOORD },
54 {
"CODE", VISUM_CODE },
55 {
"VONKNOTNR", VISUM_FROMNODE },
56 {
"NACHKNOTNR", VISUM_TONODE },
57 {
"TYPNR", VISUM_TYPE },
59 {
"ANBINDUNG", VISUM_DISTRICT_CONNECTION },
60 {
"BEZNR", VISUM_SOURCE_DISTRICT },
61 {
"KNOTNR", VISUM_FROMNODENO },
62 {
"RICHTUNG", VISUM_DIRECTION },
63 {
"FLAECHEID", VISUM_SURFACEID },
64 {
"TFLAECHEID", VISUM_FACEID },
65 {
"VONPUNKTID", VISUM_FROMPOINTID },
66 {
"NACHPUNKTID", VISUM_TOPOINTID },
67 {
"KANTE", VISUM_EDGE },
68 {
"ABBIEGER", VISUM_TURN },
69 {
"UEBERKNOTNR", VISUM_VIANODENO },
70 {
"ANZFAHRSTREIFEN", VISUM_NUMLANES },
71 {
"INDEX", VISUM_INDEX },
72 {
"STRECKENPOLY", VISUM_LINKPOLY },
73 {
"FLAECHENELEMENT", VISUM_SURFACEITEM },
74 {
"TEILFLAECHENELEMENT", VISUM_FACEITEM },
75 {
"KANTEID", VISUM_EDGEID },
76 {
"Q", VISUM_ORIGIN },
77 {
"Z", VISUM_DESTINATION },
94 if (!oc.
isSet(
"visum-file")) {
100 oc.
getBool(
"visum.use-type-priority"),
111 const std::string& file,
114 const std::string& languageFile) :
115 myNetBuilder(nb), myFileName(file),
116 myCapacity2Lanes(capacity2Lanes), myUseVisumPrio(useVisumPrio) {
117 if (languageFile !=
"") {
177 for (NIVisumTL_Map::iterator j =
myTLS.begin(); j !=
myTLS.end(); j++) {
202 if (line.length() > 0 && line[0] ==
'$') {
203 ParserVector::iterator i;
205 std::string dataName =
"$" + (*i).name +
":";
206 if (line.substr(0, dataName.length()) == dataName) {
208 (*i).pattern = line.substr(dataName.length());
216 if ((*i).position < 0) {
228 bool singleDataEndFound =
false;
231 if (line.length() == 0 || line[0] ==
'*' || line[0] ==
'$') {
232 singleDataEndFound =
true;
237 (this->*(*i).function)();
239 WRITE_ERROR(
"Too short value line in " + (*i).name +
" occurred.");
243 WRITE_ERROR(
"One of the needed values ('" + std::string(e.what()) +
"') is missing in " + (*i).name +
".");
253 for (NIVisumTL_Map::iterator j =
myTLS.begin(); j !=
myTLS.end(); j++) {
258 (*k).first->addShape((*k).second);
283 }
else if (speed < 0) {
293 myNetBuilder.
getTypeCont().
insert(
myCurrentID, numLanes, speed / (
double) 3.6, priority, permissions,
NBEdge::UNSPECIFIED_WIDTH,
false,
NBEdge::UNSPECIFIED_WIDTH,
NBEdge::UNSPECIFIED_WIDTH, 0, 0, 0);
386 if (speedS.find(
"km/h") != std::string::npos) {
387 speedS = speedS.substr(0, speedS.find(
"km/h"));
419 bool oneway_checked = oneway;
421 if (previous !=
nullptr) {
424 oneway_checked =
false;
427 oneway_checked =
false;
432 if (previous !=
nullptr) {
435 oneway_checked =
false;
440 if (nolanes != 0 && speed != 0) {
458 if (nolanes != 0 && speed != 0) {
478 myEdges[id] = std::make_pair(from, to);
499 if (dest ==
nullptr) {
509 if (dir.length() == 0) {
534 if (dest ==
nullptr) {
554 std::string
id = bez +
"-" + dest->
getID();
557 if (dir.length() == 0) {
563 bool hasContinuation =
false;
564 for (EdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) {
565 if (!(*i)->isMacroscopicConnector()) {
566 hasContinuation =
true;
569 if (!hasContinuation) {
571 WRITE_WARNING(
"Incoming connector '" +
id +
"' will not be build - would be not connected to network.");
574 if (src ==
nullptr) {
575 WRITE_ERROR(
"The district '" + bez +
"' could not be built.");
578 NBEdge* edge =
new NBEdge(
id, src, dest,
"VisumConnector",
585 WRITE_ERROR(
"A duplicate edge id occurred (ID='" +
id +
"').");
589 if (edge !=
nullptr) {
597 bool hasPredeccessor =
false;
598 for (EdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) {
599 if (!(*i)->isMacroscopicConnector()) {
600 hasPredeccessor =
true;
603 if (!hasPredeccessor) {
605 WRITE_WARNING(
"Outgoing connector '" +
id +
"' will not be build - would be not connected to network.");
608 if (src ==
nullptr) {
609 WRITE_ERROR(
"The district '" + bez +
"' could not be built.");
613 NBEdge* edge =
new NBEdge(
id, dest, src,
"VisumConnector",
620 WRITE_ERROR(
"A duplicate edge id occurred (ID='" +
id +
"').");
624 if (edge !=
nullptr) {
642 if (from ==
nullptr || via ==
nullptr || to ==
nullptr) {
654 if (src ==
nullptr) {
660 if (dest ==
nullptr) {
689 WRITE_ERROR(
"Error in geometry description from node '" + from->
getID() +
"' to node '" + to->
getID() +
"'.");
694 WRITE_ERROR(
"Unable to project coordinates for node '" + from->
getID() +
"'.");
725 if (baseEdge ==
nullptr) {
731 if (node ==
nullptr) {
737 if (edge ==
nullptr) {
748 WRITE_ERROR(
"A lane number for edge '" + edge->
getID() +
"' is not numeric (" + laneS +
").");
753 WRITE_ERROR(
"A lane number for edge '" + edge->
getID() +
"' is not positive (" + laneS +
").");
772 WRITE_ERROR(
"A lane length for edge '" + edge->
getID() +
"' is not numeric (" + lengthS +
").");
776 WRITE_ERROR(
"A lane length for edge '" + edge->
getID() +
"' is not positive (" + lengthS +
").");
806 bool mustRecheck =
true;
807 double seenLength = 0;
808 while (mustRecheck) {
811 std::string sub = edge->
getID();
812 sub = sub.substr(sub.rfind(
'_', sub.rfind(
'_') - 1));
813 sub = sub.substr(1, sub.find(
'_', 1) - 1);
834 double useLength = length - seenLength;
835 useLength = edge->
getLength() - useLength;
836 if (useLength < 0 || useLength > edge->
getLength()) {
840 std::string edgeID = edge->
getID();
843 edgeID = edgeID.substr(0, edgeID.find(
'_'));
849 std::string nid = edgeID +
"_" +
toString((
int) length) +
"_" + node->
getID();
889 auto tlIt =
myTLS.find(trafficLight);
890 if (n !=
nullptr && tlIt !=
myTLS.end()) {
891 tlIt->second->addNode(n);
893 WRITE_ERROR(
"Could not assign" + std::string(n ==
nullptr ?
" missing" :
"") +
" node '" + node
894 +
"' to" + std::string(tlIt ==
myTLS.end() ?
" missing" :
"") +
" traffic light '" + trafficLight +
"'");
908 WRITE_ERROR(
"Could not find TLS '" + LSAid +
"' for setting the signal group.");
921 WRITE_WARNING(
"Ignoring SIGNALGRUPPEZUFSABBIEGER because LsaNr is not known");
934 if (from ==
nullptr && to ==
nullptr) {
943 if (edg1 !=
nullptr && edg2 !=
nullptr) {
946 if (edg1->
getID()[0] ==
'-') {
947 sid = edg1->
getID().substr(1);
949 sid =
"-" + edg1->
getID();
951 if (sid.find(
'_') != std::string::npos) {
952 sid = sid.substr(0, sid.find(
'_'));
958 if (edg2->
getID()[0] ==
'-') {
959 sid = edg2->
getID().substr(1);
961 sid =
"-" + edg2->
getID();
963 if (sid.find(
'_') != std::string::npos) {
964 sid = sid.substr(0, sid.find(
'_'));
978 WRITE_ERROR(
"Unknown edge in TEILFLAECHENELEMENT");
994 if (dir.length() > 0 && dir[0] ==
'1') {
1002 const std::vector<long long int>& areas =
mySubPartsAreas.find(
id)->second;
1003 for (std::vector<long long int>::const_iterator i = areas.begin(); i != areas.end(); ++i) {
1011 if (dir.length() > 0 && dir[0] ==
'1') {
1043 SG.
phases()[Phaseid] = PH;
1049 NBEdge* fromEdge =
nullptr;
1050 NBEdge* toEdge =
nullptr;
1053 if (nodeID ==
"0") {
1056 if (fromEdge ==
nullptr) {
1060 WRITE_WARNING(
"Ignoring lane-to-lane connection (not yet implemented for this format version)");
1064 if (node ==
nullptr) {
1070 if (fromEdge ==
nullptr || toEdge ==
nullptr) {
1074 int fromLaneOffset = 0;
1084 int toLaneOffset = 0;
1098 WRITE_ERROR(
"A from-lane number for edge '" + fromEdge->
getID() +
"' is not numeric (" + fromLaneS +
").");
1103 WRITE_ERROR(
"A from-lane number for edge '" + fromEdge->
getID() +
"' is not positive (" + fromLaneS +
").");
1112 WRITE_ERROR(
"A to-lane number for edge '" + toEdge->
getID() +
"' is not numeric (" + toLaneS +
").");
1117 WRITE_ERROR(
"A to-lane number for edge '" + toEdge->
getID() +
"' is not positive (" + toLaneS +
").");
1121 if (fromLane - fromLaneOffset < 0) {
1124 fromLane = (int)fromEdge->
getNumLanes() - (fromLane - fromLaneOffset) - 1;
1126 if (toLane - toLaneOffset < 0) {
1129 toLane = (int)toEdge->
getNumLanes() - (toLane - toLaneOffset) - 1;
1133 WRITE_ERROR(
"A from-lane number for edge '" + fromEdge->
getID() +
"' is larger than the edge's lane number (" + fromLaneS +
").");
1137 WRITE_ERROR(
"A to-lane number for edge '" + toEdge->
getID() +
"' is larger than the edge's lane number (" + toLaneS +
").");
1160 if (val.find(suffix) != std::string::npos) {
1161 val = val.substr(0, val.find(suffix));
1196 std::transform(v.begin(), v.end(), v.begin(), tolower);
1197 if (v ==
"bus" || v ==
"tcsp" || v ==
"acces tc" || v ==
"Accès tc" || v ==
"accès tc") {
1199 }
else if (v ==
"walk" || v ==
"w" || v ==
"f" || v ==
"ped" || v ==
"map") {
1201 }
else if (v ==
"l" || v ==
"lkw" || v ==
"h" || v ==
"hgv" || v ==
"lw" || v ==
"truck" || v ==
"tru" || v ==
"pl") {
1203 }
else if (v ==
"b" || v ==
"bike" || v ==
"velo") {
1205 }
else if (v ==
"train" || v ==
"rail") {
1207 }
else if (v ==
"tram") {
1209 }
else if (v ==
"p" || v ==
"pkw" || v ==
"car" || v ==
"c" || v ==
"vp" || v ==
"2rm") {
1225 if (node ==
nullptr) {
1226 WRITE_ERROR(
"The node '" + nodeS +
"' is not known.");
1235 if (node ==
nullptr) {
1256 if (edge ==
nullptr) {
1257 WRITE_ERROR(
"The edge '" + edgeS +
"' is not known.");
1277 if (edge->
getID()[0] ==
'-') {
1278 sid = edge->
getID().substr(1);
1280 sid =
"-" + edge->
getID();
1282 if (sid.find(
'_') != std::string::npos) {
1283 sid = sid.substr(0, sid.find(
'_'));
1291 if (begin ==
nullptr) {
1295 std::string edgeID = ret->
getID();
1297 while (ret !=
nullptr) {
1303 if (nedges.size() != 1) {
1308 NBEdge* next = nedges[0];
1309 if (ret->
getID().substr(0, edgeID.length()) != next->
getID().substr(0, edgeID.length())) {
1323 while (ret !=
nullptr) {
1329 if (nedges.size() != 1) {
1334 NBEdge* next = nedges[0];
1335 if (ret->
getID().substr(0, edgeID.length()) != next->
getID().substr(0, edgeID.length())) {
1354 if (edge ==
nullptr) {
1355 WRITE_ERROR(
"The edge '" + edgeS +
"' is not known.");
1374 EdgeVector::const_iterator i;
1376 if (ToNode == (*i)->getToNode()) {
1389 value = value.substr(0, value.length() - 4);
1400 return defaultValue;
1417 double defaultValue) {
1434 const std::string& fieldName2) {
1452 if (dist ==
nullptr) {
1457 nid =
id +
"-" + dest->
getID();
1463 WRITE_ERROR(
"Could not build connector node '" + nid +
"'.");
1472 if (from ==
nullptr) {
1473 WRITE_ERROR(
" The from-node was not found within the net");
1475 if (to ==
nullptr) {
1476 WRITE_ERROR(
" The to-node was not found within the net");
1481 return from !=
nullptr && to !=
nullptr && from != to;
1486 return (edge->
getID().length() > node->
getID().length() + 1
1487 && (edge->
getID().substr(edge->
getID().length() - node->
getID().length() - 1) ==
"_" + node->
getID()));
1492 std::ifstream strm(file.c_str());
1494 throw ProcessError(
"Could not load VISUM language map from '" + file +
"'.");
1496 while (strm.good()) {
1505 }
else if (keyDE !=
"") {
1506 WRITE_WARNING(
"Unknown entry '" + keyDE +
"' in VISUM language map");
std::string getNamedString(const std::string &fieldName)
Returns the value from the named column as a normalised string.
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
@ SVC_PEDESTRIAN
pedestrian
void parse_VSysTypes()
Parses VSYS.
bool hasOutgoing(const NBEdge *const e) const
Returns whether the given edge starts at this node.
NBEdge * getEdge(NBNode *FromNode, NBNode *ToNode)
Returns the edge that connects both nodes.
bool getWeightedBool(const std::string &name)
tries to get a bool which is possibly assigned to a certain modality
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter
#define WRITE_WARNING(msg)
void parse_Connectors()
Parses ANBINDUNG.
Instance responsible for building networks.
SignalGroup & getSignalGroup(const std::string &name)
Returns the named signal group.
void parse_LanesConnections()
Parses FAHRSTREIFENABBIEGER.
bool readLine(LineHandler &lh)
Reads a single (the next) line from the file and reports it to the given LineHandler.
const std::string & getString(const T key) const
static StringBijection< VISUM_KEY >::Entry KEYS_DE[]
Strings for the keywords.
double getWeightedFloat2(const std::string &name, const std::string &name2, const std::string &suffix)
as above but with two alternative names
void reinit()
Reinitialises the reading (of the previous file)
NBEdge * getConnectionTo(NBNode *n) const
get connection to certain node
std::map< long long int, std::vector< long long int > > mySubPartsAreas
A map from area parts to area ids.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
static std::string normalIDRepresentation(const std::string &id)
converts the numerical id to its "normal" string representation
NBNetBuilder & myNetBuilder
The network builder to fill with loaded values.
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
void parse_Districts()
Parses BEZIRK.
const Position & getPosition() const
Returns the position of this district's center.
bool insert(const std::string &id, const Position &position, NBDistrict *district=0)
Inserts a node into the map.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool setFile(const std::string &file)
Reinitialises the reader for reading from the given file.
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges (The edges which start at this node)
bool myUseVisumPrio
Information whether VISUM priority information shall be used.
void parse_Lanes()
Parses FAHRSTREIFEN.
bool addEdge2EdgeConnection(NBEdge *dest)
Adds a connection to another edge.
void parse_SignalGroups()
Parses LSASIGNALGRUPPE/SIGNALGRUPPE.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
@ SVC_BICYCLE
vehicle is a bicycle
void insert(const std::string &id, int numLanes, double maxSpeed, int prio, SVCPermissions permissions, double width, bool oneWayIsDefault, double sidewalkWidth, double bikeLaneWidth, double widthResolution, double maxWidth, double minWidth)
Adds a type into the list.
static OptionsCont & getOptions()
Retrieves the options.
SVCPermissions getPermissions(const std::string &name, bool warn=false, SVCPermissions unknown=SVCAll)
parse permissions
static bool transformCoordinate(Position &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
transforms loaded coordinates handles projections, offsets (using GeoConvHelper) and import of height...
bool insert(NBEdge *edge, bool ignorePrunning=false)
Adds an edge to the dictionary.
void setPermissions(SVCPermissions permissions, int lane=-1)
set allowed/disallowed classes for the given lane or for all lanes if -1 is given
void setLaneSpreadFunction(LaneSpreadFunction spread)
(Re)sets how the lanes lateral offset shall be computed
NBNode * buildDistrictNode(const std::string &id, NBNode *dest, bool isSource)
Builds a node for the given district and returns it.
void parseLine(const std::string &line)
Parses the contents of the line.
NBDistrict * retrieve(const std::string &id) const
Returns the districts with the given id.
@ SVC_RAIL
vehicle is a not electrified rail
bool splitAt(NBDistrictCont &dc, NBEdge *edge, NBNode *node)
Splits the edge at the position nearest to the given node.
NBNode * getNamedNodeSecure(const std::string &fieldName, NBNode *fallback=0)
void setPos(unsigned long pos)
Sets the current position within the file to the given value.
NBEdgeCont & getEdgeCont()
The representation of a single edge during network building.
static StringBijection< VISUM_KEY > KEYS
link directions
long position
Position of the according db within the file.
std::map< long long int, NBDistrict * > myShapeDistrictMap
A map from district shape definition name to the district.
A signal group can be defined either by a time period or by phases.
void parse_NodesToTrafficLights()
Parses KNOTENZULSA/SIGNALANLAGEZUKNOTEN.
@ SVC_TRAM
vehicle is a light rail
std::string get(const std::string &name, bool prune=false) const
Returns the named information.
~NIImporter_VISUM()
destructor
bool addSource(const std::string &dist, NBEdge *const source, double weight)
Adds a source to the named district.
NBNode * getToNode() const
Returns the destination node of the edge.
int get(double capacity) const
Returns the number of lanes computed from the given capacity.
const PositionVector & getGeometry() const
Returns the geometry of the edge.
@ SVC_TRUCK
vehicle is a large transport vehicle
static bool endsWith(const std::string &str, const std::string suffix)
Checks whether a given string ends with the suffix.
std::string myFileName
The name of the parsed file, for error reporting.
void parse_Connectors_legacy()
NBConnectionVector & connections()
Returns the connections vector.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
static bool isSplitEdge(NBEdge *edge, NBNode *node)
whether the edge id ends with _nodeID
NBCapacity2Lanes myCapacity2Lanes
The converter to compute the lane number of edges from their capacity.
NIImporter_VISUM(NBNetBuilder &nb, const std::string &file, NBCapacity2Lanes capacity2Lanes, bool useVisumPrio, const std::string &languageFile)
constructor
void insert(const std::string str, const T key, bool checkDuplicates=true)
double getSpeed(const std::string &type) const
Returns the maximal velocity for the given type [m/s].
void parse_Turns()
Parses ABBIEGEBEZIEHUNG/ABBIEGER.
T get(const std::string &str) const
void setAsMacroscopicConnector()
NBNode * getNamedNode(const std::string &fieldName)
Tries to get the node which name is stored in the given field.
A complete call description for parsing a single db.
void load()
Parses the VISUM-network file storing the parsed structures within myNetBuilder.
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
void parse_PartOfArea()
Parses FLAECHENELEMENT.
int getNumLanes() const
Returns the number of lanes.
A point in 2D or 3D with translation and scaling methods.
Intermediate class for storing visum traffic lights during their import.
NamedColumnsParser myLineParser
the parser to parse the information from the data lines
NBEdge * getNamedEdgeContinuating(const std::string &fieldName, NBNode *node)
Tries to get the edge which name is stored in the given field continuating the search for a subedge t...
A storage for options typed value containers)
A VISUM network importer.
unsigned long getPosition()
Returns the current position within the file.
int getPriority(const std::string &type) const
Returns the priority for the given type.
std::map< long long int, std::pair< long long int, long long int > > myEdges
A map of edge (not road, but "edge" in this case) ids to from/to-points.
bool hasMore() const
Returns whether another line may be read (the file was not read completely)
void reinit(const std::string &def, const std::string &defDelim=";", const std::string &lineDelim=";", bool chomp=false, bool ignoreCase=true)
Reinitialises the parser.
std::map< NBDistrict *, PositionVector > myDistrictShapes
A temporary storage for district shapes as they are filled incrementally.
bool checkNodes(NBNode *from, NBNode *to)
Returns whether both nodes are a valid combination of from/to-nodes.
@ L2L_VALIDATED
The connection was computed and validated.
bool know(const std::string &name) const
Returns the information whether the named column is known.
A helper class which computes the lane number from given capacity.
void parse_Edges()
Parses STRECKE/STRECKEN.
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
std::map< std::string, Phase * > & getPhases()
Returns the map of named phases.
std::string name
The name of the db.
ParsingFunction function
Pointer to the function used for parsing.
NBEdge * getReversedContinuating(NBEdge *edge, NBNode *node)
Returns the opposite direction of the given edge.
void parse_TrafficLights()
Parses LSA/SIGNALANLAGE.
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
double getLength() const
Returns the computed length of the edge.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
void reduceGeometries(const double minDist)
#define PROGRESS_BEGIN_MESSAGE(msg)
void addGeometryPoint(int index, const Position &p)
Adds a further geometry point.
void addParser(const std::string &name, ParsingFunction function)
Adds a parser into the sorted list of parsers to use.
SVCPermissions getPermissions(const std::string &type) const
Returns allowed vehicle classes for the given type.
PositionVector reverse() const
reverse position vector
NBTrafficLightLogicCont & getTLLogicCont()
Returns a reference to the traffic light logics container.
std::map< long long int, Position > myPoints
A map of point ids to positions.
@ VISUM_DISTRICT_CONNECTION
void parse_SignalGroupsToPhases()
Parses LSASIGNALGRUPPEZULSAPHASE.
void loadLanguage(const std::string &file)
void parse_Kante()
Parses FLAECHENELEMENT.
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges (The edges which yield in this node)
bool markAsSet(const std::string &id, const SumoXMLAttr attr)
Marks an attribute of a type as set.
#define PROGRESS_DONE_MESSAGE()
bool insert(NBDistrict *const district)
Adds a district to the dictionary.
int getNumLanes(const std::string &type) const
Returns the number of lanes for the given type.
NBDistrictCont & getDistrictCont()
Returns a reference the districts container.
static const double UNSPECIFIED_WIDTH
unspecified lane width
void parse_TurnsToSignalGroups()
Parses ABBZULSASIGNALGRUPPE/SIGNALGRUPPEZUABBIEGER.
void parse_Types()
Parses STRECKENTYP.
void parse_Nodes()
Parses KNOTEN.
NBEdge * getNamedEdge(const std::string &fieldName)
Tries to get the edge which name is stored in the given field.
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge's lateral offset shal...
bool addSink(const std::string &dist, NBEdge *const destination, double weight)
Adds a sink to the named district.
std::vector< std::string > getVector()
return vector of strings
bool hasIncoming(const NBEdge *const e) const
Returns whether the given edge ends at this node.
VSysTypeNames myVSysTypes
The used vsystypes.
void parse_Point()
Parses PUNKT.
bool hasString(const std::string &str) const
@ SVC_BUS
vehicle is a bus
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads network definition from the assigned option and stores it in the given network builder.
std::map< std::string, Phase * > & phases()
Returns the phases map.
void incLaneNo(int by)
increment lane
static long long int toLong(const std::string &sData)
converts a string into the long value described by it by calling the char-type converter,...
LineReader myLineReader
The line reader to use to read from the file.
Represents a single node (junction) during network building.
std::vector< std::string > myTouchedEdges
Already read edges.
NIVisumTL_Map myTLS
List of visum traffic lights.
double getWeightedFloat(const std::string &name, const std::string &suffix)
tries to get a double which is possibly assigned to a certain modality
NBNodeCont & getNodeCont()
Returns a reference to the node container.
std::string myCurrentID
The name of the currently parsed item used for error reporting.
NBTypeCont & getTypeCont()
Returns a reference to the type container.
void remove(const std::string str, const T key)
const std::string & getID() const
Returns the id.
void parse_EdgePolys()
Parses STRECKENPOLY.
double getNamedFloat(const std::string &fieldName)
Returns the value from the named column as a float.
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, SVCPermissions=SVC_UNSPECIFIED)
Adds a connection between the specified this edge's lane and an approached one.
A class representing a single district.
NBNode * getFromNode() const
Returns the origin node of the edge.
#define WRITE_MESSAGE(msg)
void parse_Phases()
Parses LSAPHASE/PHASE.
ParserVector mySingleDataParsers
List of known parsers.
void parse_AreaSubPartElement()
Parses ABBZULSASIGNALGRUPPE/SIGNALGRUPPEZUABBIEGER.
const std::string & getID() const