SUMO - Simulation of Urban MObility
MSSOTLRequestTrafficLightLogic.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // The class for SOTL Request 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 MSSOTLRequestTrafficLightLogic_h
22 #define MSSOTLRequestTrafficLightLogic_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 
34 
36 public:
47  const std::string& id, const std::string& subid, const Phases& phases,
48  unsigned int step, SUMOTime delay,
49  const std::map<std::string, std::string>& parameters) throw();
50 
61  const std::string& id, const std::string& subid, const Phases& phases,
62  unsigned int step, SUMOTime delay,
63  const std::map<std::string, std::string>& parameters,
64  MSSOTLSensors* sensors) throw();
65 
67  return TplConvert::_2int(getParameter("MIN_DECISIONAL_PHASE_DUR", "5000").c_str());
68  }
69 protected:
70 
71  /*
72  * @brief Contains the logic to decide the phase change
73  */
74  bool canRelease() throw();
75 };
76 
77 #endif
78 /****************************************************************************/
long long int SUMOTime
Definition: SUMOTime.h:43
const std::string & getParameter(const std::string &key, const std::string &defaultValue) const
Returns the value for a given key.
A class that stores and controls tls and switching of their programs.
A self-organizing traffic light logic.
MSSOTLRequestTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &subid, const Phases &phases, unsigned int step, SUMOTime delay, const std::map< std::string, std::string > &parameters)
Constructor without sensors passed.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
static int _2int(const E *const data)
Definition: TplConvert.h:114