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
ROLoader.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Loader for networks and route imports
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12
// Copyright (C) 2001-2012 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 ROLoader_h
23
#define ROLoader_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 <xercesc/sax2/SAX2XMLReader.hpp>
37
#include <
utils/common/SUMOTime.h
>
38
#include <
utils/common/SUMOAbstractRouter.h
>
39
#include <
utils/common/ValueTimeLine.h
>
40
#include <
utils/xml/SAXWeightsHandler.h
>
41
42
43
// ===========================================================================
44
// class declarations
45
// ===========================================================================
46
class
OptionsCont
;
47
class
RONet
;
48
class
ROTypedXMLRoutesLoader
;
49
class
ROAbstractEdgeBuilder
;
50
class
GUIRouterRunThread;
51
class
ROVehicle
;
52
53
54
// ===========================================================================
55
// class definitions
56
// ===========================================================================
65
class
ROLoader
{
66
public
:
73
ROLoader
(
OptionsCont
& oc,
bool
emptyDestinationsAllowed);
74
75
77
virtual
~ROLoader
();
78
80
virtual
void
loadNet
(
RONet
& toFill,
ROAbstractEdgeBuilder
& eb);
81
83
bool
loadWeights
(
RONet
& net,
const
std::string& optionName,
84
const
std::string& measure,
bool
useLanes);
85
88
unsigned
int
openRoutes
(
RONet
& net);
89
92
void
processRoutesStepWise
(
SUMOTime
start,
SUMOTime
end,
93
RONet
& net,
SUMOAbstractRouter<ROEdge, ROVehicle>
& router);
94
97
void
processAllRoutes
(
SUMOTime
start,
SUMOTime
end,
98
RONet
& net,
SUMOAbstractRouter<ROEdge, ROVehicle>
& router);
99
100
#ifdef HAVE_INTERNAL // catchall for internal stuff
101
102
void
processAllRoutesWithBulkRouter(
SUMOTime
start,
SUMOTime
end,
103
RONet
& net,
SUMOAbstractRouter<ROEdge, ROVehicle>
& router);
104
#endif
105
106
bool
makeSingleStep
(
SUMOTime
end,
RONet
& net,
SUMOAbstractRouter<ROEdge, ROVehicle>
& router);
107
108
protected
:
130
bool
openTypedRoutes
(
const
std::string& optionName,
RONet
& net);
131
132
142
SUMOTime
getMinTimeStep
()
const
;
143
144
145
151
class
EdgeFloatTimeLineRetriever_EdgeWeight
:
public
SAXWeightsHandler::EdgeFloatTimeLineRetriever
{
152
public
:
154
EdgeFloatTimeLineRetriever_EdgeWeight
(
RONet
& net) :
myNet
(net) {}
155
157
~EdgeFloatTimeLineRetriever_EdgeWeight
() { }
158
167
void
addEdgeWeight
(
const
std::string&
id
,
168
SUMOReal
val,
SUMOReal
beg,
SUMOReal
end)
const
;
169
170
private
:
172
RONet
&
myNet
;
173
174
};
175
176
182
class
EdgeFloatTimeLineRetriever_EdgeTravelTime
:
public
SAXWeightsHandler::EdgeFloatTimeLineRetriever
{
183
public
:
185
EdgeFloatTimeLineRetriever_EdgeTravelTime
(
RONet
& net) :
myNet
(net) {}
186
188
~EdgeFloatTimeLineRetriever_EdgeTravelTime
() {}
189
198
void
addEdgeWeight
(
const
std::string&
id
,
199
SUMOReal
val,
SUMOReal
beg,
SUMOReal
end)
const
;
200
201
private
:
203
RONet
&
myNet
;
204
205
};
206
207
208
209
protected
:
210
ROTypedXMLRoutesLoader
*
buildNamedHandler
(
const
std::string& optionName,
211
const
std::string& file,
RONet
& net);
212
213
214
void
writeStats
(
SUMOTime
time,
SUMOTime
start,
int
absNo);
215
216
218
void
destroyHandlers
();
219
220
221
protected
:
223
OptionsCont
&
myOptions
;
224
226
typedef
std::vector<ROTypedXMLRoutesLoader*>
RouteLoaderCont
;
227
229
RouteLoaderCont
myHandler
;
230
232
bool
myEmptyDestinationsAllowed
;
233
234
235
private
:
237
ROLoader
(
const
ROLoader
& src);
238
240
ROLoader
&
operator=
(
const
ROLoader
& src);
241
243
bool
myLogSteps
;
244
};
245
246
247
#endif
248
249
/****************************************************************************/
250
build
buildd
sumo-0.16.0~dfsg
src
router
ROLoader.h
Generated on Tue Apr 16 2013 01:32:20 for SUMO - Simulation of Urban MObility by
1.8.3.1