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
/****************************************************************************/
10
// Loader for networks and route imports
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13
// Copyright (C) 2002-2014 DLR (http://www.dlr.de/) and contributors
14
/****************************************************************************/
15
//
16
// This file is part of SUMO.
17
// SUMO is free software: you can redistribute it and/or modify
18
// it under the terms of the GNU General Public License as published by
19
// the Free Software Foundation, either version 3 of the License, or
20
// (at your option) any later version.
21
//
22
/****************************************************************************/
23
#ifndef ROLoader_h
24
#define ROLoader_h
25
26
27
// ===========================================================================
28
// included modules
29
// ===========================================================================
30
#ifdef _MSC_VER
31
#include <
windows_config.h
>
32
#else
33
#include <
config.h
>
34
#endif
35
36
#include <
utils/common/SUMOTime.h
>
37
#include <
utils/common/SUMOAbstractRouter.h
>
38
#include <
utils/common/ValueTimeLine.h
>
39
#include <
utils/xml/SAXWeightsHandler.h
>
40
#include <
utils/xml/SUMORouteLoaderControl.h
>
41
42
43
// ===========================================================================
44
// class declarations
45
// ===========================================================================
46
class
OptionsCont
;
47
class
ROAbstractEdgeBuilder
;
48
class
RONet
;
49
class
ROVehicle
;
50
51
52
// ===========================================================================
53
// class definitions
54
// ===========================================================================
63
class
ROLoader
{
64
public
:
71
ROLoader
(
OptionsCont
& oc,
const
bool
emptyDestinationsAllowed,
const
bool
logSteps);
72
73
75
virtual
~ROLoader
();
76
78
virtual
void
loadNet
(
RONet
& toFill,
ROAbstractEdgeBuilder
& eb);
79
81
bool
loadWeights
(
RONet
& net,
const
std::string& optionName,
82
const
std::string& measure,
bool
useLanes);
83
85
void
openRoutes
(
RONet
& net);
86
88
void
processRoutes
(
SUMOTime
start,
SUMOTime
end,
89
RONet
& net,
SUMOAbstractRouter<ROEdge, ROVehicle>
& router);
90
91
#ifdef HAVE_INTERNAL // catchall for internal stuff
92
93
void
processAllRoutesWithBulkRouter(
SUMOTime
start,
SUMOTime
end,
94
RONet
& net,
SUMOAbstractRouter<ROEdge, ROVehicle>
& router);
95
#endif
96
97
protected
:
119
bool
openTypedRoutes
(
const
std::string& optionName,
RONet
& net);
120
121
127
class
EdgeFloatTimeLineRetriever_EdgeWeight
:
public
SAXWeightsHandler::EdgeFloatTimeLineRetriever
{
128
public
:
130
EdgeFloatTimeLineRetriever_EdgeWeight
(
RONet
& net) :
myNet
(net) {}
131
133
~EdgeFloatTimeLineRetriever_EdgeWeight
() { }
134
143
void
addEdgeWeight
(
const
std::string&
id
,
144
SUMOReal
val,
SUMOReal
beg,
SUMOReal
end)
const
;
145
146
private
:
148
RONet
&
myNet
;
149
150
};
151
152
158
class
EdgeFloatTimeLineRetriever_EdgeTravelTime
:
public
SAXWeightsHandler::EdgeFloatTimeLineRetriever
{
159
public
:
161
EdgeFloatTimeLineRetriever_EdgeTravelTime
(
RONet
& net) :
myNet
(net) {}
162
164
~EdgeFloatTimeLineRetriever_EdgeTravelTime
() {}
165
174
void
addEdgeWeight
(
const
std::string&
id
,
175
SUMOReal
val,
SUMOReal
beg,
SUMOReal
end)
const
;
176
177
private
:
179
RONet
&
myNet
;
180
181
};
182
183
184
185
protected
:
186
void
writeStats
(
SUMOTime
time,
SUMOTime
start,
int
absNo);
187
188
189
private
:
191
OptionsCont
&
myOptions
;
192
194
const
bool
myEmptyDestinationsAllowed
;
195
197
const
bool
myLogSteps
;
198
200
SUMORouteLoaderControl
myLoaders
;
201
202
203
private
:
205
ROLoader
(
const
ROLoader
& src);
206
208
ROLoader
&
operator=
(
const
ROLoader
& src);
209
};
210
211
212
#endif
213
214
/****************************************************************************/
215
tmp
buildd
sumo-0.21.0+dfsg
src
router
ROLoader.h
Generated on Thu Nov 20 2014 19:49:59 for SUMO - Simulation of Urban MObility by
1.8.1.2