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
MSCFModel_KraussOrig1.h
Go to the documentation of this file.
1
/****************************************************************************/
10
// The original Krauss (1998) car-following model and parameter
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13
// Copyright (C) 2001-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 MSCFModel_KraussOrig1_h
24
#define MSCFModel_KraussOrig1_h
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 "
MSCFModel.h
"
36
#include <
utils/xml/SUMOXMLDefinitions.h
>
37
38
39
// ===========================================================================
40
// class definitions
41
// ===========================================================================
46
class
MSCFModel_KraussOrig1
:
public
MSCFModel
{
47
public
:
54
MSCFModel_KraussOrig1
(
const
MSVehicleType
* vtype,
SUMOReal
accel,
SUMOReal
decel,
SUMOReal
dawdle
,
SUMOReal
headwayTime);
55
56
58
~MSCFModel_KraussOrig1
();
59
60
63
69
SUMOReal
moveHelper
(
MSVehicle
*
const
veh,
SUMOReal
vPos)
const
;
70
71
80
virtual
SUMOReal
followSpeed
(
const
MSVehicle
*
const
veh,
SUMOReal
speed,
SUMOReal
gap2pred,
SUMOReal
predSpeed,
SUMOReal
predMaxDecel)
const
;
81
82
90
virtual
SUMOReal
stopSpeed
(
const
MSVehicle
*
const
veh,
const
SUMOReal
speed,
SUMOReal
gap2pred)
const
;
91
92
97
virtual
int
getModelID
()
const
{
98
return
SUMO_TAG_CF_KRAUSS_ORIG1
;
99
}
100
101
105
SUMOReal
getImperfection
()
const
{
106
return
myDawdle
;
107
}
109
110
111
114
117
void
setMaxDecel
(
SUMOReal
decel) {
118
myDecel
= decel;
119
myTauDecel
=
myDecel
*
myHeadwayTime
;
120
}
121
122
126
void
setImperfection
(
SUMOReal
imperfection) {
127
myDawdle
= imperfection;
128
}
129
130
134
void
setHeadwayTime
(
SUMOReal
headwayTime) {
135
myHeadwayTime
= headwayTime;
136
myTauDecel
=
myDecel
* headwayTime;
137
}
139
140
145
virtual
MSCFModel
*
duplicate
(
const
MSVehicleType
* vtype)
const
;
146
147
private
:
153
virtual
SUMOReal
_vsafe
(
SUMOReal
gap,
SUMOReal
predSpeed)
const
;
154
155
160
virtual
SUMOReal
dawdle
(
SUMOReal
speed)
const
;
161
162
protected
:
164
SUMOReal
myDawdle
;
165
167
SUMOReal
myTauDecel
;
168
};
169
170
#endif
/* MSCFModel_KraussOrig1_H */
171
tmp
buildd
sumo-0.21.0+dfsg
src
microsim
cfmodels
MSCFModel_KraussOrig1.h
Generated on Thu Nov 20 2014 19:49:54 for SUMO - Simulation of Urban MObility by
1.8.1.2