 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
23 SUMOTime delay,
const std::map<std::string, std::string>& parameters,
26 parameters), myPolicy(policy) {
29 "*** Intersection " +
id +
" will run using MSSOTL"
30 + policy->
getName() +
"TrafficLightLogic ***");
37 SUMOTime delay,
const std::map<std::string, std::string>& parameters,
40 parameters, sensors), myPolicy(policy) {
virtual int decideNextPhase(SUMOTime elapsed, const MSPhaseDefinition *stage, int currentPhaseIndex, int phaseMaxCTS, bool thresholdPassed, bool pushButtonPressed, int vehicleCount)
A self-organizing traffic light logic.
Class for a low-level policy.
MSSOTLPolicyBasedTrafficLightLogic(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, MSSOTLPolicy *policy)
Constructor without sensors passed.
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.
virtual void inform(std::string msg, bool addType=true)
adds a new error to the list
~MSSOTLPolicyBasedTrafficLightLogic()
bool isPushButtonPressed()
std::string time2string(SUMOTime t)
int getPhaseIndexWithMaxCTS()
int getCurrentPhaseIndex() const
Returns the current index within the program.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
int countVehicles(MSPhaseDefinition phase)
virtual bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed, const MSPhaseDefinition *stage, int vehicleCount)=0
A class that stores and controls tls and switching of their programs.
const std::string & getID() const
Returns the id.
#define WRITE_MESSAGE(msg)
SUMOTime getCurrentPhaseElapsed()
static MsgHandler * getMessageInstance()
Returns the instance to add normal messages to.