Eclipse SUMO - Simulation of Urban MObility
MSSOTLHiLevelTrafficLightLogic.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2013-2019 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 /****************************************************************************/
15 /****************************************************************************/
17 
19  const std::string& id, const std::string& programID, const TrafficLightType logicType, const Phases& phases,
20  int step, SUMOTime delay,
21  const std::map<std::string, std::string>& parameters) :
22  MSSOTLTrafficLightLogic(tlcontrol, id, programID, logicType, phases, step, delay,
23  parameters) {
24  // Setting default values
25 
26 }
27 
29  const std::string& id, const std::string& programID, const TrafficLightType logicType, const Phases& phases,
30  int step, SUMOTime delay,
31  const std::map<std::string, std::string>& parameters,
32  MSSOTLSensors* sensors) :
33  MSSOTLTrafficLightLogic(tlcontrol, id, programID, logicType, phases, step, delay,
34  parameters, sensors) {
35  // Setting default values
36 
37 }
38 
40  for (int i = 0; i < (int)policies.size(); i++) {
41  delete (policies[i]);
42  }
43 }
44 
46  policies.push_back(policy);
47 }
48 
51 }
52 
54  currentPolicy = policy;
55 }
Builds detectors for microsim.
long long int SUMOTime
Definition: SUMOTime.h:35
void init(NLDetectorBuilder &nb)
Initialises the tls with sensors on incoming and outgoing lanes Sensors are built in the simulation a...
void init(NLDetectorBuilder &nb)
Initialises the tls.
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.
MSSOTLHiLevelTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &programID, const TrafficLightType logicType, const Phases &phases, int step, SUMOTime delay, const std::map< std::string, std::string > &parameters)
Constructor without sensors passed.
Class for a low-level policy.
Definition: MSSOTLPolicy.h:65
TrafficLightType