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
SUMOVehicleParameter.h
Go to the documentation of this file.
1
/****************************************************************************/
10
// Structure representing possible vehicle parameter
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
13
// Copyright (C) 2001-2012 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 SUMOVehicleParameter_h
24
#define SUMOVehicleParameter_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 <string>
37
#include "
SUMOVehicleClass.h
"
38
#include "
RGBColor.h
"
39
#include "
SUMOTime.h
"
40
41
42
// ===========================================================================
43
// class declarations
44
// ===========================================================================
45
class
OutputDevice
;
46
class
OptionsCont
;
47
48
// ===========================================================================
49
// value definitions
50
// ===========================================================================
51
const
int
VEHPARS_COLOR_SET
= 1;
52
const
int
VEHPARS_VTYPE_SET
= 2;
53
const
int
VEHPARS_DEPARTLANE_SET
= 2 << 2;
54
const
int
VEHPARS_DEPARTPOS_SET
= 2 << 3;
55
const
int
VEHPARS_DEPARTSPEED_SET
= 2 << 4;
56
const
int
VEHPARS_PERIODNUM_SET
= 2 << 5;
57
const
int
VEHPARS_PERIODFREQ_SET
= 2 << 6;
58
const
int
VEHPARS_ROUTE_SET
= 2 << 7;
59
const
int
VEHPARS_ARRIVALLANE_SET
= 2 << 8;
60
const
int
VEHPARS_ARRIVALPOS_SET
= 2 << 9;
61
const
int
VEHPARS_ARRIVALSPEED_SET
= 2 << 10;
62
const
int
VEHPARS_LINE_SET
= 2 << 11;
63
const
int
VEHPARS_TAZ_SET
= 2 << 12;
64
const
int
VEHPARS_FORCE_REROUTE
= 2 << 13;
65
66
const
int
STOP_INDEX_END
= -1;
67
const
int
STOP_INDEX_FIT
= -2;
68
69
70
// ===========================================================================
71
// enum definitions
72
// ===========================================================================
77
enum
DepartDefinition
{
79
DEPART_GIVEN
,
81
DEPART_TRIGGERED
,
83
DEPART_NOW
,
85
DEPART_DEF_MAX
86
};
87
88
93
enum
DepartLaneDefinition
{
95
DEPART_LANE_DEFAULT
,
97
DEPART_LANE_GIVEN
,
99
DEPART_LANE_RANDOM
,
101
DEPART_LANE_FREE
,
103
DEPART_LANE_ALLOWED_FREE
,
105
DEPART_LANE_BEST_FREE
,
107
DEPART_LANE_DEF_MAX
108
};
109
110
115
enum
DepartPosDefinition
{
117
DEPART_POS_DEFAULT
,
119
DEPART_POS_GIVEN
,
121
DEPART_POS_RANDOM
,
123
DEPART_POS_FREE
,
125
DEPART_POS_BASE
,
127
DEPART_POS_PWAG_SIMPLE
,
129
DEPART_POS_PWAG_GENERIC
,
131
DEPART_POS_MAX_SPEED_GAP
,
133
DEPART_POS_RANDOM_FREE
,
135
DEPART_POS_DEF_MAX
136
};
137
138
143
enum
DepartSpeedDefinition
{
145
DEPART_SPEED_DEFAULT
,
147
DEPART_SPEED_GIVEN
,
149
DEPART_SPEED_RANDOM
,
151
DEPART_SPEED_MAX
,
153
DEPART_SPEED_DEF_MAX
154
};
155
156
161
enum
ArrivalLaneDefinition
{
163
ARRIVAL_LANE_DEFAULT
,
165
ARRIVAL_LANE_GIVEN
,
167
ARRIVAL_LANE_CURRENT
,
169
ARRIVAL_LANE_DEF_MAX
170
};
171
172
177
enum
ArrivalPosDefinition
{
179
ARRIVAL_POS_DEFAULT
,
181
ARRIVAL_POS_GIVEN
,
183
ARRIVAL_POS_RANDOM
,
185
ARRIVAL_POS_MAX
,
187
ARRIVAL_POS_DEF_MAX
188
};
189
190
195
enum
ArrivalSpeedDefinition
{
197
ARRIVAL_SPEED_DEFAULT
,
199
ARRIVAL_SPEED_GIVEN
,
201
ARRIVAL_SPEED_CURRENT
,
203
ARRIVAL_SPEED_DEF_MAX
204
};
205
206
207
// ===========================================================================
208
// struct definitions
209
// ===========================================================================
220
class
SUMOVehicleParameter
{
221
public
:
226
SUMOVehicleParameter
() ;
227
228
233
bool
wasSet
(
int
what)
const
{
234
return
(
setParameter
& what) != 0;
235
}
236
237
245
void
writeAs
(
const
std::string& xmlElem,
OutputDevice
& dev,
246
const
OptionsCont
& oc)
const
;
247
248
254
bool
defaultOptionOverrides
(
const
OptionsCont
& oc,
const
std::string& optionName)
const
;
255
256
257
260
265
static
bool
departlaneValidate
(
const
std::string& val) ;
266
267
272
static
bool
departposValidate
(
const
std::string& val) ;
273
274
279
static
bool
departspeedValidate
(
const
std::string& val) ;
280
281
286
static
bool
arrivallaneValidate
(
const
std::string& val) ;
287
288
293
static
bool
arrivalposValidate
(
const
std::string& val) ;
294
295
300
static
bool
arrivalspeedValidate
(
const
std::string& val) ;
302
303
304
306
std::string
id
;
307
309
std::string
routeid
;
311
std::string
vtypeid
;
313
mutable
RGBColor
color
;
314
315
318
320
SUMOTime
depart
;
322
DepartDefinition
departProcedure
;
324
int
departLane
;
326
DepartLaneDefinition
departLaneProcedure
;
328
SUMOReal
departPos
;
330
DepartPosDefinition
departPosProcedure
;
332
SUMOReal
departSpeed
;
334
DepartSpeedDefinition
departSpeedProcedure
;
336
337
340
342
int
arrivalLane
;
344
ArrivalLaneDefinition
arrivalLaneProcedure
;
346
SUMOReal
arrivalPos
;
348
ArrivalPosDefinition
arrivalPosProcedure
;
350
SUMOReal
arrivalSpeed
;
352
ArrivalSpeedDefinition
arrivalSpeedProcedure
;
354
355
358
360
int
repetitionNumber
;
362
int
repetitionsDone
;
364
#ifdef HAVE_SUBSECOND_TIMESTEPS
365
SUMOTime
repetitionOffset
;
366
#else
367
SUMOReal
repetitionOffset
;
368
#endif
369
370
371
373
std::string
line
;
374
376
std::string
fromTaz
;
377
379
std::string
toTaz
;
380
384
struct
Stop
{
386
std::string
lane
;
388
std::string
busstop
;
390
SUMOReal
startPos
;
392
SUMOReal
endPos
;
394
SUMOTime
duration
;
396
SUMOTime
until
;
398
bool
triggered
;
400
bool
parking
;
402
int
index
;
403
};
404
406
std::vector<Stop>
stops
;
407
409
int
setParameter
;
410
411
};
412
413
#endif
414
415
/****************************************************************************/
416
var
build
temp
tmp.znCyBrHNjL
4.0-0-0
sumo
sumo-0.15.0~dfsg
src
utils
common
SUMOVehicleParameter.h
Generated on Mon Mar 24 2014 09:53:15 for SUMO - Simulation of Urban MObility by
1.8.1.2