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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 /****************************************************************************/
19 
21  const std::string& id, const std::string& subid, const Phases& phases,
22  int step, SUMOTime delay,
23  const std::map<std::string, std::string>& parameters) :
24  MSSOTLTrafficLightLogic(tlcontrol, id, subid, phases, step, delay,
25  parameters) {
26  // Setting default values
27 
28 }
29 
31  const std::string& id, const std::string& subid, const Phases& phases,
32  int step, SUMOTime delay,
33  const std::map<std::string, std::string>& parameters,
34  MSSOTLSensors* sensors) :
35  MSSOTLTrafficLightLogic(tlcontrol, id, subid, phases, step, delay,
36  parameters, sensors) {
37  // Setting default values
38 
39 }
40 
42  for (int i = 0; i < (int)policies.size(); i++) {
43  delete(policies[i]);
44  }
45 }
46 
48  policies.push_back(policy);
49 }
50 
53 }
54 
56  currentPolicy = policy;
57 }
Builds detectors for microsim.
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 &subid, 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:71
long long int SUMOTime
Definition: TraCIDefs.h:51