SUMO - Simulation of Urban MObility
MSSOTLWaveTrafficLightLogic.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2010-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // The class for SOTL Platoon logics
19 /****************************************************************************/
20 #ifndef MSSOTLWaveTrafficLightLogic_h
21 #define MSSOTLWaveTrafficLightLogic_h
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
34 public:
45  const std::string& id, const std::string& subid,
46  const Phases& phases, int step, SUMOTime delay,
47  const std::map<std::string, std::string>& parameters) throw();
48 
59  const std::string& id, const std::string& subid,
60  const Phases& phases, int step, SUMOTime delay,
61  const std::map<std::string, std::string>& parameters,
62  MSSOTLSensors* sensors) throw();
63 
67  const std::string getLogicType() const {
68  return "waveTrafficLightLogic";
69  }
71 
72 protected:
73 
74  /*
75  * @brief Contains the logic to decide whether to release the green light
76  */
77  bool canRelease() throw();
78 
79 private:
80 
81  /*
82  * @brief Counts the vehicles on the green lanes of this phase
83  */
84  int countVehicles();
85 
86 };
87 
88 #endif
89 /****************************************************************************/
MSSOTLWaveTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &subid, const Phases &phases, int step, SUMOTime delay, const std::map< std::string, std::string > &parameters)
Constructor without sensors passed.
A class that stores and controls tls and switching of their programs.
A self-organizing traffic light logic.
const std::string getLogicType() const
Returns the type of the logic as a string.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
long long int SUMOTime
Definition: TraCIDefs.h:51