25 const std::string& subid,
const Phases& phases,
int step,
27 const std::map<std::string, std::string>& parameters)
throw() :
31 "*** Intersection " +
id 32 +
" will run using MSSOTLWaveTrafficLightLogic ***");
34 for (
int i = 0; i < getPhaseNumber(); i++) {
35 (*myPhases[i]).lastDuration = (*myPhases[i]).duration;
41 const std::string& subid,
const Phases& phases,
int step,
42 SUMOTime delay,
const std::map<std::string, std::string>& parameters,
45 parameters, sensors) {
47 for (
int i = 0; i < getPhaseNumber(); i++) {
48 (*myPhases[i]).lastDuration = (*myPhases[i]).duration;
89 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.
const std::string & getID() const
Returns the id.
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.
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.
void inform(std::string msg, bool addType=true)
adds a new error to the list