SUMO - Simulation of Urban MObility
NIImporter_MATSim.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Importer for networks stored in MATSim format
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef NIImporter_MATSim_h
22 #define NIImporter_MATSim_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <map>
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 class NBEdge;
45 class NBEdgeCont;
46 class NBNetBuilder;
47 class NBNode;
48 class NBNodeCont;
50 class NBTypeCont;
51 class OptionsCont;
52 
53 
54 // ===========================================================================
55 // class definitions
56 // ===========================================================================
63 public:
75  static void loadNetwork(const OptionsCont& oc, NBNetBuilder& nb);
76 
77 
78 private:
84  public:
88  NodesHandler(NBNodeCont& toFill);
89 
90 
92  ~NodesHandler();
93 
94 
95  protected:
97 
98 
106  void myStartElement(int element, const SUMOSAXAttributes& attrs);
108 
109 
110  private:
113 
114 
115  private:
117  NodesHandler(const NodesHandler& s);
118 
121 
122  };
123 
124 
125 
131  public:
140  EdgesHandler(const NBNodeCont& nc, NBEdgeCont& toFill,
141  bool keepEdgeLengths, bool lanesFromCapacity,
142  NBCapacity2Lanes capacity2Lanes);
143 
144 
146  ~EdgesHandler();
147 
148 
149  protected:
151 
152 
160  void myStartElement(int element, const SUMOSAXAttributes& attrs);
162 
163 
164  private:
167 
170 
173 
176 
179 
182 
183 
184  private:
186  EdgesHandler(const EdgesHandler& s);
187 
190 
191  };
192 
193 
205  };
206 
207 
229  };
230 
233 
236 
237 
238 };
239 
240 
241 #endif
242 
243 /****************************************************************************/
244 
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:71
NodesHandler(NBNodeCont &toFill)
Contructor.
EdgesHandler & operator=(const EdgesHandler &s)
invalidated assignment operator
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.
SUMOReal myCapacityNorm
The capacity norming.
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
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
bool myKeepEdgeLengths
Whether the loaded lengths shal be used.
EdgesHandler(const NBNodeCont &nc, NBEdgeCont &toFill, bool keepEdgeLengths, bool lanesFromCapacity, NBCapacity2Lanes capacity2Lanes)
Constructor.
Importer for networks stored in MATSim format.
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:113
A storage for options typed value containers)
Definition: OptionsCont.h:108
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:75
#define SUMOReal
Definition: config.h:218
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:64
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:56