Package com.anylogic.engine.markup
@AnyLogicInternalAPI public interface TrafficLightDelegate
Modifier and Type | Method | Description |
---|---|---|
double | getCurrentPhaseElapsedTime() |
Returns time elapsed from beginning of the current phase in model time units or -1 if the
traffic light is off
|
int | getCurrentPhaseIndex() |
Returns 0-based index of the current phase, or -1 if the traffic light is off
|
boolean | isOn() |
Returns
true if the traffic light is on, false otherwise |
void | switchToNextPhase() |
Switches traffic light to next phase.
|
void | turnOff() |
Turns off traffic light
|
void | turnOn |
Turns on traffic light with offset in model time units
|
void turnOn(double offset)
Turns on traffic light with offset in model time units
- Parameters:
offset
- offset in model time units
void turnOff()
Turns off traffic light
boolean isOn()
Returns
true
if the traffic light is on, false
otherwise- Returns:
true
if the traffic light is on,false
otherwise
int getCurrentPhaseIndex()
Returns 0-based index of the current phase, or -1 if the traffic light is off
- Returns:
- 0-based index of the current phase, or -1 if the traffic light is off
double getCurrentPhaseElapsedTime()
Returns time elapsed from beginning of the current phase in model time units or -1 if the
traffic light is off
- Returns:
- time elapsed from beginning of the current phase in model time units or -1 if the traffic light is off
void switchToNextPhase()
Switches traffic light to next phase. Typical use case: current phase has
infinite
duration and
should be switched