Eclipse 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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // The class for SOTL Platoon logics
17 /****************************************************************************/
18 #ifndef MSSOTLWaveTrafficLightLogic_h
19 #define MSSOTLWaveTrafficLightLogic_h
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
28 public:
39  const std::string& id, const std::string& programID,
40  const Phases& phases, int step, SUMOTime delay,
41  const std::map<std::string, std::string>& parameters);
42 
53  const std::string& id, const std::string& programID,
54  const Phases& phases, int step, SUMOTime delay,
55  const std::map<std::string, std::string>& parameters,
56  MSSOTLSensors* sensors);
57 
61  const std::string getLogicType() const {
62  return "waveTrafficLightLogic";
63  }
65 
66 protected:
67 
68  /*
69  * @brief Contains the logic to decide whether to release the green light
70  */
71  bool canRelease();
72 
73 private:
74 
75  /*
76  * @brief Counts the vehicles on the green lanes of this phase
77  */
78  int countVehicles();
79 
80 };
81 
82 #endif
83 /****************************************************************************/
MSSOTLTrafficLightLogic
A self-organizing traffic light logic.
Definition: MSSOTLTrafficLightLogic.h:59
MSSOTLWaveTrafficLightLogic::countVehicles
int countVehicles()
Definition: MSSOTLWaveTrafficLightLogic.cpp:78
MSSOTLWaveTrafficLightLogic::MSSOTLWaveTrafficLightLogic
MSSOTLWaveTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &programID, const Phases &phases, int step, SUMOTime delay, const std::map< std::string, std::string > &parameters)
Constructor without sensors passed.
Definition: MSSOTLWaveTrafficLightLogic.cpp:21
MSSOTLWaveTrafficLightLogic
Definition: MSSOTLWaveTrafficLightLogic.h:27
MSTrafficLightLogic::Phases
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
Definition: MSTrafficLightLogic.h:62
MSSOTLWaveTrafficLightLogic::canRelease
bool canRelease()
Definition: MSSOTLWaveTrafficLightLogic.cpp:50
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
MSSOTLTrafficLightLogic.h
MSSOTLWaveTrafficLightLogic::getLogicType
const std::string getLogicType() const
Returns the type of the logic as a string.
Definition: MSSOTLWaveTrafficLightLogic.h:61
MSSOTLSensors
Definition: MSSOTLSensors.h:33
config.h
MSTLLogicControl
A class that stores and controls tls and switching of their programs.
Definition: MSTLLogicControl.h:60