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
SUMOVTypeParameter.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Structure representing possible vehicle parameter
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 SUMOVTypeParameter_h
23
#define SUMOVTypeParameter_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 <map>
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
// ===========================================================================
50
// value definitions
51
// ===========================================================================
52
const
int
VTYPEPARS_LENGTH_SET
= 1;
53
const
int
VTYPEPARS_MINGAP_SET
= 2;
54
const
int
VTYPEPARS_MAXSPEED_SET
= 2 << 2;
55
const
int
VTYPEPARS_PROBABILITY_SET
= 2 << 3;
56
const
int
VTYPEPARS_SPEEDFACTOR_SET
= 2 << 4;
57
const
int
VTYPEPARS_SPEEDDEVIATION_SET
= 2 << 5;
58
const
int
VTYPEPARS_EMISSIONCLASS_SET
= 2 << 6;
59
const
int
VTYPEPARS_COLOR_SET
= 2 << 7;
60
const
int
VTYPEPARS_VEHICLECLASS_SET
= 2 << 8;
61
const
int
VTYPEPARS_WIDTH_SET
= 2 << 9;
62
const
int
VTYPEPARS_HEIGHT_SET
= 2 << 10;
63
const
int
VTYPEPARS_SHAPE_SET
= 2 << 11;
64
const
int
VTYPEPARS_OSGFILE_SET
= 2 << 12;
65
66
67
// ===========================================================================
68
// struct definitions
69
// ===========================================================================
74
class
SUMOVTypeParameter
{
75
public
:
80
SUMOVTypeParameter
() ;
81
82
87
bool
wasSet
(
int
what)
const
{
88
return
(
setParameter
& what) != 0;
89
}
90
91
97
void
write
(
OutputDevice
& dev)
const
;
98
101
void
validateCFParameter
()
const
;
102
103
109
SUMOReal
get
(
const
SumoXMLAttr
attr,
const
SUMOReal
defaultValue)
const
;
110
111
113
std::string
id
;
114
116
SUMOReal
length
;
118
SUMOReal
minGap
;
120
SUMOReal
maxSpeed
;
122
SUMOReal
defaultProbability
;
124
SUMOReal
speedFactor
;
126
SUMOReal
speedDev
;
128
SUMOEmissionClass
emissionClass
;
130
RGBColor
color
;
132
SUMOVehicleClass
vehicleClass
;
133
134
137
139
SUMOReal
width
;
140
142
SUMOReal
height
;
143
145
SUMOVehicleShape
shape
;
146
148
std::string
osgFile
;
150
151
153
SumoXMLTag
cfModel
;
154
156
typedef
std::map<SumoXMLAttr, SUMOReal>
CFParams
;
157
CFParams
cfParameter
;
158
160
std::string
lcModel
;
161
163
int
setParameter
;
164
165
167
mutable
bool
saved
;
168
170
mutable
bool
onlyReferenced
;
171
172
};
173
174
#endif
175
176
/****************************************************************************/
177
build
buildd
sumo-0.15.0~dfsg
src
utils
common
SUMOVTypeParameter.h
Generated on Wed Jul 18 2012 22:58:36 for SUMO - Simulation of Urban MObility by
1.8.1.1