 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
17 #ifndef NIImporter_VISUM_h
18 #define NIImporter_VISUM_h
97 const std::string& languageFile);
136 double getNamedFloat(
const std::string& fieldName1,
const std::string& fieldName2);
145 double getNamedFloat(
const std::string& fieldName,
double defaultValue);
154 double getNamedFloat(
const std::string& fieldName1,
const std::string& fieldName2,
155 double defaultValue);
179 std::string
getNamedString(
const std::string& fieldName1,
const std::string& fieldName2);
191 double getWeightedFloat(
const std::string& name,
const std::string& suffix);
194 double getWeightedFloat2(
const std::string& name,
const std::string& name2,
const std::string& suffix);
513 std::map<long long int, std::pair<long long int, long long int> >
myEdges;
std::string getNamedString(const std::string &fieldName)
Returns the value from the named column as a normalised string.
void parse_VSysTypes()
Parses VSYS.
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
void parse_Connectors()
Parses ANBINDUNG.
Storage for edges, including some functionality operating on multiple edges.
Instance responsible for building networks.
void parse_LanesConnections()
Parses FAHRSTREIFENABBIEGER.
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
std::map< long long int, std::vector< long long int > > mySubPartsAreas
A map from area parts to area ids.
NBNetBuilder & myNetBuilder
The network builder to fill with loaded values.
void parse_Districts()
Parses BEZIRK.
bool myUseVisumPrio
Information whether VISUM priority information shall be used.
void parse_Lanes()
Parses FAHRSTREIFEN.
void(NIImporter_VISUM::* ParsingFunction)()
Definition of a function for parsing a single line from a certain db.
void parse_SignalGroups()
Parses LSASIGNALGRUPPE/SIGNALGRUPPE.
SVCPermissions getPermissions(const std::string &name, bool warn=false, SVCPermissions unknown=SVCAll)
parse permissions
std::string pattern
The column names.
NBNode * buildDistrictNode(const std::string &id, NBNode *dest, bool isSource)
Builds a node for the given district and returns it.
std::map< std::string, NIVisumTL * > NIVisumTL_Map
Definition of a map for loaded traffic lights (id->tls)
NBNode * getNamedNodeSecure(const std::string &fieldName, NBNode *fallback=0)
Container for nodes during the netbuilding process.
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.
void parse_NodesToTrafficLights()
Parses KNOTENZULSA/SIGNALANLAGEZUKNOTEN.
~NIImporter_VISUM()
destructor
std::string myFileName
The name of the parsed file, for error reporting.
void parse_Connectors_legacy()
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 parse_Turns()
Parses ABBIEGEBEZIEHUNG/ABBIEGER.
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.
void parse_PartOfArea()
Parses FLAECHENELEMENT.
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.
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.
std::map< NBDistrict *, PositionVector > myDistrictShapes
A temporary storage for district shapes as they are filled incrementally.
Retrieves a file linewise and reports the lines to a handler.
bool checkNodes(NBNode *from, NBNode *to)
Returns whether both nodes are a valid combination of from/to-nodes.
A helper class which computes the lane number from given capacity.
void parse_Edges()
Parses STRECKE/STRECKEN.
std::vector< TypeParser > ParserVector
Definition of the list of known parsers.
std::string name
The name of the db.
NBEdge * getReversedContinuating(NBEdge *edge, NBNode *node)
Returns the opposite direction of the given edge.
void parse_TrafficLights()
Parses LSA/SIGNALANLAGE.
void addParser(const std::string &name, ParsingFunction function)
Adds a parser into the sorted list of parsers to use.
std::map< long long int, Position > myPoints
A map of point ids to positions.
void parse_SignalGroupsToPhases()
Parses LSASIGNALGRUPPEZULSAPHASE.
void loadLanguage(const std::string &file)
const SVCPermissions SVCAll
all VClasses are allowed
void parse_Kante()
Parses FLAECHENELEMENT.
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.
VSysTypeNames myVSysTypes
The used vsystypes.
void parse_Point()
Parses PUNKT.
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads network definition from the assigned option and stores it in the given network builder.
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
std::string myCurrentID
The name of the currently parsed item used for error reporting.
std::map< std::string, std::string > VSysTypeNames
Definition of a storage for vsystypes.
void parse_EdgePolys()
Parses STRECKENPOLY.
double getNamedFloat(const std::string &fieldName)
Returns the value from the named column as a float.
void parse_Phases()
Parses LSAPHASE/PHASE.
A parser to retrieve information from a table with known columns.
ParserVector mySingleDataParsers
List of known parsers.
void parse_AreaSubPartElement()
Parses ABBZULSASIGNALGRUPPE/SIGNALGRUPPEZUABBIEGER.