SUMO - Simulation of Urban MObility
MSSOTLHiLevelTrafficLightLogic.cpp
Go to the documentation of this file.
1 /****************************************************************************/
7 /****************************************************************************/
8 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
9 // Copyright 2001-2013 DLR (http://www.dlr.de/) and contributors
10 /****************************************************************************/
11 //
12 // This file is part of SUMO.
13 // SUMO is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 /****************************************************************************/
20 
22  const std::string& id, const std::string& subid, const Phases& phases,
23  unsigned int step, SUMOTime delay,
24  const std::map<std::string, std::string>& parameters) :
25  MSSOTLTrafficLightLogic(tlcontrol, id, subid, phases, step, delay,
26  parameters) {
27  // Setting default values
28 
29 }
30 
32  const std::string& id, const std::string& subid, const Phases& phases,
33  unsigned int step, SUMOTime delay,
34  const std::map<std::string, std::string>& parameters,
35  MSSOTLSensors* sensors) :
36  MSSOTLTrafficLightLogic(tlcontrol, id, subid, phases, step, delay,
37  parameters, sensors) {
38  // Setting default values
39 
40 }
41 
43  for (unsigned int i = 0; i < policies.size(); i++) {
44  delete(policies[i]);
45  }
46 }
47 
49  policies.push_back(policy);
50 }
51 
54 }
55 
57  currentPolicy = policy;
58 }
Builds detectors for microsim.
long long int SUMOTime
Definition: SUMOTime.h:43
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, unsigned 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:72