AnyLogic 9
Expand
Font size

Escalator

The Escalator is a simple space markup element that is included in a complex space markup element  Escalator Group. An escalator allows you to set the movement direction for a particular escalator in a group and to perform other tasks dynamically at runtime using the functions of the element (turn the escalator on or off, change its speed, and so on).

Properties

General

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

Lock — If selected, the shape is locked. Locked elements do not respond to mouse clicks, and they cannot be selected in the graphical editor until you unlock them. This is often needed when you want to prevent the element from being edited while other elements are placed over it.

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

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.

Visibility and presentation

Agent presentation — If selected, the shape is also visible on the upper-level agent that hosts the agent containing this shape.

Functions

Blocking/unblocking escalator

When you block an escalator, the gate in front of the escalator closes. The pedestrians that were moving on that escalator will remain there. Pedestrians are not allowed on that escalator, but those whose route includes that escalator will approach it and wait in front of the gate until the escalator is unblocked.

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.
void block() Blocks the escalator.
void 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.
void turnOff() Turns the escalator off.
void turnOn() Turns the escalator on.
void setRunning(boolean isRunning) Turns the escalator on if the isRunning value is true; turns the escalator off otherwise.
Getting/Setting escalator speed
Function Description
double getSpeed() Returns the speed of the escalator (in meters per second).
double getSpeed (SpeedUnits units) Returns the speed of the escalator (in the units passed via the units argument).

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

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

Return values:
EscalatorMovementDirection.UP
EscalatorMovementDirection.DOWN
void setMovementDirection(EscalatorMovementDirection 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
Pedestrians
Function Description
List<Agent> getPeds() Returns the collection of pedestrians currently present on the escalator.
How can we improve this article?