SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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.sourceforge.net/
11
// Copyright (C) 2001-2012 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>
36
#include <
netbuild/NBCapacity2Lanes.h
>
37
#include <
utils/xml/SUMOSAXHandler.h
>
38
#include <
utils/common/UtilExceptions.h
>
39
40
41
// ===========================================================================
42
// class declarations
43
// ===========================================================================
44
class
NBEdge
;
45
class
NBEdgeCont
;
46
class
NBNetBuilder
;
47
class
NBNode
;
48
class
NBNodeCont
;
49
class
NBTrafficLightLogicCont
;
50
class
NBTypeCont
;
51
class
OptionsCont
;
52
53
54
// ===========================================================================
55
// class definitions
56
// ===========================================================================
62
class
NIImporter_MATSim
{
63
public
:
75
static
void
loadNetwork
(
const
OptionsCont
& oc,
NBNetBuilder
& nb);
76
77
78
private
:
83
class
NodesHandler
:
public
GenericSAXHandler
{
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
:
112
NBNodeCont
&
myNodeCont
;
113
114
115
private
:
117
NodesHandler
(
const
NodesHandler
& s);
118
120
NodesHandler
&
operator=
(
const
NodesHandler
& s);
121
122
};
123
124
125
130
class
EdgesHandler
:
public
GenericSAXHandler
{
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
:
166
const
NBNodeCont
&
myNodeCont
;
167
169
NBEdgeCont
&
myEdgeCont
;
170
172
SUMOReal
myCapacityNorm
;
173
175
bool
myKeepEdgeLengths
;
176
178
bool
myLanesFromCapacity
;
179
181
NBCapacity2Lanes
myCapacity2Lanes
;
182
183
184
private
:
186
EdgesHandler
(
const
EdgesHandler
& s);
187
189
EdgesHandler
&
operator=
(
const
EdgesHandler
& s);
190
191
};
192
193
199
enum
MatsimXMLTag
{
200
MATSIM_TAG_NOTHING
= 0,
201
MATSIM_TAG_NETWORK
,
202
MATSIM_TAG_NODE
,
203
MATSIM_TAG_LINK
,
204
MATSIM_TAG_LINKS
205
};
206
207
213
enum
MatsimXMLAttr
{
214
MATSIM_ATTR_NOTHING
= 0,
215
MATSIM_ATTR_ID
,
216
MATSIM_ATTR_X
,
217
MATSIM_ATTR_Y
,
218
MATSIM_ATTR_FROM
,
219
MATSIM_ATTR_TO
,
220
MATSIM_ATTR_LENGTH
,
221
MATSIM_ATTR_FREESPEED
,
222
MATSIM_ATTR_CAPACITY
,
223
MATSIM_ATTR_PERMLANES
,
224
MATSIM_ATTR_ONEWAY
,
225
MATSIM_ATTR_MODES
,
226
MATSIM_ATTR_ORIGID
,
227
MATSIM_ATTR_CAPPERIOD
,
228
MATSIM_ATTR_CAPDIVIDER
229
};
230
232
static
StringBijection<int>::Entry
matsimTags
[];
233
235
static
StringBijection<int>::Entry
matsimAttrs
[];
236
237
238
};
239
240
241
#endif
242
243
/****************************************************************************/
244
build
buildd
sumo-0.16.0~dfsg
src
netimport
NIImporter_MATSim.h
Generated on Tue Apr 16 2013 01:32:18 for SUMO - Simulation of Urban MObility by
1.8.3.1