 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
18 #ifndef MSSOTLTrafficLightLogic_h
19 #define MSSOTLTrafficLightLogic_h
76 const std::map<std::string, std::string>& parameters);
93 const std::map<std::string, std::string>& parameters,
int getTargetPhaseMaxLastSelection()
SUMOTime trySwitch()
Switches to the next phase.
MSSOTLSensors * mySensors
A self-organizing traffic light logic.
MSSOTLE2Sensors * getCountSensors()
Return the sensors that count the passage of vehicles in and out of the tl.
void resetCTS(int phaseStep)
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter
void updateDecayThreshold()
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
const MSPhaseDefinition & getCurrentPhaseDef() const
Returns the definition of the current phase.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
double getSpeedThreshold()
MSSOTLE2Sensors * myCountSensors
virtual bool canRelease()=0
MSSOTLSensors * getSensors()
double getOutputSensorsLength()
bool isPushButtonPressed()
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
double getInputSensorsLength()
SUMOTime duration
The duration of the phase.
virtual SUMOTime computeReturnTime()
~MSSOTLTrafficLightLogic()
Destructor.
bool isDecayThresholdActivated()
virtual int decideNextPhase()
double getDecayConstant()
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.
int getPhaseIndexWithMaxCTS()
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
int countVehicles(MSPhaseDefinition phase)
std::map< int, SUMOTime > targetPhasesCTS
PhasePushButtons m_pushButtons
std::map< const std::string, std::vector< MSPushButton * > > PhasePushButtons
std::map< int, int > targetPhasesLastSelection
A class that stores and controls tls and switching of their programs.
std::map< int, SUMOTime > lastCheckForTargetPhase
The definition of a single phase of a tls logic.
void init(NLDetectorBuilder &nb)
Initialises the tls with sensors on incoming and outgoing lanes Sensors are built in the simulation a...
Builds detectors for microsim.
SUMOTime getCurrentPhaseElapsed()
A fixed traffic light logic.