SUMO - Simulation of Urban MObility
NIImporter_MATSim.h
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 /****************************************************************************/
18 // Importer for networks stored in MATSim format
19 /****************************************************************************/
20 #ifndef NIImporter_MATSim_h
21 #define NIImporter_MATSim_h
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 <map>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class NBEdge;
44 class NBEdgeCont;
45 class NBNetBuilder;
46 class NBNode;
47 class NBNodeCont;
49 class NBTypeCont;
50 class OptionsCont;
51 
52 
53 // ===========================================================================
54 // class definitions
55 // ===========================================================================
62 public:
74  static void loadNetwork(const OptionsCont& oc, NBNetBuilder& nb);
75 
76 
77 private:
83  public:
87  NodesHandler(NBNodeCont& toFill);
88 
89 
91  ~NodesHandler();
92 
93 
94  protected:
96 
97 
105  void myStartElement(int element, const SUMOSAXAttributes& attrs);
107 
108 
109  private:
112 
113 
114  private:
116  NodesHandler(const NodesHandler& s);
117 
120 
121  };
122 
123 
124 
130  public:
139  EdgesHandler(const NBNodeCont& nc, NBEdgeCont& toFill,
140  bool keepEdgeLengths, bool lanesFromCapacity,
141  NBCapacity2Lanes capacity2Lanes);
142 
143 
145  ~EdgesHandler();
146 
147 
148  protected:
150 
151 
159  void myStartElement(int element, const SUMOSAXAttributes& attrs);
161 
162 
163  private:
166 
169 
172 
175 
178 
181 
182 
183  private:
185  EdgesHandler(const EdgesHandler& s);
186 
189 
190  };
191 
192 
204  };
205 
206 
228  };
229 
232 
235 
236 
237 };
238 
239 
240 #endif
241 
242 /****************************************************************************/
243 
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
A container for traffic light definitions and built programs.
A helper class which computes the lane number from given capacity.
The representation of a single edge during network building.
Definition: NBEdge.h:70
NodesHandler(NBNodeCont &toFill)
Contructor.
NBNodeCont & myNodeCont
The nodes container to fill.
A handler which converts occuring elements and attributes into enums.
bool myLanesFromCapacity
Whether the lane number shall be computed from the capacity.
static StringBijection< int >::Entry matsimAttrs[]
The names of MATSIM-XML attributes (for passing to GenericSAXHandler)
Encapsulated SAX-Attributes.
MatsimXMLAttr
Numbers representing MATSIM-XML - attributes.
A class which extracts MATSIM-nodes from a parsed MATSIM-file.
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
bool myKeepEdgeLengths
Whether the loaded lengths shal be used.
Importer for networks stored in MATSim format.
double myCapacityNorm
The capacity norming.
MatsimXMLTag
Numbers representing MATSIM-XML - element names.
NBCapacity2Lanes myCapacity2Lanes
The converter from flow to lanes.
A class which extracts MATSIM-edges from a parsed MATSIM-file.
const NBNodeCont & myNodeCont
The previously parsed nodes.
Instance responsible for building networks.
Definition: NBNetBuilder.h:115
A storage for options typed value containers)
Definition: OptionsCont.h:98
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads content of the optionally given MATSIM network files.
Represents a single node (junction) during network building.
Definition: NBNode.h:74
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:66
static StringBijection< int >::Entry matsimTags[]
The names of MATSIM-XML elements (for passing to GenericSAXHandler)
NodesHandler & operator=(const NodesHandler &s)
invalidated assignment operator
NBEdgeCont & myEdgeCont
The edge container to fill.
A storage for available types of edges.
Definition: NBTypeCont.h:61