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-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 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 <
utils/common/SUMOTime.h
>
36
#include <
utils/common/SUMOAbstractRouter.h
>
37
#include <
utils/common/ValueTimeLine.h
>
38
#include <
utils/xml/SAXWeightsHandler.h
>
39
#include <
utils/xml/SUMORouteLoaderControl.h
>
40
41
42
// ===========================================================================
43
// class declarations
44
// ===========================================================================
45
class
OptionsCont
;
46
class
ROAbstractEdgeBuilder
;
47
class
RONet
;
48
class
ROVehicle
;
49
50
51
// ===========================================================================
52
// class definitions
53
// ===========================================================================
62
class
ROLoader
{
63
public
:
70
ROLoader
(
OptionsCont
& oc,
const
bool
emptyDestinationsAllowed,
const
bool
logSteps);
71
72
74
virtual
~ROLoader
();
75
77
virtual
void
loadNet
(
RONet
& toFill,
ROAbstractEdgeBuilder
& eb);
78
80
bool
loadWeights
(
RONet
& net,
const
std::string& optionName,
81
const
std::string& measure,
bool
useLanes);
82
84
void
openRoutes
(
RONet
& net);
85
87
void
processRoutes
(
SUMOTime
start,
SUMOTime
end,
88
RONet
& net,
SUMOAbstractRouter<ROEdge, ROVehicle>
& router);
89
90
#ifdef HAVE_INTERNAL // catchall for internal stuff
91
92
void
processAllRoutesWithBulkRouter(
SUMOTime
start,
SUMOTime
end,
93
RONet
& net,
SUMOAbstractRouter<ROEdge, ROVehicle>
& router);
94
#endif
95
96
protected
:
118
bool
openTypedRoutes
(
const
std::string& optionName,
RONet
& net);
119
120
126
class
EdgeFloatTimeLineRetriever_EdgeWeight
:
public
SAXWeightsHandler::EdgeFloatTimeLineRetriever
{
127
public
:
129
EdgeFloatTimeLineRetriever_EdgeWeight
(
RONet
& net) :
myNet
(net) {}
130
132
~EdgeFloatTimeLineRetriever_EdgeWeight
() { }
133
142
void
addEdgeWeight
(
const
std::string&
id
,
143
SUMOReal
val,
SUMOReal
beg,
SUMOReal
end)
const
;
144
145
private
:
147
RONet
&
myNet
;
148
149
};
150
151
157
class
EdgeFloatTimeLineRetriever_EdgeTravelTime
:
public
SAXWeightsHandler::EdgeFloatTimeLineRetriever
{
158
public
:
160
EdgeFloatTimeLineRetriever_EdgeTravelTime
(
RONet
& net) :
myNet
(net) {}
161
163
~EdgeFloatTimeLineRetriever_EdgeTravelTime
() {}
164
173
void
addEdgeWeight
(
const
std::string&
id
,
174
SUMOReal
val,
SUMOReal
beg,
SUMOReal
end)
const
;
175
176
private
:
178
RONet
&
myNet
;
179
180
};
181
182
183
184
protected
:
185
void
writeStats
(
SUMOTime
time,
SUMOTime
start,
int
absNo);
186
187
188
protected
:
190
OptionsCont
&
myOptions
;
191
193
SUMORouteLoaderControl
myLoaders
;
194
196
bool
myEmptyDestinationsAllowed
;
197
198
199
private
:
201
ROLoader
(
const
ROLoader
& src);
202
204
ROLoader
&
operator=
(
const
ROLoader
& src);
205
207
bool
myLogSteps
;
208
};
209
210
211
#endif
212
213
/****************************************************************************/
214
home
gladk
tmp
05
sumo-0.17.1~dfsg
src
router
ROLoader.h
Generated on Sun Jun 16 2013 07:08:28 for SUMO - Simulation of Urban MObility by
1.8.1.2