AnyLogic
Expand
Font size
All Implemented Interfaces:
Serializable

public class Escalator
extends AbstractMarkupSubunit<EscalatorGroup>
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
Escalator() 
Escalator(EscalatorMovementDirection movementDirection) 

Method Summary

Modifier and TypeMethodDescription
voidblock()
Blocks the escalator.
EscalatorDataSourcegetDataSource() 
EscalatorMovementDirectiongetMovementDirection()
Returns the current movement direction for the escalator.
List<? extends Agent>getPeds()
Returns the collection of pedestrians currently present on the escalator
doublegetSpeed()
Returns the speed of the escalator (in meters per second)
doublegetSpeed(SpeedUnits units)
Returns the speed of the escalator (in the units passed via the units argument).
booleanisBlocked()
Checks whether the escalator is blocked, or not.
booleanisRunning()
Checks whether the escalator is running, or not.
voidsetBlocked(boolean isBlocked)
Blocks or unblocks the escalator depending on the isBlocked value
voidsetDataSource(EscalatorDataSource dataSource) 
voidsetMovementDirection(EscalatorMovementDirection movementDirection)
Sets new movement direction for the escalators.
voidsetRunning(boolean isRunning)
Turns the escalator on if the isRunning value is true; turns the escalator off otherwise.
voidsetSpeed(double speedInMPS)
Sets the speed of the escalator (in meters per second).
voidsetSpeed(double speed, SpeedUnits units)
Sets the speed of the escalator (in the units passed via the units argument).
voidturnOff()
Turns off the esaclator.
voidturnOn()
Turns the escalator on setting the steps into motion
voidunblock()
Unblocks the escalator allowing pedestrians to enter this escalator

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

getName, getOwner

Methods inherited from class java.lang.Object

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

Constructor Details

Escalator

public Escalator()

Escalator

public Escalator(EscalatorMovementDirection movementDirection)

Method Details

getDataSource

@AnyLogicInternalAPI
public EscalatorDataSource getDataSource()

setDataSource

@AnyLogicInternalAPI
public void setDataSource(EscalatorDataSource dataSource)

turnOn

public void turnOn()
Turns the escalator on setting the steps into motion

turnOff

public void turnOff()
Turns off the esaclator. 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.

setRunning

public void setRunning(boolean isRunning)
Turns the escalator on if the isRunning value is true; turns the escalator off otherwise.
Parameters:
isRunning - argument flag

isRunning

public boolean isRunning()
Checks whether the escalator is running, or not. Returns true if the escalator is running. Returns false otherwise.
Returns:
escalator running status

block

public void block()
Blocks the escalator. When you block an escalator, the gate before the escalator gets closed, and pedestrians are no longer allowed to enter this escalator.

unblock

public void unblock()
Unblocks the escalator allowing pedestrians to enter this escalator

setBlocked

public void setBlocked(boolean isBlocked)
Blocks or unblocks the escalator depending on the isBlocked value
Parameters:
isBlocked - argument flag

isBlocked

public boolean isBlocked()
Checks whether the escalator is blocked, or not. If the escalator is blocked, the function returns true, otherwise it returns false
Returns:
escalator blocked status

getMovementDirection

public EscalatorMovementDirection getMovementDirection()
Returns the current movement direction for the escalator. The possible return values are:
  • EscalatorMovementDirection.UP
  • EscalatorMovementDirection.DOWN
Returns:
the current movement direction for the escalator

setMovementDirection

public void setMovementDirection(EscalatorMovementDirection movementDirection)
Sets new movement direction for the escalators. You set the new value by passing one of the following values as the function argument:
  • EscalatorMovementDirection.UP
  • EscalatorMovementDirection.DOWN
Parameters:
movementDirection - direction

getSpeed

public double getSpeed()
Returns the speed of the escalator (in meters per second)
Returns:
the speed of the escalator (in meters per second)

getSpeed

public double getSpeed(SpeedUnits units)
Returns the speed of the escalator (in the units passed via the units argument).
Parameters:
units - speed units
Returns:
the speed of the escalator (in the units passed via the units argument).

setSpeed

public void setSpeed(double speedInMPS)
Sets the speed of the escalator (in meters per second).
Parameters:
speedInMPS - speed in meters per second

setSpeed

public void setSpeed(double speed,
 SpeedUnits units)
Sets the speed of the escalator (in the units passed via the units argument).
Parameters:
speed - escalator speed
units - speed units

getPeds

public List<? extends Agent> getPeds()
Returns the collection of pedestrians currently present on the escalator
Returns:
list of pedestrians on the escalator