67 for (
int i = 0; i < no; ++i) {
68 bool foundMajor =
false;
69 bool foundMinor =
false;
70 bool foundAllwayStop =
false;
78 foundAllwayStop =
true;
80 WRITE_WARNINGF(
TL(
"Invalid 'off'-state for link % at junction '%'"),
toString(l->getIndex()), l->getJunction()->getID());
83 if (foundMajor && foundMinor) {
#define WRITE_WARNINGF(...)
@ LINKSTATE_ALLWAY_STOP
This is an uncontrolled, all-way stop link.
@ LINKSTATE_TL_OFF_BLINKING
The link is controlled by a tls which is off and blinks, has to brake.
@ LINKSTATE_TL_OFF_NOSIGNAL
The link is controlled by a tls which is off, not blinking, may pass.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const Phases & getPhases() const
Returns the phases of this tls program.
MSOffTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id)
Constructor.
const MSPhaseDefinition & getCurrentPhaseDef() const
Returns the definition of the current phase.
int getPhaseNumber() const
Returns the number of phases.
void adaptLinkInformationFrom(const MSTrafficLightLogic &logic)
Applies information about controlled links and lanes from the given logic.
SUMOTime getPhaseIndexAtTime(SUMOTime simStep) const
Returns the index of the logic at the given simulation step.
~MSOffTrafficLightLogic()
Destructor.
int getIndexFromOffset(SUMOTime offset) const
Returns the step (the phasenumber) of a given position of the cycle.
int getCurrentPhaseIndex() const
Returns the current index within the program.
SUMOTime getOffsetFromIndex(int index) const
Returns the position (start of a phase during a cycle) from of a given step.
MSTrafficLightLogic::Phases myPhaseDefinition
The phase definition (only one)
const MSPhaseDefinition & getPhase(int givenstep) const
Returns the definition of the phase from the given position within the plan.
void rebuildPhase()
(Re)builds the internal phase definition
virtual void init(NLDetectorBuilder &nb)
Initialises the tls with information about incoming lanes.
The definition of a single phase of a tls logic.
A class that stores and controls tls and switching of their programs.
The parent class for traffic light logics.
const LinkVectorVector & getLinks() const
Returns the list of lists of all affected links.
virtual void adaptLinkInformationFrom(const MSTrafficLightLogic &logic)
Applies information about controlled links and lanes from the given logic.
SUMOTime myDefaultCycleTime
The cycle time (without changes)
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
LinkVectorVector myLinks
The list of LinkVectors; each vector contains the links that belong to the same link index.
Builds detectors for microsim.
const std::string & getID() const
Returns the id.
An upper class for objects with additional parameters.
std::map< std::string, std::string > Map
parameters map