48 const std::string&
id);
116 return "offTrafficLightLogic";
A traffic lights logic which represents a tls in an off-mode.
void resetLastSwitch(SUMOTime t) override
SUMOTime getPhaseIndexAtTime(SUMOTime simStep) const override
Returns the index of the logic at the given simulation step.
SUMOTime getOffsetFromIndex(int index) const override
Returns the position (start of a phase during a cycle) from of a given step.
const MSPhaseDefinition & getCurrentPhaseDef() const override
Returns the definition of the current phase.
const MSPhaseDefinition & getPhase(int givenstep) const override
Returns the definition of the phase from the given position within the plan.
int getIndexFromOffset(SUMOTime offset) const override
Returns the step (the phasenumber) of a given position of the cycle.
void adaptLinkInformationFrom(const MSTrafficLightLogic &logic) override
Applies information about controlled links and lanes from the given logic.
const std::string getLogicType() const
Returns the type of the logic as a string.
const Phases & getPhases() const override
Returns the phases of this tls program.
~MSOffTrafficLightLogic()
Destructor.
void changeStepAndDuration(MSTLLogicControl &tlcontrol, SUMOTime simStep, int step, SUMOTime stepDuration) override
Changes the current phase and her duration.
int getPhaseNumber() const override
Returns the number of phases.
MSTrafficLightLogic::Phases myPhaseDefinition
The phase definition (only one)
SUMOTime trySwitch() override
Switches to the next phase.
int getCurrentPhaseIndex() const override
Returns the current index within the program.
void rebuildPhase()
(Re)builds the internal phase definition
virtual void init(NLDetectorBuilder &nb) override
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.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
Builds detectors for microsim.
#define UNUSED_PARAMETER(x)