SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSSOTLWaveTrafficLightLogic.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // The class for SOTL Platoon logics
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright 2001-2009 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 MSSOTLWaveTrafficLightLogic_h
22 #define MSSOTLWaveTrafficLightLogic_h
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
35 public:
46  const std::string& id, const std::string& subid,
47  const Phases& phases, int step, SUMOTime delay,
48  const std::map<std::string, std::string>& parameters) throw();
49 
60  const std::string& id, const std::string& subid,
61  const Phases& phases, int step, SUMOTime delay,
62  const std::map<std::string, std::string>& parameters,
63  MSSOTLSensors* sensors) throw();
64 
68  const std::string getLogicType() const {
69  return "waveTrafficLightLogic";
70  }
72 
73 protected:
74 
75  /*
76  * @brief Contains the logic to decide whether to release the green light
77  */
78  bool canRelease() throw();
79 
80 private:
81 
82  /*
83  * @brief Counts the vehicles on the green lanes of this phase
84  */
85  int countVehicles();
86 
87 };
88 
89 #endif
90 /****************************************************************************/
const std::string getLogicType() const
Returns the type of the logic as a string.
long long int SUMOTime
Definition: SUMOTime.h:43
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.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.