28#define TRANSIENT_NOTDECISIONAL_BIT 1
30#define UNDEFINED_BIT 3
187 if (
myState.find_first_of(
"gG") == std::string::npos) {
190 if (
myState.find_first_of(
"yY") != std::string::npos) {
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic,...
The definition of a single phase of a tls logic.
std::string name
Optional name or description for the current phase.
SUMOTime lastDuration
The previous duration of the phase.
std::vector< std::string > myTargetLaneSet
SUMOTime maxDuration
The maximum duration of the phase.
bool myCommit
the phase is a commit, compulsory directive for SOTL policies
LinkState getSignalState(int pos) const
Returns the state of the tls signal at the given position.
static const SUMOTime UNSPECIFIED_DURATION
SUMOTime myLastEnd
Stores the timestep when the previous instance of this phase was switched off.
static const SUMOTime OVERRIDE_DURATION
SUMOTime vehext
for NEMA phase
SUMOTime latestEnd
The maximum time within the cycle for switching (for coordinated actuation)
const std::vector< int > & getNextPhases() const
virtual ~MSPhaseDefinition()
Destructor.
bool myUndefined
Leaving the phase type as "undefined" lets SOTL policies malfunction.
bool myTransientNotDecisional
the phase is a transient one or a decisional one, compulsory directive for SOTL policies
SUMOTime minDuration
The minimum duration of the phase.
const std::string & getName() const
SUMOTime yellow
for NEMA phase
SUMOTime red
for NEMA phase
SUMOTime myLastSwitch
Stores the timestep of the last on-switched of the phase.
const std::string & getState() const
Returns the state within this phase.
SUMOTime duration
The duration of the phase.
bool isGreenPhase() const
Returns whether this phase is a pure "green" phase.
bool isDecisional() const
std::vector< int > nextPhases
The index of the phase that suceeds this one (or -1)
void setState(const std::string &_state)
std::string finalTarget
The condition expression for switching into this phase when the active phase must end.
MSPhaseDefinition(SUMOTime _duration, const std::string &state, const std::string &_name="")
Constructor.
std::string earlyTarget
The condition expression for an early switch into this phase.
std::string myState
The phase definition.
bool isAllRedPhase() const
Returns whether this phase is an "all red" phase.
void setName(const std::string &_name)
bool operator!=(const MSPhaseDefinition &pd)
Comparison operator.
const std::vector< std::string > & getTargetLaneSet() const
SUMOTime earliestEnd
The minimum time within the cycle for switching (for coordinated actuation)