The definition of a single phase of a tls logic.
SUMOTime duration
The duration of the phase.
A self-organizing traffic light logic.
std::map< int, SUMOTime > lastCheckForTargetPhase
void setStep(int step)
Forces a specific step.
~MSSOTLTrafficLightLogic()
Destructor.
int getPhaseIndexWithMaxCTS()
SUMOTime trySwitch()
Switches to the next phase.
MSSOTLE2Sensors * myCountSensors
MSSOTLE2Sensors * getCountSensors()
Return the sensors that count the passage of vehicles in and out of the tl.
double getOutputSensorsLength()
virtual bool canRelease()=0
std::map< const std::string, std::vector< MSPushButton * > > PhasePushButtons
double getDecayConstant()
double getSpeedThreshold()
int countVehicles(MSPhaseDefinition phase)
PhasePushButtons m_pushButtons
std::map< int, SUMOTime > targetPhasesCTS
virtual SUMOTime computeReturnTime()
std::map< int, int > targetPhasesLastSelection
void resetCTS(int phaseStep)
MSSOTLSensors * mySensors
void updateDecayThreshold()
bool isDecayThresholdActivated()
double getInputSensorsLength()
virtual int decideNextPhase()
MSSOTLSensors * getSensors()
int getTargetPhaseMaxLastSelection()
MSSOTLTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &programID, const TrafficLightType logicType, const Phases &phases, int step, SUMOTime delay, const Parameterised::Map ¶meters)
Constructor without sensors passed.
void init(NLDetectorBuilder &nb)
Initialises the tls with sensors on incoming and outgoing lanes Sensors are built in the simulation a...
SUMOTime getCurrentPhaseElapsed()
bool isPushButtonPressed()
A fixed traffic light logic.
virtual const std::string getParameter(const std::string &key, const std::string defaultValue="") const override
gets a parameter
const MSPhaseDefinition & getCurrentPhaseDef() const override
Returns the definition of the current phase.
A class that stores and controls tls and switching of their programs.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
Builds detectors for microsim.
std::map< std::string, std::string > Map
parameters map
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter