AnyLogic 9
Expand
Font size

Escalator group

The Escalator group is an animation shape for a group of parallel escalators in pedestrian simulation models. You draw the escalators in the graphical editor and configure them (setting the number of escalators, escalator steps movement speed, step depth, and inclination angle) in the shape properties. To simulate how pedestrians are transported by escalators, insert the PedEscalator Pedestrian Library block into the flowchart. Specify whether the block should transport the pedestrians up or down.

An escalator group consists of one or more simple Escalator markup elements. The Escalator element allows you to set the movement direction for a particular escalator in the group and to perform other tasks dynamically at runtime using the element’s functions (turn the escalator on or off, change its speed, and so on).

Demo model: Escalator Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files). Demo model: EscalatorOpen the model in your AnyLogic desktop installation.

Escalator group at model runtime, in 3D animation

Escalator design

Blocking and turning escalators on/off

At model runtime, you can dynamically block and turn escalators on or off using the functions of the element.

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.

When you shut down an escalator, the power to the escalator stops, so the steps of the escalator stop moving, but the pedestrians can move on their own.

To draw an escalator group

  1. Drag the  Escalator Group element from the  Space Markup section of the Pedestrian Library palette onto the graphical editor.

  2. Open the properties of the escalator group shape. In the Number of escalators field, enter the number of escalators in the group. For our example we will work with two parallel escalators.

  3. You will see that the group consists of two escalators now:

  4. If the escalator transports pedestrians to a different level that is drawn as a different level in your model, you should specify the name of this level in the Upper level property of the escalator.
  5. Before modifying the shape, if you need to adjust it with more precision, you can turn grid alignment off by selecting Scale > Snap to grid on the toolbar.
  6. Select the shape with a click, and you will see the markers you may use for adjusting the width of the escalator components.
    Double clicking an escalator in a group to select select this particular escalator. The third click selects the whole escalator group again.
    To be able to resize the components of the escalator group, you should see the group selected, as on the figure below:

  7. To adjust the position of the escalator, use the handle on its exterior handrail.

  8. Next, drag the internal handle as shown in the figure below to adjust the width of the escalator. You will see that both escalators will have the same width:

  9. Now change the width of the inner balustrade:

  10. Adjust the width of the external balustrades:

  11. Finally, drag the boundary handles (highlighted below) to adjust the length of the escalators and landings:

  12. Next, set the direction of movement of the escalator steps. To change the direction of a particular escalator, select it with a mouse click and set its Direction to Up or Down in the properties.

Properties

General

Name — The name of the shape. The name is used to refer to this shape from the PedEscalator block properties and access the escalator group from code.

Show name — If selected, the name of the shape is displayed in the graphical editor.

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.

Level — The lower level. Pedestrians are on this level when they enter the escalator.

Upper level — The upper level. Pedestrians will be on this level when they exit the escalator.

Number of escalators — The number of escalators in this escalator group.

Speed — The movement speed of the escalator steps.

Pedestrian behavior

Pedestrian behavior (Up) — Specifies how the pedestrians will behave when they are transported up, whether they will Stay, Walk, Walk on left side, or Walk on right side. The default behavior is Stay.

Pedestrian behavior (Down) — Specifies how the pedestrians will behave when they are transported down, whether they will Stay, Walk, Walk on left side, or Walk on right side. The default behavior is Walk on left side.

Walking percentage (Down) — The percentage of pedestrians that will walk rather than stay when they are transported down. The value is defined in the [0..1] range. A value of 1 means that everyone walks down. The default value is 0.5.

Appearance

Balustrade color — Color of the balustrade. Choose No fill, if you do not want the balustrades to be filled with a color.

Solid balustrade — If selected, the left, right and internal balustrades of the escalator group have the widths as specified in the Position and size properties section and are filled with the chosen Balustrade color (this mode is typically used when metro escalators are simulated). If not, the balustrades are just 1 pixel wide (you would usually choose this mode for shopping mall escalators).

Position and size

X — The X-coordinate of the shape.

Y — The Y-coordinate of the shape.

Z — The Z-coordinate of the shape.

Width — The width of the shape, in pixels.

Length — The length of the shape, in pixels.

Step depth — The depth of the escalator step.

Define slope as — Defines the slope of the escalator: either by angle or by the rise of the escalator (in this case, the angle is calculated automatically, taking into account the rise and length of the escalator).

Angle — [Visible and applies if Define slope as: angle] The angle of an escalator’s inclination to the horizontal floor level (typically is 30 degrees).

Rise — [Visible and applies if Define slope as: rise] The height of the escalator that will be used to calculate the angle of the escalator’s inclination.

Landing length
Lower — The length of the landing located at the lower level, in pixels.
Upper — The length of the landing located at the upper level, in pixels.

Balustrade width
Left — The width of the left balustrade of the escalator group, in pixels.
Right — The width of the right balustrade of the escalator group, in pixels.
Internal — The width of the inner balustrade between each adjacent escalator in the group, in pixels.

Rotation — The orientation of the shape, in degrees.

Visibility and presentation

Visible — If selected, the shape is visible during animation at model runtime.

Show in — Select whether the shape is displayed in both 2D and 3D animation, 2D only, or 3D only.

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

Escalator movement direction

The Escalator Group space markup shape consists of the specified number of Escalator shapes.

The direction of escalator movement (up or down) can be set permanently in the properties of each individual escalator. In addition, the direction of movement can be dynamically controlled at model runtime using the functions of an individual escalator. Typically, this is controlled according to the prevailing flow of the crowd, by staff, or automatically.

To find out the direction of the escalator, click it in the graphical editor.

To change the escalator direction

  1. Click the escalator group shape.
  2. Click a single escalator shape within that group.
  3. In the properties, set its Direction to Up or Down. You will see that the arrow displayed on the escalator has changed its direction.

Functions

Escalators
Function Description
List<Escalator> getEscalators() Returns the list of escalators in the group. At the function call the element should be already initialized.
Blocking/unblocking escalator(s)

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
void block() Blocks all escalators in this group.
void block(int index) Blocks the escalator with the specified index.

index — the index of the escalator in the escalator group
void unblock() Unblocks all escalators in this group.
void unblock(int index) Unblocks the escalator with the specified index.

index — the index of the escalator in the escalator group
boolean isBlocked(int index) Checks whether the escalator with the specified index is blocked, or not. If the escalator is blocked, the function returns true, otherwise it returns false.

index — the index of the escalator in the escalator group
Turning escalator(s) 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
void turnOff() Turns off all escalators in this group.
void turnOff(int index) Turns off the escalator with the specified index.

index — the index of the escalator in the escalator group
void turnOn() Turns on all escalators in this group.
void turnOn(int index) Turns on the escalator with the specified index.

index — the index of the escalator in the escalator group
boolean isRunning(int index) Checks whether the escalator with the specified index is running, or not. If the escalator is running, the function returns true, otherwise it returns false.

index — the index of the escalator in the escalator group
Escalator speed
Function Description
double getSpeed(int index) Returns the speed of the escalator (in meters per second).

index — the index of the escalator in the escalator group
double getSpeed(int index, SpeedUnits units) Returns the speed of the escalator (in the units passed via the units argument) with the specified index.

index — the index of the escalator in the escalator group
units — one of the AnyLogic speed constants
void setSpeed(double speedInMPS) Sets the speed (in meters per second) for all escalators in the group.

speedInMPS — new speed value
void setSpeed(double speed, SpeedUnits units) Sets the speed for all escalators in the group (in the units passed via the units argument).

speed — the escalator’s speed
units — one of the AnyLogic speed constants
void setSpeed(int index, double speedInMPS) Sets the speed (in meters per second) of the escalator with the specified index.

index — the index of the escalator in the escalator group
speedInMPS — the escalator’s speed (in meters per second)
void setSpeed(int index, double speed, SpeedUnits units) Sets the speed of the escalator (in the units passed via the units argument).

index — the index of the escalator in the escalator group
speed — the escalator’s speed
units — one of the AnyLogic speed constants
Movement direction
Function Description
EscalatorMovementDirection getMovementDirection(int index) Returns the current movement direction for the escalator with the specified index.

Possible return values:
EscalatorMovementDirection.UP
EscalatorMovementDirection.DOWN

index — the index of the escalator in the escalator group
void setMovementDirection(EscalatorMovementDirection movementDirection) Sets new movement direction for all escalators in the group.

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

Valid values:
EscalatorMovementDirection.UP
EscalatorMovementDirection.DOWN
void setMovementDirection(int index, EscalatorMovementDirection movementDirection) Sets new movement direction for the escalator with the specified index.

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

Valid values:
EscalatorMovementDirection.UP
EscalatorMovementDirection.DOWN
Pedestrian behavior
Function Description
EscalatorPedestrianBehavior getPedestrianBehaviorDown() Returns the behavior for pedestrians who are transported down by escalators.
The possible return values:

EscalatorPedestrianBehavior.ESCALATOR_STAY_ALL
EscalatorPedestrianBehavior.ESCALATOR_WALK_ALL
EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_LEFT_SIDE
EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_RIGHT_SIDE
EscalatorPedestrianBehavior getPedestrianBehaviorUp() Returns the behavior for pedestrians who are transported up by escalators.
The possible return values:

EscalatorPedestrianBehavior.ESCALATOR_STAY_ALL
EscalatorPedestrianBehavior.ESCALATOR_WALK_ALL
EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_LEFT_SIDE
EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_RIGHT_SIDE
void setPedestrianBehaviorDown(EscalatorPedestrianBehavior pedestrianBehaviorDown) Sets the behavior for pedestrians who are transported down by escalators.

pedestrianBehaviorDown — the new behavior
The possible values:
EscalatorPedestrianBehavior.ESCALATOR_STAY_ALL
EscalatorPedestrianBehavior.ESCALATOR_WALK_ALL
EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_LEFT_SIDE
EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_RIGHT_SIDE
void setPedestrianBehaviorUp(EscalatorPedestrianBehavior pedestrianBehaviorUp) Sets the behavior for pedestrians who are transported up by escalators.

pedestrianBehaviorUp — the new behavior
The possible values:
EscalatorPedestrianBehavior.ESCALATOR_STAY_ALL
EscalatorPedestrianBehavior.ESCALATOR_WALK_ALL
EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_LEFT_SIDE
EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_RIGHT_SIDE
Dimensions
Function Description
double getLength() Returns the length of the shape (in pixels).
double getWidth() Returns the width of the shape (in pixels).
void setLength(double length) Sets the length of the shape (in pixels). At the function call the shape should not be initialized yet.

length — length of the shape.
void setWidth(double width) Sets the width of the shape (in pixels). At the function call the shape should not be initialized yet.

width — width of the shape.
double getLowerLandingLength() Returns the length of the lower landing (in pixels).
double getUpperLandingLength() Returns the length of the upper landing (in pixels).
void setLowerLandingLength(double lowerLandingLength) Sets the length of the lower landing (in pixels). At the function call the shape should not be initialized yet.

lowerLandingLength — length of the lower landing.
void setUpperLandingLength(double upperLandingLength) Sets the length of the upper landing (in pixels). At the function call the shape should not be initialized yet.

upperLandingLength — length of the upper landing.
double getLeftBalustradeWidth() Returns the width of the left balustrade (in pixels).
double getRightBalustradeWidth() Returns the width of the right balustrade (in pixels).
double getInternalBalustradeWidth() Returns the width of the internal balustrade (in pixels).
void setLeftBalustradeWidth(double leftBalustradeWidth) Sets the width of the left balustrade (in pixels). At the function call the shape should not be initialized yet.

leftBalustradeWidth — width of the left balustrade.
void setRightBalustradeWidth(double rightBalustradeWidth) Sets the width of the right balustrade (in pixels). At the function call the shape should not be initialized yet.

rightBalustradeWidth — width of the right balustrade.
void setInternalBalustradeWidth(double internalBalustradeWidth) Sets the width of the internal balustrade (in pixels). At the function call the shape should not be initialized yet.

internalBalustradeWidth — new width of the internal balustrade.
double getStepWidth() Returns the step width (step depth) of the escalator (in meters).
double getStepWidth(LengthUnits units) Returns the step width (step depth) of the escalator (in specified units).

units — a constant defining the length units.
void setStepWidth(double stepWidthInMeter) Sets the step width (step depth) of the escalator (in meters). At the function call the shape should not be initialized yet.

stepWidthInMeter — step width, in meters.
void setStepWidth(double stepWidth, LengthUnits units) Sets the step width (step depth) of the escalator (in specified length units). At the function call the shape should not be initialized yet.

stepWidth — step width, in specified length units.
units — a constant defining the length units.
Angle of inclination
Function Description
double getAngle() Returns the angle of inclination of escalators to the horizontal level.
void setAngle(double angle) Sets the angle of inclination of escalators to the horizontal level. At the function call the shape should not be initialized yet.

angle — angle of inclination.
Position
Function Description
double getX() Returns the X coordinate of the shape.
void setX(double x) Sets the X coordinate of the shape.

x — a new X coordinate.
double getY() Returns the Y coordinate of the shape.
void setY(double y) Sets the Y coordinate of the shape.

y — a new Y coordinate.
double getZ() Returns the Z coordinate of the shape.
void setZ(double z) Sets the Z coordinate of the shape.

z — a new Z coordinate.
Rotation
Function Description
double getRotation() Returns the rotation of the shape in radians.
void setRotation(double rotation) Sets the rotation of the shape in radians.

rotation — a new rotation value.
Visibility
Function Description
void setVisible(boolean v) Sets the visibility of the shape.

v — visibility of the shape. If true, the shape is visible, if false — not visible.
boolean isVisible() Returns the visibility of the shape. If it returns true, the shape is visible, if false — not visible.
Levels
Function Description
Level getLevel() Returns the level, where this escalator group is located.
Level getLowerLevel() Returns the lower level of the escalator.
Level getUpperLevel() Returns the upper level of the escalator.
Removal
Function Description
void remove() Removes the escalator group from the presentation. If the group is not a part of presentation, the function does nothing.
Removal from the presentation does not necessarily mean removing from the model logic, since logical networks and routes may have been created before the removal and survive it.
How can we improve this article?