67 const std::string&
id,
const std::string& programID,
180 int step,
SUMOTime stepDuration)
override;
194 virtual const std::string
getParameter(
const std::string& key,
const std::string defaultValue =
"")
const override;
197 virtual void setParameter(
const std::string& key,
const std::string& value)
override;
The simulated network and simulation perfomer.
The definition of a single phase of a tls logic.
A fixed traffic light logic.
SUMOTime getLatest() const
the maximum duration for keeping the current phase when considering 'latestEnd'
int getIndexFromOffset(SUMOTime offset) const override
Returns the step (the phasenumber) of a given position of the cycle.
virtual void changeStepAndDuration(MSTLLogicControl &tlcontrol, SUMOTime simStep, int step, SUMOTime stepDuration) override
Changes the current phase and her duration.
Phases myPhases
The list of phases this logic uses.
virtual void saveState(OutputDevice &out) const override
Saves the current tls states into the given stream.
const MSPhaseDefinition & getPhase(int givenstep) const override
Returns the definition of the phase from the given position within the plan.
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.
int getPhaseNumber() const override
Returns the number of phases.
SUMOTime getEarliest(SUMOTime prevStart) const
the minimum duration for keeping the current phase when considering 'earliestEnd'
void setPhases(const Phases &phases, int index)
Replaces the phases and set the phase index.
~MSSimpleTrafficLightLogic()
Destructor.
virtual SUMOTime mapTimeInCycle(SUMOTime t) const override
map the given time into the current cycle
int myStep
The current step.
bool myCoordinated
whether coordination parameters earliestEnd, latestEnd are
int getCurrentPhaseIndex() const override
Returns the current index within the program.
virtual const std::string getParameter(const std::string &key, const std::string defaultValue="") const override
gets a parameter
void deletePhases()
frees memory responsibilities
const Phases & getPhases() const override
Returns the phases of this tls program.
virtual void setParameter(const std::string &key, const std::string &value) override
Sets a parameter and updates internal constants.
virtual SUMOTime trySwitch() override
Switches to the next phase.
const MSPhaseDefinition & getCurrentPhaseDef() const override
Returns the definition of the current phase.
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.
Static storage of an output device and its base (abstract) implementation.
std::map< std::string, std::string > Map
parameters map