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