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 definitions
47
// ===========================================================================
54
class
RORDGenerator_ODAmounts
:
public
RORDLoader_TripDefs
{
55
public
:
57
RORDGenerator_ODAmounts
(
RONet
& net,
58
SUMOTime
begin,
SUMOTime
end,
bool
emptyDestinationsAllowed,
59
bool
randomize,
const
std::string& file =
""
) ;
60
62
~RORDGenerator_ODAmounts
() ;
63
64
72
bool
readRoutesAtLeastUntil
(
SUMOTime
until);
73
74
75
protected
:
77
78
86
void
myStartElement
(
int
element,
87
const
SUMOSAXAttributes
& attrs) ;
88
89
96
void
myEndElement
(
int
element) ;
98
100
void
parseFlowAmountDef
(
const
SUMOSAXAttributes
& attrs) ;
101
103
void
myEndFlowAmountDef
();
104
109
class
FlowDef
{
110
public
:
112
FlowDef
(
ROVehicle
* vehicle,
SUMOVTypeParameter
* type,
RORouteDef
* route,
113
SUMOTime
intBegin,
SUMOTime
intEnd,
114
unsigned
int
vehicles2insert,
bool
randomize);
115
117
~FlowDef
();
118
120
bool
applicableForTime
(
SUMOTime
time)
const
;
121
123
void
addRoutes
(
RONet
& net,
SUMOTime
time);
124
126
void
addSingleRoute
(
RONet
& net,
SUMOTime
time);
127
129
SUMOTime
getIntervalEnd
()
const
;
130
131
private
:
133
ROVehicle
*
myVehicle
;
134
136
SUMOVTypeParameter
*
myVehicleType
;
137
139
RORouteDef
*
myRoute
;
140
142
SUMOTime
myIntervalBegin
;
143
145
SUMOTime
myIntervalEnd
;
146
148
unsigned
int
myVehicle2InsertNumber
;
149
151
unsigned
int
myInserted
;
152
154
std::vector<SUMOTime>
myDepartures
;
155
157
bool
myRandom
;
158
159
};
160
161
private
:
163
void
buildForTimeStep
(
SUMOTime
time) ;
164
165
private
:
167
SUMOTime
myIntervalBegin
;
168
170
SUMOTime
myIntervalEnd
;
171
173
SUMOTime
myUpperIntervalBegin
;
174
176
SUMOTime
myUpperIntervalEnd
;
177
179
unsigned
int
myVehicle2InsertNumber
;
180
182
SUMOTime
myCurrentTimeStep
;
183
185
typedef
std::vector<FlowDef*>
FlowDefV
;
186
188
FlowDefV
myFlows
;
189
191
std::set<std::string>
myKnownIDs
;
192
194
bool
myRandom
;
195
196
197
bool
myHaveWarnedAboutDeprecatedNumber
;
198
199
private
:
201
RORDGenerator_ODAmounts
(
const
RORDGenerator_ODAmounts
& src);
202
204
RORDGenerator_ODAmounts
&
operator=
(
const
RORDGenerator_ODAmounts
& src);
205
206
};
207
208
209
#endif
210
211
/****************************************************************************/
212
var
build
temp
tmp.znCyBrHNjL
4.0-0-0
sumo
sumo-0.15.0~dfsg
src
router
RORDGenerator_ODAmounts.h
Generated on Mon Mar 24 2014 09:53:14 for SUMO - Simulation of Urban MObility by
1.8.1.2