Skip to content

Office Tower

In this logistics model, we simulate an office tower. There are N lifts with capacity limited cars. Passengers arrive at different floors with different rates and press buttons indicating the direction of their target floor. The cars have a defined speed, and clearly it takes time to open/close its doors before passengers can enter & leave.


  • Origin/destination distribution of visitors
  • Number of elevators
  • Capacity of each elevator
  • Number of floors
  • Times for moving between floors, for opening/closing doors, and for passenger to move or out a car


See Elevator.kt for the implementation.

The implementation is adopted from salabim's elevator example.


The following diagram shows the key players of the model. The diagram was automatically created using Intellij's UML capabilities.

The simulation environment is modelled in Elevator. Multiple VisitorGenerators produce Visitors at different rates. Each visitor has a target Floor, which defines the button (up or down) she is pressing to request a car. Cars - i.e. the elevator cabins - are the workhorse of the model. They have a fixed capacity, a current occupancy, a current floor and a state for the door. The cars and the visitors have associated process definitions to drive the dynamics of the model.

Process Animation

The model was also animated (source) to illustrate the power of kalasim's animation API.