SUMO - Simulation of Urban MObility
MSSOTLRequestTrafficLightLogic.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-2018 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 Request logics
17 /****************************************************************************/
18 #ifndef MSSOTLRequestTrafficLightLogic_h
19 #define MSSOTLRequestTrafficLightLogic_h
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
27 
29 public:
40  const std::string& id, const std::string& subid, const Phases& phases,
41  int step, SUMOTime delay,
42  const std::map<std::string, std::string>& parameters);
43 
54  const std::string& id, const std::string& subid, const Phases& phases,
55  int step, SUMOTime delay,
56  const std::map<std::string, std::string>& parameters,
57  MSSOTLSensors* sensors);
58 
60  return TplConvert::_2int(getParameter("MIN_DECISIONAL_PHASE_DUR", "5000").c_str());
61  }
62 protected:
63 
64  /*
65  * @brief Contains the logic to decide the phase change
66  */
67  bool canRelease();
68 };
69 
70 #endif
71 /****************************************************************************/
long long int SUMOTime
Definition: SUMOTime.h:36
MSSOTLRequestTrafficLightLogic(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.
static int _2int(const E *const data)
converts a char-type array into the integer value described by it
Definition: TplConvert.h:149
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.