SUMO - Simulation of Urban MObility
MSSOTLRequestTrafficLightLogic.cpp
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 
20 
22  MSTLLogicControl& tlcontrol, const std::string& id, const std::string& subid,
23  const Phases& phases, int step, SUMOTime delay,
24  const std::map<std::string, std::string>& parameters) :
25  MSSOTLTrafficLightLogic(tlcontrol, id, subid, phases, step, delay,
26  parameters) {
28  "*** Intersection " + id
29  + " will run using MSSOTLRequestTrafficLightLogic ---");
30 }
31 
33  MSTLLogicControl& tlcontrol, const std::string& id, const std::string& subid,
34  const Phases& phases, int step, SUMOTime delay,
35  const std::map<std::string, std::string>& parameters,
36  MSSOTLSensors* sensors) :
37  MSSOTLTrafficLightLogic(tlcontrol, id, subid, phases, step, delay,
38  parameters, sensors) {
40  "*** Intersection " + id
41  + " will run using MSSOTLRequestTrafficLightLogic ***");
42 }
43 
46  return isThresholdPassed();
47  }
48  return false;
49 }
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.
static MsgHandler * getMessageInstance()
Returns the instance to add normal messages to.
Definition: MsgHandler.cpp:58
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
void inform(std::string msg, bool addType=true)
adds a new error to the list
Definition: MsgHandler.cpp:113