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
MSActuatedTrafficLightLogic.h
Go to the documentation of this file.
1
/****************************************************************************/
8
// An actuated (adaptive) traffic light logic
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11
// Copyright (C) 2001-2012 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 MSActuatedTrafficLightLogic_h
22
#define MSActuatedTrafficLightLogic_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 <utility>
35
#include <vector>
36
#include <bitset>
37
#include <map>
38
#include <
microsim/MSEventControl.h
>
39
#include <
microsim/traffic_lights/MSTrafficLightLogic.h
>
40
#include "
MSSimpleTrafficLightLogic.h
"
41
#include <
microsim/output/MSInductLoop.h
>
42
43
44
// ===========================================================================
45
// class declarations
46
// ===========================================================================
47
class
NLDetectorBuilder
;
48
49
50
// ===========================================================================
51
// class definitions
52
// ===========================================================================
57
class
MSActuatedTrafficLightLogic
:
58
public
MSSimpleTrafficLightLogic
{
59
public
:
61
typedef
std::map<MSLane*, MSInductLoop*>
InductLoopMap
;
62
63
public
:
73
MSActuatedTrafficLightLogic
(
MSTLLogicControl
& tlcontrol,
74
const
std::string&
id
,
const
std::string& programID,
75
const
MSSimpleTrafficLightLogic::Phases
& phases,
76
unsigned
int
step,
SUMOTime
delay,
77
const
std::map<std::string, std::string>& parameter);
78
79
84
void
init
(
NLDetectorBuilder
& nb);
85
86
88
~MSActuatedTrafficLightLogic
();
89
90
91
94
100
SUMOTime
trySwitch
(
bool
isActive);
102
103
104
protected
:
107
111
SUMOTime
duration
()
const
;
112
113
116
void
gapControl
();
118
119
120
protected
:
122
InductLoopMap
myInductLoops
;
123
125
bool
myContinue
;
126
128
SUMOReal
myMaxGap
;
129
131
SUMOReal
myPassingTime
;
132
134
SUMOReal
myDetectorGap
;
135
136
};
137
138
139
#endif
140
141
/****************************************************************************/
142
build
buildd
sumo-0.16.0~dfsg
src
microsim
traffic_lights
MSActuatedTrafficLightLogic.h
Generated on Tue Apr 16 2013 01:32:17 for SUMO - Simulation of Urban MObility by
1.8.3.1