21 #ifndef MSSOTLTrafficLightLogic_h 22 #define MSSOTLTrafficLightLogic_h 80 const std::string& subid,
const Phases& phases,
int step,
82 const std::map<std::string, std::string>& parameters);
96 const std::string& subid,
const Phases& phases,
int step,
98 const std::map<std::string, std::string>& parameters,
232 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...
static bool _2bool(const E *const data)
converts a 0-terminated char-type array into the boolean value described by it
std::map< const std::string, std::vector< MSPushButton * > > PhasePushButtons
void resetCTS(int phaseStep)
std::map< int, SUMOTime > lastCheckForTargetPhase
bool isDecayThresholdActivated()
virtual int decideNextPhase()
int getPhaseIndexWithMaxCTS()
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.
std::map< int, SUMOTime > targetPhasesCTS
double getInputSensorsLength()
double getOutputSensorsLength()
PhasePushButtons m_pushButtons
double getDecayConstant()
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
void updateDecayThreshold()
MSSOTLTrafficLightLogic(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.
static int _2int(const E *const data)
converts a char-type array into the integer value described by it
~MSSOTLTrafficLightLogic()
Destructor.
SUMOTime getCurrentPhaseElapsed()
const MSPhaseDefinition & getCurrentPhaseDef() const
Returns the definition of the current phase.
SUMOTime trySwitch()
Switches to the next phase.
static double _2double(const E *const data)
converts a char-type array into the double value described by it
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)