AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, HasLevel, LevelElement, LevelMarkup, SVGElement, Serializable

public class EscalatorGroup
extends AbstractLevelMarkup
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
EscalatorGroup() 
EscalatorGroup(Agent owner, ShapeDrawMode drawMode, boolean isPublic, Level upperLevel, double x, double y, double z, double width, double length, double speedInMPS, double stepWidthInMeter, double angle, double rotation, double lowerLandingLength, double upperLandingLength, double rightBalustradeWidth, double leftBalustradeWidth, double internalBalustradeWidth, Color balustradecolor, boolean solidBalustrade, EscalatorPedestrianBehavior pedestrianBehaviorUp, EscalatorPedestrianBehavior pedestrianBehaviorDown, Escalator... escalators)
Deprecated.
deprecated in version 8.4, will be removed in the future releases

Method Summary

Modifier and TypeMethodDescription
voidaddEscalator(Escalator escalator)
Adds an Escalator element to this escalator group.
voidblock()
Blocks all escalators in this group.
voidblock(int index)
Blocks the escalator with the specified index.
booleancontains(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
doublegetAngle()
Returns the angle of inclination of an escalator to the horizontal floor level (typically is 30 degrees).
BoundingRectanglegetBoundingRectangle() 
List<Escalator>getEscalators()
Returns the list of escalators in this group.
doublegetInternalBalustradeWidth()
Returns the width of the internal balustrade (in pixels)
doublegetLeftBalustradeWidth()
Returns the width of the left balustrade (in pixels)
doublegetLength()
Returns escalator length in pixels
doublegetLowerLandingLength()
Returns the length of the lower landing
LevelgetLowerLevel()
Returns the lower level.
EscalatorMovementDirectiongetMovementDirection(int index)
Returns the current movement direction for the escalator specified by index.
EscalatorPedestrianBehaviorgetPedestrianBehaviorDown()
Returns the behavior for pedestrians moving down in this escalator group.
EscalatorPedestrianBehaviorgetPedestrianBehaviorUp()
Returns the behavior for pedestrians moving up in this escalator group.
doublegetRightBalustradeWidth()
Returns the width of the right balustrade (in pixels)
doublegetRotation()
Returns the current rotation angle (in radians)
doublegetSpeed(int index)
Returns the speed of the specified escalator (in meters per second).
doublegetSpeed(int index, SpeedUnits units)
Returns the speed of the escalator (in the units passed via the units argument) with the specified index.
doublegetStepWidth()
Returns the step width (a.k.a.
doublegetStepWidth(LengthUnits units)
Returns the step width (a.k.a.
doublegetUpperLandingLength()
Returns the length of the upper landing
LevelgetUpperLevel()
Returns the upper level.
doublegetWidth()
Returns escalator width in pixels
doublegetX()
Returns the X coordinate of this element
doublegetY()
Returns the Y coordinate of this element
doublegetZ()
Returns the Z coordinate of this element
booleanisBlocked(int index)
Checks whether the escalator with the specified index is blocked, or not.
booleanisRunning(int index)
Checks whether the escalator with the specified index is running, or not.
voidpostInitialize()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
voidsetAngle(double angle)
Sets the angle of inclination of an escalator to the horizontal floor level.
voidsetInternalBalustradeLength(double internalBalustradeWidth)
Sets the width of the internal balustrade (in pixels).
voidsetLeftBalustradeWidth(double leftBalustradeWidth)
Sets the width of the left balustrade (in pixels).
voidsetLength(double length)
Sets the escalator length (in pixels).
voidsetLowerLandingLength(double lowerLandingLength)
Sets the length of the lower landing.
voidsetLowerLevel(Level level)
Sets the lower level.
voidsetMovementDirection(int index, EscalatorMovementDirection movementDirection)
Sets new movement direction for the specified escalator.
voidsetMovementDirection(EscalatorMovementDirection movementDirection)
Sets new movement direction for all the escalators in this group.
voidsetPedestrianBehaviorDown(EscalatorPedestrianBehavior pedestrianBehaviorDown)
Sets the behavior for pedestrians moving down in this escalator group.
voidsetPedestrianBehaviorUp(EscalatorPedestrianBehavior pedestrianBehaviorUp)
Sets the behavior for pedestrians moving up in this escalator group.
voidsetRightBalustradeLength(double rightBalustradeWidth)
Sets the width of the right balustrade (in pixels).
voidsetRotation(double rotation)
Sets the current rotation
voidsetSpeed(double speedInMPS)
Sets the speed (in meters per second) of all the escalators in this group.
voidsetSpeed(double speed, SpeedUnits units)
Sets the speed (in meters per second) of the escalator with the specified index.
voidsetSpeed(int index, double speedInMPS)
Sets the speed (in meters per second) of the escalator with the specified index.
voidsetSpeed(int index, double speed, SpeedUnits units)
Sets the speed (in the units passed via the units argument) of the escalator with the specified index.
voidsetStepWidth(double stepWidthInMeter)
Sets the step width (a.k.a.
voidsetStepWidth(double stepWidth, LengthUnits units)
Sets the step width (a.k.a.
voidsetUpperLevel(Level level)
Sets upper level.
voidsetUpperNewelLength(double upperLandingLength)
Sets the length of the upper landing.
voidsetWidth(double width)
Sets the escalator width (in pixels).
voidsetX(double x)
Sets the X coordinate of this element.
voidsetY(double y)
Sets the Y coordinate of this element.
voidsetZ(double z)
Sets the Z coordinate of this element.
voidturnOff()
Turns off all escalators in this group.
voidturnOff(int index)
Turns off the escalator with the specified index.
voidturnOn()
Turns on all escalators in this group.
voidturnOn(int index)
Turns on the escalator with the specified index.
voidunblock()
Unblocks all escalators in this group, allowing pedestrians to enter the escalators.
voidunblock(int index)
Unblocks the escalator with the specified index.
voidupdateDynamicProperties()
Updates dynamic properties of this shape only (without structural contents, if any) in a given context.
Method should be overridden for shapes with dynamic properties.
doublewalkingPercentageDown()
Override this function to return probability of choice to walk or stay.
doublewalkingPercentageUp()
Override this function to return probability of choice to walk or stay.

Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup

getDrawMode, getLevel, setLevel

Methods inherited from class com.anylogic.engine.markup.MarkupShape

error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, onAggregatorVisibilityChanged

Constructor Details

EscalatorGroup

public EscalatorGroup()

EscalatorGroup

@Deprecated
public EscalatorGroup(Agent owner,
 ShapeDrawMode drawMode,
 boolean isPublic,
 Level upperLevel,
 double x,
 double y,
 double z,
 double width,
 double length,
 double speedInMPS,
 double stepWidthInMeter,
 double angle,
 double rotation,
 double lowerLandingLength,
 double upperLandingLength,
 double rightBalustradeWidth,
 double leftBalustradeWidth,
 double internalBalustradeWidth,
 Color balustradecolor,
 boolean solidBalustrade,
 EscalatorPedestrianBehavior pedestrianBehaviorUp,
 EscalatorPedestrianBehavior pedestrianBehaviorDown,
 Escalator... escalators)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Parameters:
owner -
drawMode -
isPublic -
upperLevel -
x -
y -
z -
width -
length -
speedInMPS -
stepWidthInMeter -
angle -
rotation -
lowerLandingLength -
upperLandingLength -
rightBalustradeWidth -
leftBalustradeWidth -
internalBalustradeWidth -
balustradecolor -
solidBalustrade -
pedestrianBehaviorUp -
pedestrianBehaviorDown -
escalators -

Method Details

getLowerLevel

public Level getLowerLevel()
Returns the lower level. Pedestrians are on this level when they enter the escalator.
Returns:
the lower level

setLowerLevel

public void setLowerLevel(Level level)
Sets the lower level. Pedestrians are on this level when they enter the escalator.
Parameters:
level - the lower level

getUpperLevel

public Level getUpperLevel()
Returns the upper level. Pedestrians get on this level when they leave the escalator.
Returns:
the upper level

setUpperLevel

public void setUpperLevel(Level level)
Sets upper level. Pedestrians get on this level when they leave the escalator.
Parameters:
level - the upper level

getX

public double getX()
Returns the X coordinate of this element
Returns:
the X coordinate of this element

setX

public void setX(double x)
Sets the X coordinate of this element. The element should be uninitialized
Parameters:
x - the coordinate value

getY

public double getY()
Returns the Y coordinate of this element
Returns:
the Y coordinate of this element

setY

public void setY(double y)
Sets the Y coordinate of this element. The element should be uninitialized
Parameters:
y - the coordinate value

getZ

public double getZ()
Returns the Z coordinate of this element
Returns:
the Z coordinate of this element

setZ

public void setZ(double z)
Sets the Z coordinate of this element. The element should be uninitialized
Parameters:
z - the coordinate value

getLength

public double getLength()
Returns escalator length in pixels
Returns:
escalator length

setLength

public void setLength(double length)
Sets the escalator length (in pixels). The element should be uninitialized.
Parameters:
length - escalator length

getWidth

public double getWidth()
Returns escalator width in pixels
Returns:
escalator width

setWidth

public void setWidth(double width)
Sets the escalator width (in pixels). The element should be uninitialized.
Parameters:
width - escalator width

getAngle

public double getAngle()
Returns the angle of inclination of an escalator to the horizontal floor level (typically is 30 degrees).
Parameters:
angle - the angle of inclination

setAngle

public void setAngle(double angle)
Sets the angle of inclination of an escalator to the horizontal floor level. The element should be uninitialized.
Parameters:
angle - the angle of inclination

getStepWidth

public double getStepWidth()
Returns the step width (a.k.a. step depth) of the escalator (in meters)
Returns:
step width

getStepWidth

public double getStepWidth(LengthUnits units)
Returns the step width (a.k.a. step depth) of the escalator (in specified units)
Parameters:
units - length units
Returns:
step width in units

setStepWidth

public void setStepWidth(double stepWidthInMeter)
Sets the step width (a.k.a. step depth) of the escalator (in meters). The element should be uninitialized.
Parameters:
stepWidthInMeter - step width

setStepWidth

public void setStepWidth(double stepWidth,
 LengthUnits units)
Sets the step width (a.k.a. step depth) of the escalator (in specified length units). The element should be uninitialized.
Parameters:
stepWidthInMeter - step width
units - length units

getLowerLandingLength

public double getLowerLandingLength()
Returns the length of the lower landing
Returns:
the length of the lower landing

setLowerLandingLength

public void setLowerLandingLength(double lowerLandingLength)
Sets the length of the lower landing. The element should be uninitialized.
Parameters:
lowerLandingLength -

getUpperLandingLength

public double getUpperLandingLength()
Returns the length of the upper landing
Returns:
the length of the upper landing

setUpperNewelLength

public void setUpperNewelLength(double upperLandingLength)
Sets the length of the upper landing. The element should be uninitialized.
Parameters:
upperLandingLength -

getRightBalustradeWidth

public double getRightBalustradeWidth()
Returns the width of the right balustrade (in pixels)
Returns:
the width of the right balustrade

setRightBalustradeLength

public void setRightBalustradeLength(double rightBalustradeWidth)
Sets the width of the right balustrade (in pixels). The element should be uninitialized.
Parameters:
rightBalustradeWidth - width value

getLeftBalustradeWidth

public double getLeftBalustradeWidth()
Returns the width of the left balustrade (in pixels)
Returns:
the width of the left balustrade

setLeftBalustradeWidth

public void setLeftBalustradeWidth(double leftBalustradeWidth)
Sets the width of the left balustrade (in pixels). The element should be uninitialized.
Parameters:
leftBalustradeWidth - width value

getInternalBalustradeWidth

public double getInternalBalustradeWidth()
Returns the width of the internal balustrade (in pixels)
Returns:
the width of the internal balustrade

setInternalBalustradeLength

public void setInternalBalustradeLength(double internalBalustradeWidth)
Sets the width of the internal balustrade (in pixels). The element should be uninitialized.
Parameters:
internalBalustradeWidth - width value

getRotation

public double getRotation()
Returns the current rotation angle (in radians)
Returns:
the current rotation

setRotation

public void setRotation(double rotation)
Sets the current rotation
Parameters:
rotation - rotation in radians

postInitialize

public void postInitialize()
Description copied from interface: AggregatableAnimationElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Specified by:
postInitialize in interface AggregatableAnimationElement

addEscalator

public void addEscalator(Escalator escalator)
Adds an Escalator element to this escalator group. The element should be uninitialized.
Parameters:
escalator - the escalator to be added

getEscalators

public List<Escalator> getEscalators()
Returns the list of escalators in this group. The element should be initialized.
Returns:
the list of escalators

contains

public boolean contains(double px,
 double py)
Description copied from class: MarkupShape
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e. in the same system with the coordinates of this shape, x and y)
Specified by:
contains in class MarkupShape
Parameters:
px - the x coordinate relative to this shape's container
py - the y coordinate relative to this shape's container
Returns:
true if the shape contains the point with the given coordinates

turnOff

public void turnOff()
Turns off all escalators in this group. The element should be initialized. 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.

turnOff

public void turnOff(int index)
Turns off the escalator with the specified index. The element should be initialized. 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.
Parameters:
index -

turnOn

public void turnOn()
Turns on all escalators in this group. The element should be initialized.

turnOn

public void turnOn(int index)
Turns on the escalator with the specified index. The element should be initialized.
Parameters:
index -

isRunning

public boolean isRunning(int index)
Checks whether the escalator with the specified index is running, or not. The element should be initialized. If the escalator is running, the function returns true, otherwise it returns false.
Parameters:
index - the escalator index
Returns:
true if the escalator is running, false otherwise

block

public void block()
Blocks all escalators in this group. The element should be initialized. When you block an escalator, the gate before the escalator gets closed, and no more pedestrians are allowed to enter this escalator.

block

public void block(int index)
Blocks the escalator with the specified index. The element should be initialized. When you block an escalator, the gate before the escalator gets closed, and no more pedestrians are allowed to enter this escalator.
Parameters:
index - escalator index

unblock

public void unblock()
Unblocks all escalators in this group, allowing pedestrians to enter the escalators. The element should be initialized.

unblock

public void unblock(int index)
Unblocks the escalator with the specified index. The element should be initialized.
Parameters:
index - escalator indes

isBlocked

public boolean isBlocked(int index)
Checks whether the escalator with the specified index is blocked, or not. The element should be initialized.
Parameters:
index - escalator index
Returns:
true if the escalator is blocked, false otherwise

setSpeed

public void setSpeed(double speedInMPS)
Sets the speed (in meters per second) of all the escalators in this group. The element should be initialized.
Parameters:
speedInMPS - speed

setSpeed

public void setSpeed(int index,
 double speedInMPS)
Sets the speed (in meters per second) of the escalator with the specified index. The element should be initialized.
Parameters:
index - escalator index
speedInMPS - speed

setSpeed

public void setSpeed(double speed,
 SpeedUnits units)
Sets the speed (in meters per second) of the escalator with the specified index. The element should be initialized.
Parameters:
speed - speed
units - speed units

setSpeed

public void setSpeed(int index,
 double speed,
 SpeedUnits units)
Sets the speed (in the units passed via the units argument) of the escalator with the specified index. The element should be initialized.
Parameters:
speed - speed
units - speed units

getSpeed

public double getSpeed(int index)
Returns the speed of the specified escalator (in meters per second). The element should be initialized.
Parameters:
index - index of the escalator
Returns:
the speed of the escalator

getSpeed

public double getSpeed(int index,
 SpeedUnits units)
Returns the speed of the escalator (in the units passed via the units argument) with the specified index. The element should be initialized.
Parameters:
index - escalator index
units - speed units
Returns:
speed of the escalator

setMovementDirection

public void setMovementDirection(EscalatorMovementDirection movementDirection)
Sets new movement direction for all the escalators in this group. The element should be initialized. You set the new value by passing one of the following values as the function argument:
  • EscalatorMovementDirection.UP
  • EscalatorMovementDirection.DOWN
Parameters:
movementDirection - direction

setMovementDirection

public void setMovementDirection(int index,
 EscalatorMovementDirection movementDirection)
Sets new movement direction for the specified escalator. The element should be initialized. You set the new value by passing one of the following values as the function argument:
  • EscalatorMovementDirection.UP
  • EscalatorMovementDirection.DOWN
Parameters:
index - escalator index
movementDirection - direction

getMovementDirection

public EscalatorMovementDirection getMovementDirection(int index)
Returns the current movement direction for the escalator specified by index. The element should be initialized. The possible return values are:
  • EscalatorMovementDirection.UP
  • EscalatorMovementDirection.DOWN
Parameters:
index - escalator index
Returns:
the current movement direction for the escalator

getPedestrianBehaviorUp

public EscalatorPedestrianBehavior getPedestrianBehaviorUp()
Returns the behavior for pedestrians moving up in this escalator group. The possible return values are:
  • EscalatorPedestrianBehavior.ESCALATOR_STAY_ALL
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ALL
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_LEFT_SIDE
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_RIGHT_SIDE
Returns:

setPedestrianBehaviorUp

public void setPedestrianBehaviorUp(EscalatorPedestrianBehavior pedestrianBehaviorUp)
Sets the behavior for pedestrians moving up in this escalator group. You set the new value by passing one of the following values as the function argument:
  • EscalatorPedestrianBehavior.ESCALATOR_STAY_ALL
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ALL
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_LEFT_SIDE
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_RIGHT_SIDE
Parameters:
pedestrianBehaviorUp - behavior value

walkingPercentageUp

public double walkingPercentageUp()
Override this function to return probability of choice to walk or stay. This value is evaluated each time pedestrian enters the escalator. Default implementation returns 0.5.
Returns:
value between 0 and 1

getPedestrianBehaviorDown

public EscalatorPedestrianBehavior getPedestrianBehaviorDown()
Returns the behavior for pedestrians moving down in this escalator group. The possible return values are:
  • EscalatorPedestrianBehavior.ESCALATOR_STAY_ALL
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ALL
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_LEFT_SIDE
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_RIGHT_SIDE
Returns:

setPedestrianBehaviorDown

public void setPedestrianBehaviorDown(EscalatorPedestrianBehavior pedestrianBehaviorDown)
Sets the behavior for pedestrians moving down in this escalator group. You set the new value by passing one of the following values as the function argument:
  • EscalatorPedestrianBehavior.ESCALATOR_STAY_ALL
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ALL
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_LEFT_SIDE
  • EscalatorPedestrianBehavior.ESCALATOR_WALK_ON_RIGHT_SIDE
Parameters:
pedestrianBehaviorUp - behavior value

walkingPercentageDown

public double walkingPercentageDown()
Override this function to return probability of choice to walk or stay. This value is evaluated each time pedestrian enters the escalator. Default implementation returns 0.5.
Returns:
value between 0 and 1

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()

updateDynamicProperties

@AnyLogicInternalCodegenAPI
public void updateDynamicProperties()
Description copied from class: AbstractMarkup
Updates dynamic properties of this shape only (without structural contents, if any) in a given context.
Method should be overridden for shapes with dynamic properties. Note that you should call super.updateDynamicProperties() at the end of overridden method
Overrides:
updateDynamicProperties in class AbstractMarkup