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
MSInstantInductLoop.h
Go to the documentation of this file.
1
/****************************************************************************/
8
// An instantaneous induction loop
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11
// Copyright (C) 2011-2014 DLR (http://www.dlr.de/) and contributors
12
/****************************************************************************/
13
//
14
// This file is part of SUMO.
15
// SUMO is free software: you can redistribute it and/or modify
16
// it under the terms of the GNU General Public License as published by
17
// the Free Software Foundation, either version 3 of the License, or
18
// (at your option) any later version.
19
//
20
/****************************************************************************/
21
#ifndef MSInstantInductLoop_h
22
#define MSInstantInductLoop_h
23
24
25
// ===========================================================================
26
// included modules
27
// ===========================================================================
28
#ifdef _MSC_VER
29
#include <
windows_config.h
>
30
#else
31
#include <
config.h
>
32
#endif
33
34
#include <string>
35
#include <deque>
36
#include <map>
37
#include <functional>
38
#include <
microsim/MSMoveReminder.h
>
39
#include <
microsim/output/MSDetectorFileOutput.h
>
40
41
42
// ===========================================================================
43
// class declarations
44
// ===========================================================================
45
class
MSLane
;
46
class
MSVehicle
;
47
class
OutputDevice
;
48
49
50
// ===========================================================================
51
// class definitions
52
// ===========================================================================
60
class
MSInstantInductLoop
61
:
public
MSMoveReminder
,
public
MSDetectorFileOutput
{
62
public
:
71
MSInstantInductLoop
(
const
std::string&
id
,
OutputDevice
& od,
72
MSLane
*
const
lane,
SUMOReal
positionInMeters);
73
74
76
~MSInstantInductLoop
();
77
78
79
82
99
bool
notifyMove
(
SUMOVehicle
& veh,
SUMOReal
oldPos,
SUMOReal
newPos,
SUMOReal
newSpeed);
100
101
116
bool
notifyLeave
(
SUMOVehicle
& veh,
SUMOReal
lastPos,
MSMoveReminder::Notification
reason);
118
119
120
130
void
writeXMLOutput
(
OutputDevice
& dev,
131
SUMOTime
startTime,
SUMOTime
stopTime) {
132
UNUSED_PARAMETER
(dev);
133
UNUSED_PARAMETER
(startTime);
134
UNUSED_PARAMETER
(stopTime);
135
}
136
137
146
void
writeXMLDetectorProlog
(
OutputDevice
& dev)
const
;
147
148
149
protected
:
158
void
write
(
const
char
* state,
SUMOReal
t,
SUMOVehicle
& veh,
SUMOReal
speed,
const
char
* add = 0,
SUMOReal
addValue = -1);
159
160
161
protected
:
163
OutputDevice
&
myOutputDevice
;
164
166
const
SUMOReal
myPosition
;
167
169
SUMOReal
myLastExitTime
;
170
172
std::map<SUMOVehicle*, SUMOReal>
myEntryTimes
;
173
174
private
:
176
MSInstantInductLoop
(
const
MSInstantInductLoop
&);
177
179
MSInstantInductLoop
&
operator=
(
const
MSInstantInductLoop
&);
180
181
182
};
183
184
185
#endif
186
187
/****************************************************************************/
188
tmp
buildd
sumo-0.21.0+dfsg
src
microsim
output
MSInstantInductLoop.h
Generated on Thu Nov 20 2014 19:49:55 for SUMO - Simulation of Urban MObility by
1.8.1.2