Elevator Bank

Overview and Key Concepts

An object representing a bank of elevators for transporting people between different floors (grids) in an A* network.

The Elevator Bank is used to simulate elevators moving people between different floors of a facility. The Elevator Bank acts as a custom A* bridge between A* grids that are stacked on top of each other along a model's z-axis.

Create an elevator bank by dragging it from the library. Then expand its x-axis size to define the desired number of elevators. See Working with A* Navigation for more instruction on adding an Elevator Bank to your model.

Events

On Traveler Arrival

The OnTravelerArrival event fires when a traveler arrives at the elevator bank to transfer floors.

It has the following parameters:

Event Parameter Type Explanation
Traveler TaskExecuter The traveler that is arriving at the elevator bank.
DestFloorZ double The z location of the destination floor that the traveler is going to.

On Traveler Continue

The OnTravelerContinue event fires when a traveler is finished using the elevator bank and continues on the A* network.

It has the following parameters:

Event Parameter Type Explanation
Traveler TaskExecuter The traveler that is arriving at the elevator bank.

The elevator bank also relays events of the bank elevator. When listening to these events via the elevator bank (using Process Flow's Wait For Event or Event-Triggered Source activities), you need to define the rank of the target elevator that you want to listen to.

States

The Elevator Bank does not implement a state profile. Instead refer to Bank Elevator states.

Statistics

The Elevator Bank does not implement any of its own statistics. Instead refer to Bank Elevator statistics.

Properties

The Elevator Bank object has four tabs with various properties. The last three tabs are the standard tabs that are common to all objects. For more information about the properties on those tabs, see:

The Elevator Bank tab is shown below.

The Elevator Bank tab includes the following properties.

Door Open/Close Time

Define the time it takes to open and close an elevator door. For opening, this is the duration applied from the time the elevator arrives at a floor, to the time that the first person starts to exit/enter the elevator. For closing, this is the duration applied from the time the last person finishes entering/exiting the elevator to the time the elevator starts moving to the next floor.

Wait Time

Define the minimum amount of time the elevator will remain on a floor with its door open.

Entry/Exit Time

Define the amount of time it takes for a person to enter/exit the elevator. This time is used in conjunction with the # Simultaneous Entries/Exits property to determine the total amount of time it takes for multiple people to enter/exit the elevator.

# Simultaneous Entries/Exits

Define the maximum number of people who can be entering/exiting the elevator simultaneously. This value is used in conjunction with the Entry/Exit Time property to determine the total time it takes for multiple people to enter/exit the elevator.

Entry/Exit Algorithm

The elevator bank uses a simple algorithm for sequencing the entries and exits of an elevator. If we represent e as the individual entry/exit time, and s as the number of simultaneous entries/exits, then e/s determines the duration from the time that one person may start to enter/exit the elevator to the time a next person may start to enter/exit the elevator. For example, if the entry/exit time is 5 seconds, and the number of simultaneous entries/exits is 2, then there will be a 2.5 second gap between each person starting to exit the elevator. If there are multiple people needing to exit the elevator, starting for example at time 100, then the first person will start to exit at time 100. The second person will start to exit at time 102.5. The third person will start to exit at time 105, when the first person finishes exiting, and so on. In this scenario, where there are for example 5 people needing to exit, the first person will start exiting at time 100, and the last person will finish exiting at time 115.

When exiting/entering, elevators will first have all people exit who are to exit at that floor. Then once all people are finished exiting, people who need to enter will start to enter. In other words, people do not exit and enter simultaneously. Instead, people first exit, then people enter.

Max Speed, Acceleration, Deceleration

Define the speed settings of the elevators in the elevator bank.

Traveler Capacity Usage

Define how much of an elevator's capacity a single traveler takes up. The default is to use the x/y footprint of the traveler plus the x/y footprint of anything the traveler is carrying.

Elevator Capacity

Define the maximum capacity of an elevator. This is defined in whatever units of measure are used in the Traveler Capacity Usage property.

Request List Pull Query

Define the query used by an available elevator to determine the next floor to go to.

The Elevator Bank manages a list of currently active requests. You might think of a specific request as corresponding to a pressed/lighted button at the entrance to an elevator bank, or a pressed/lighted button inside an elevator. When a person arrives at an Elevator Bank, the person will press a button to go either up or down. The pressing of the button creates a new request for an elevator to come to that floor. Also, when a person enters an elevator, s/he presses a button for the destination floor to go to. This creates another new request for that specific elevator to go to the target floor.

The Elevator Bank internally contains a List that references all active requests. When an elevator needs to decide which floor to go to next, it pulls from this list, using the query you define here, and then moves to whichever floor is chosen from the pull operation.

You can view the properties of the request list by pressing Request List Properties... Alternatively you can view the current list of requests by pressing View Request List....

The elevator bank's request list uses custom aliases in defining the request list pull query. Instead of using the default terms value and puller, this list uses the terms request and elevator, since the values of this list are associated with elevator requests, and the pullers of the list are the elevators. Additionally, the request term is of the FlexScript type ElevatorBank.Request and the elevator term is of the type ElevatorBank.Elevator. Thus your pull query can directly use any method or property associated with these interfaces.

The Default Pull Query

The default request list pull query is as follows

WHERE 
  (request.onElevator == 0 OR request.onElevator == elevator)
  AND elevator.canStop(request.floorZ, request.travelDirection)
ORDER BY distance ASC
		

In this default query, the WHERE clause has two criteria. First is the expression (request.onElevator == 0 OR request.onElevator == elevator). Note that a request is like a pressed/lighted button, either inside an elevator or at a floor's entrance to an elevator bank. This expression means that the elevator should only go to a lighted button that is either not on any elevator (request.onElevator == 0, i.e. the button is at a floor, outside any specific elevator) or a button that is on that specific elevator (request.onElevator == elevator). In other words, the elevator should never go to a request that was pushed inside a different elevator.

The second requirement of the where clause is elevator.canStop(request.floorZ, request.travelDirection). This means that the elevator should only take requests that, first, are in the direction that the elevator is currently already going, and second, are far enough ahead of the elevator (if the elevator is currently moving) that the elevator can still stop at the floor, given its current speed and deceleration.

The ORDER BY clause of the default query simply prioritizes the requests that are closest to the elevator.

Bank Elevator

A Bank Elevator, or simply an elevator, is an individual elevator within an elevator bank. You will primarily interface with elevators in an elevator bank through the ElevatorBank and ElevatorBank.Elevator FlexScript interfaces. However, you may also want to listen to an individual elevator's events, or collect state information on it.

Elevator Events

On Floor Arrival

The OnFloorArrival event fires when the elevator arrives at a floor.

It has the following parameters:

Event Parameter Type Explanation
Floor Z double The z location of the floor at which the elevator has arrived.

On Floor Departure

The OnFloorDeparture event fires when the elevator departs a floor.

It has the following parameters:

Event Parameter Type Explanation
Next Floor Z double The z location of the next floor that the elevator is going to.
Last Floor Z double The z location of the floor that the elevator is departing from.

On Idle

The OnIdle event fires when the elevator finishes at a floor and does not find another floor to go to.

This event does not have any associated parameters

On Traveler Entry

The OnTravelerEntry event fires when a traveler enters the elevator.

It has the following parameters:

Event Parameter Type Explanation
Traveler TaskExecuter The traveler that is entering the elevator.

On Traveler Exit

The OnTravelerExit event fires when a traveler exits the elevator.

It has the following parameters:

Event Parameter Type Explanation
Traveler TaskExecuter The traveler that is exiting the elevator.

Elevator General States

The elevator's general state profile uses the following states.

Idle

The elevator is idle and stationary.

Busy

The elevator is currently opening or closing its door.

Loading

Travelers are entering the elevator.

Unloading

Travelers are exiting the elevator.

Travel Empty

The elevator is moving between floors and does not contain any travelers.

Travel Loaded

The elevator is moving between floors and contains one or more travelers.

Elevator Custom Profile States

The elevator includes a custom profile, profile 1, that uses the following states.

Idle

The elevator is idle and stationary.

Opening Door

The elevator is opening its doors.

Closing Door

The elevator is closing its doors.

Exiting Travelers

Travelers are exiting the elevator.

Entering Travelers

Travelers are entering the elevator.

Moving

The elevator is moving to a floor to fulfill a request.

Idle Moving

The elevator is moving to a floor but not to fulfill a request. This state will only be used if you expressly tell the elevator to move to a "home" location when it becomes idle.

Elevator Statistics

The elevator uses the same statistics as a task executer. See Task Executer Concepts - Statistics for an explanation of these statistics.

Traveler Events

A* Travelers that use the elevator bank will also have the following events that you can listen to.

On Elevator Bank Arrival

The OnElevatorBankArrival event fires when the traveler arrives at an elevator bank to move between floors. It is fired at the same time as the elevator bank's OnTravelerArrival event, but here the event is owned by the traveler, not the elevator bank.

It has the following parameters:

Event Parameter Type Explanation
Elevator Bank ElevatorBank The elevator bank that the traveler is arriving at.
Dest Floor Z double The z location of the traveler's destination floor.

On Elevator Entry

The OnElevatorEntry event fires when the traveler enters an elevator. It is fired at the same time as the elevator's OnTravelerEntry event, but here the event is owned by the traveler, not the elevator.

It has the following parameters:

Event Parameter Type Explanation
Elevator ElevatorBank.Elevator The elevator that the traveler is entering.

On Elevator Exit

The OnElevatorExit event fires when the traveler enters an elevator. It is fired at the same time as the elevator's OnTravelerExit event, but here the event is owned by the traveler, not the elevator.

It has the following parameters:

Event Parameter Type Explanation
Elevator ElevatorBank.Elevator The elevator that the traveler is exiting.

On Elevator Bank Continue

The OnElevatorBankContinue event fires when the traveler continues from an elevator bank, resuming normal A* travel. It is fired at the same time as the elevator bank's OnTravelerContinue event, but here the event is owned by the traveler, not the elevator bank.

It has the following parameters:

Event Parameter Type Explanation
Elevator Bank ElevatorBank The elevator bank that the traveler is arriving at.