SUMO - Simulation of Urban MObility
MSDelayBasedTrafficLightLogic.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // An actuated traffic light logic based on time delay of approaching vehicles
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2002-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef MSDelayBasedTrafficLightLogic_h
21 #define MSDelayBasedTrafficLightLogic_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <map>
35 
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class NLDetectorBuilder;
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
51 public:
53 // typedef std::map<MSLane*, MSE2Collector*> LaneDetectorMap;
54  typedef std::map<MSLane*, MSDetectorFileOutput*> LaneDetectorMap;
55 
56 public:
67  const std::string& id, const std::string& programID,
69  int step, SUMOTime delay,
70  const std::map<std::string, std::string>& parameter,
71  const std::string& basePath);
72 
73 
78  void init(NLDetectorBuilder& nb);
79 
80 
83 
84 
85 
88 
95 
96 
97 protected:
100 
101 
110 
117 
118 protected:
120  LaneDetectorMap myLaneDetectors;
121 
124 
126  std::string myFile;
127 
130 
132  std::string myVehicleTypes;
133 };
134 
135 
136 #endif
137 
138 /****************************************************************************/
139 
Builds detectors for microsim.
long long int SUMOTime
Definition: SUMOTime.h:43
An actuated traffic light logic based on time delay of approaching vehicles.
SUMOTime checkForWaitingTime()
Checks for approaching vehicles on the lanes associated with green signals and returns the minimal ti...
SUMOTime trySwitch()
Switches to the next phase, if possible.
A fixed traffic light logic.
std::map< MSLane *, MSDetectorFileOutput * > LaneDetectorMap
Definition of a map from lanes to corresponding areal detectors.
A class that stores and controls tls and switching of their programs.
MSDelayBasedTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &programID, const MSSimpleTrafficLightLogic::Phases &phases, int step, SUMOTime delay, const std::map< std::string, std::string > &parameter, const std::string &basePath)
Constructor.
std::string myFile
The output file for generated detectors.
LaneDetectorMap myLaneDetectors
A map from lanes to the corresponding lane detectors.
SUMOTime proposeProlongation()
The returned, proposed prolongation for the green phase is oriented on the largest estimated passing ...
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
std::string myVehicleTypes
Whether detector output separates by vType.
void init(NLDetectorBuilder &nb)
Initializes the tls with information about incoming lanes.
bool myShowDetectors
Whether the detectors shall be shown in the GUI.
SUMOTime myFreq
The frequency for aggregating detector output.