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