AnyLogic
Expand
Font size

Escalator

Escalator is a simple space markup element comprised in a complex space markup element  Escalator Group. Escalator enables you to set the movement direction for an specific escalator in a group as well as perform other tasks dynamically at runtime using the element’s functions (turn the escalator on/off, change its speed, etc.).

Properties

General

Name — The name of the escalator shape. The name is used to identify the escalator and refer to this shape from code.

Ignore — If selected, the shape is excluded from the model.

Visible on upper agent — If selected, the shape is also visible on the upper agent where this agent lives.

Lock — If selected, the shape is locked. Locked shape does not react to mouse clicks — it is impossible to select it in the graphical editor until you unlock it.

Direction — Sets the escalator steps movement direction (Up or Down). In the graphical editor, you will see that the arrow changes its direction in accordance with the selected option.

Functions

Blocking/unblocking escalator

When you block an escalator, the gate before the escalator gets closed, and no more pedestrians are allowed to enter this escalator.

Function Description
boolean isBlocked() Checks whether the escalator is blocked, or not. If the escalator is blocked, the function returns true, otherwise it returns false.
block() Blocks the escalator.
unblock() Unblocks the escalator.
Turning escalator on/off

When you turn off an escalator, the escalator power supply stops, so the escalator steps are not moving anymore, but pedestrians can move on their own.

Function Description
boolean isRunning() Checks whether the escalator is running, or not. Returns true if the escalator is running. Returns falseotherwise.
turnOff() Turns the escalator off.
turnOn() Turns the escalator on.
setRunning(boolean isRunning) Turns the escalator on if the isRunning value is true; turns the escalator off otherwise.
Getting/Setting escalator speed
Function Description
getSpeed() Returns the speed of the escalator (in meters per second).
getSpeed (SpeedUnits units) Returns the speed of the escalator (in the units passed via the units argument).

SpeedUnits units — one of the AnyLogic speed constants
setSpeed() Sets the speed of the escalator (in meters per second).
setSpeed (SpeedUnits units) Sets the speed of the escalator (in the units passed via the units argument).

SpeedUnits units — one of the AnyLogic speed constants.
Movement direction
Function Description
getMovementDirection() Returns the current movement direction for the escalator.

Return values:
EscalatorMovementDirection.UP
EscalatorMovementDirection.DOWN
setMovementDirection(movementDirection) Sets new movement direction for the escalators. You set the new value by passing one of the valid values as the function argument.

movementDirection — the escalator’s movement direction constant, which can take one of the valid values

Valid values:
EscalatorMovementDirection.UP
EscalatorMovementDirection.DOWN
Getting the list of pedestrians on the escalator
Function Description
List<Agent>getPeds() Returns the collection of pedestrians currently present on the escalator.
How can we improve this article?