26 const std::string& subid,
const Phases& phases,
int step,
28 const std::map<std::string, std::string>& parameters)
throw() :
32 "*** Intersection " +
id 33 +
" will run using MSSOTLWaveTrafficLightLogic ***");
35 for (
int i = 0; i < getPhaseNumber(); i++) {
36 (*myPhases[i]).lastDuration = (*myPhases[i]).duration;
42 const std::string& subid,
const Phases& phases,
int step,
43 SUMOTime delay,
const std::map<std::string, std::string>& parameters,
46 parameters, sensors) {
48 for (
int i = 0; i < getPhaseNumber(); i++) {
49 (*myPhases[i]).lastDuration = (*myPhases[i]).duration;
90 if (state[i] !=
'r') {
MSSOTLSensors * getSensors()
const std::string & getState() const
Returns the state within this phase.
MSSOTLWaveTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &subid, const Phases &phases, int step, SUMOTime delay, const std::map< std::string, std::string > ¶meters)
Constructor without sensors passed.
A class that stores and controls tls and switching of their programs.
const std::string & getID() const
Returns the id.
A self-organizing traffic light logic.
int getCurrentPhaseIndex() const
Returns the current index within the program.
Phases myPhases
The list of phases this logic uses.
static MsgHandler * getMessageInstance()
Returns the instance to add normal messages to.
const LaneVectorVector & getLaneVectors() const
Returns the list of lists of all lanes controlled by this tls.
virtual int countVehicles(MSLane *lane)=0
SUMOTime lastDuration
The previous duration of the phase.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
SUMOTime getCurrentPhaseElapsed()
void inform(std::string msg, bool addType=true)
adds a new error to the list
const MSPhaseDefinition & getCurrentPhaseDef() const
Returns the definition of the current phase.