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
NWWriter_SUMO.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Exporter writing networks using the SUMO format
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12
// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
13
/****************************************************************************/
14
//
15
// This file is part of SUMO.
16
// SUMO is free software: you can redistribute it and/or modify
17
// it under the terms of the GNU General Public License as published by
18
// the Free Software Foundation, either version 3 of the License, or
19
// (at your option) any later version.
20
//
21
/****************************************************************************/
22
#ifndef NWWriter_SUMO_h
23
#define NWWriter_SUMO_h
24
25
26
// ===========================================================================
27
// included modules
28
// ===========================================================================
29
#ifdef _MSC_VER
30
#include <
windows_config.h
>
31
#else
32
#include <
config.h
>
33
#endif
34
35
#include <string>
36
#include <map>
37
#include <
netbuild/NBEdge.h
>
38
#include <
utils/xml/SUMOSAXHandler.h
>
39
#include <
utils/common/UtilExceptions.h
>
40
#include <
netbuild/NBConnectionDefs.h
>
41
42
43
// ===========================================================================
44
// class declarations
45
// ===========================================================================
46
class
OutputDevice
;
47
class
OptionsCont
;
48
class
NBNetBuilder
;
49
class
NBTrafficLightLogicCont
;
50
class
NBNode
;
51
class
NBDistrict
;
52
class
NBEdgeControl;
53
54
55
// ===========================================================================
56
// class definitions
57
// ===========================================================================
63
class
NWWriter_SUMO
{
64
public
:
65
66
enum
ConnectionStyle
{
67
SUMONET
,
// all connection information
68
PLAIN
,
// only edges and link indices
69
TLL
// like plain but include tl information
70
};
71
77
static
void
writeNetwork
(
const
OptionsCont
& oc,
NBNetBuilder
& nb);
78
79
87
static
void
writeConnection
(
OutputDevice
& into,
const
NBEdge
& from,
const
NBEdge::Connection
& c,
88
bool
includeInternal,
ConnectionStyle
style =
SUMONET
);
89
91
static
void
writeProhibitions
(
OutputDevice
& into,
const
NBConnectionProhibits
& prohibitions);
92
94
static
void
writeTrafficLights
(
OutputDevice
& into,
const
NBTrafficLightLogicCont
& tllCont);
95
97
static
void
writeLocation
(
OutputDevice
& into);
98
100
static
void
writePermissions
(
OutputDevice
& into,
SVCPermissions
permissions);
101
103
static
void
writePreferences
(
OutputDevice
& into,
SVCPermissions
preferred);
104
105
protected
:
108
115
static
bool
writeInternalEdges
(
OutputDevice
& into,
const
NBNode
& n,
bool
origNames);
116
117
125
static
void
writeEdge
(
OutputDevice
& into,
const
NBEdge
& e,
bool
noNames,
bool
origNames);
126
127
138
static
void
writeLane
(
OutputDevice
& into,
const
std::string& lID,
const
std::string& eID,
139
const
NBEdge::Lane
& lane,
SUMOReal
length,
unsigned
int
index,
140
bool
origNames);
141
142
148
static
void
writeJunction
(
OutputDevice
& into,
const
NBNode
& n,
const
bool
checkLaneFoes);
149
150
155
static
bool
writeInternalNodes
(
OutputDevice
& into,
const
NBNode
& n);
156
157
162
static
bool
writeInternalConnections
(
OutputDevice
& into,
const
NBNode
& n);
163
164
170
static
void
writeRoundabout
(
OutputDevice
& into,
const
std::vector<std::string>& r,
171
const
NBEdgeCont
& ec);
172
173
178
static
void
writeDistrict
(
OutputDevice
& into,
const
NBDistrict
& d);
179
180
181
private
:
188
static
void
writeInternalEdge
(
OutputDevice
& into,
const
std::string&
id
,
SUMOReal
vmax,
const
PositionVector
& shape,
189
const
std::string& origID);
190
197
static
void
writeInternalConnection
(
OutputDevice
& into,
198
const
std::string& from,
const
std::string& to,
int
toLane,
const
std::string& via);
199
201
static
std::string
writeSUMOTime
(
SUMOTime
time);
202
203
205
static
std::string
prohibitionConnection
(
const
NBConnection
& c);
206
};
207
208
209
#endif
210
211
/****************************************************************************/
212
build
buildd
sumo-0.18~dfsg
src
netwrite
NWWriter_SUMO.h
Generated on Wed Oct 23 2013 01:15:11 for SUMO - Simulation of Urban MObility by
1.8.4