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.dev/sumo
3 // Copyright (C) 2010-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
19 // The class for SOTL Platoon logics
20 /****************************************************************************/
21 #pragma once
22 #include <config.h>
23 
26 public:
37  const std::string& id, const std::string& programID,
38  const Phases& phases, int step, SUMOTime delay,
39  const Parameterised::Map& parameters);
40 
51  const std::string& id, const std::string& programID,
52  const Phases& phases, int step, SUMOTime delay,
53  const Parameterised::Map& parameters,
54  MSSOTLSensors* sensors);
55 
59  const std::string getLogicType() const {
60  return "waveTrafficLightLogic";
61  }
63 
64 protected:
65 
66  /*
67  * @brief Contains the logic to decide whether to release the green light
68  */
69  bool canRelease();
70 
71 private:
72 
73  /*
74  * @brief Counts the vehicles on the green lanes of this phase
75  */
76  int countVehicles();
77 
78 };
long long int SUMOTime
Definition: GUI.h:35
A self-organizing traffic light logic.
MSSOTLWaveTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &programID, const Phases &phases, int step, SUMOTime delay, const Parameterised::Map &parameters)
Constructor without sensors passed.
const std::string getLogicType() const
Returns the type of the logic as a string.
A class that stores and controls tls and switching of their programs.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
std::map< std::string, std::string > Map
parameters map
Definition: Parameterised.h:45