23 const std::string& programID,
const Phases& phases,
int step,
25 const std::map<std::string, std::string>& parameters) :
29 "*** Intersection " +
id 30 +
" will run using MSSOTLWaveTrafficLightLogic ***");
39 const std::string& programID,
const Phases& phases,
int step,
40 SUMOTime delay,
const std::map<std::string, std::string>& parameters,
43 parameters, sensors) {
87 if (state[i] !=
'r') {
MSSOTLSensors * getSensors()
const std::string & getState() const
Returns the state within this phase.
const LaneVectorVector & getLaneVectors() const
Returns the list of lists of all lanes controlled by this tls.
int getPhaseNumber() const
Returns the number of phases.
const std::string & getID() const
Returns the id.
MSSOTLWaveTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &programID, 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.
A self-organizing traffic light logic.
Phases myPhases
The list of phases this logic uses.
static MsgHandler * getMessageInstance()
Returns the instance to add normal messages to.
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()
const MSPhaseDefinition & getCurrentPhaseDef() const
Returns the definition of the current phase.
int getCurrentPhaseIndex() const
Returns the current index within the program.
virtual void inform(std::string msg, bool addType=true)
adds a new error to the list