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
RORDGenerator_ODAmounts.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Class for loading trip amount definitions and route generation
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 RORDGenerator_ODAmounts_h
23
#define RORDGenerator_ODAmounts_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 <set>
37
#include <
utils/options/OptionsCont.h
>
38
#include <
utils/common/IDSupplier.h
>
39
#include <
utils/xml/SUMOXMLDefinitions.h
>
40
#include "
RORDLoader_TripDefs.h
"
41
#include "
RONet.h
"
42
#include <
utils/common/SUMOTime.h
>
43
44
45
// ===========================================================================
46
// class declarations
47
// ===========================================================================
48
class
RORouteDef_OrigDest;
49
50
51
// ===========================================================================
52
// class definitions
53
// ===========================================================================
60
class
RORDGenerator_ODAmounts
:
public
RORDLoader_TripDefs
{
61
public
:
63
RORDGenerator_ODAmounts
(
RONet
& net,
64
SUMOTime
begin,
SUMOTime
end,
bool
emptyDestinationsAllowed,
65
bool
randomize,
const
std::string& file =
""
);
66
68
~RORDGenerator_ODAmounts
();
69
70
78
bool
readRoutesAtLeastUntil
(
SUMOTime
until);
79
80
81
protected
:
83
84
92
void
myStartElement
(
int
element,
93
const
SUMOSAXAttributes
& attrs);
94
95
102
void
myEndElement
(
int
element);
104
106
void
parseFlowAmountDef
(
const
SUMOSAXAttributes
& attrs);
107
109
void
myEndFlowAmountDef
();
110
115
class
FlowDef
{
116
public
:
118
FlowDef
(
ROVehicle
* vehicle,
SUMOVTypeParameter
* type,
RORouteDef
* route,
119
SUMOTime
intBegin,
SUMOTime
intEnd,
120
unsigned
int
vehicles2insert,
bool
randomize);
121
123
~FlowDef
();
124
126
bool
applicableForTime
(
SUMOTime
time)
const
;
127
129
void
addRoutes
(
RONet
& net,
SUMOTime
time);
130
132
void
addSingleRoute
(
RONet
& net,
SUMOTime
time);
133
135
SUMOTime
getIntervalEnd
()
const
;
136
137
private
:
139
const
ROVehicle
*
const
myVehicle
;
140
142
const
SUMOVTypeParameter
*
const
myVehicleType
;
143
145
const
RORouteDef
*
const
myRoute
;
146
148
const
SUMOTime
myIntervalBegin
;
149
151
const
SUMOTime
myIntervalEnd
;
152
154
const
unsigned
int
myVehicle2InsertNumber
;
155
157
unsigned
int
myInserted
;
158
160
std::vector<SUMOTime>
myDepartures
;
161
163
bool
myRandom
;
164
165
private
:
167
FlowDef
&
operator=
(
const
FlowDef
& s);
168
169
};
170
171
private
:
173
void
buildForTimeStep
(
SUMOTime
time);
174
175
private
:
177
SUMOTime
myIntervalBegin
;
178
180
SUMOTime
myIntervalEnd
;
181
183
SUMOTime
myUpperIntervalBegin
;
184
186
SUMOTime
myUpperIntervalEnd
;
187
189
unsigned
int
myVehicle2InsertNumber
;
190
192
SUMOTime
myCurrentTimeStep
;
193
195
typedef
std::vector<FlowDef*>
FlowDefV
;
196
198
FlowDefV
myFlows
;
199
201
std::set<std::string>
myKnownIDs
;
202
204
bool
myRandom
;
205
206
207
private
:
209
RORDGenerator_ODAmounts
(
const
RORDGenerator_ODAmounts
& src);
210
212
RORDGenerator_ODAmounts
&
operator=
(
const
RORDGenerator_ODAmounts
& src);
213
214
};
215
216
217
#endif
218
219
/****************************************************************************/
220
build
buildd
sumo-0.16.0~dfsg
src
router
RORDGenerator_ODAmounts.h
Generated on Tue Apr 16 2013 01:32:20 for SUMO - Simulation of Urban MObility by
1.8.3.1