Class LiftBuilding

java.lang.Object
org.episteme.social.architecture.lift.LiftBuilding
All Implemented Interfaces:
Serializable

public class LiftBuilding extends Object implements Serializable
Represents a logical building structure containing a vertical transportation system. It manages the group control logic (dispatching) and maintains passenger queues for each floor.

Dispatching logic utilizes an Estimated Time of Arrival (ETA) calculation to minimize average waiting time.

Reference: Barney, G. C. (2003). Elevator Traffic Handbook: Theory and Practice.

* @version 2.0
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • LiftBuilding

      public LiftBuilding(String name, int minFloor, int maxFloor)
      Initializes a new building with a specific floor range.
      Parameters:
      name - common name for the building
      minFloor - the lowest floor index (e.g., -1 for basement)
      maxFloor - the highest floor index
  • Method Details

    • addElevator

      public void addElevator(Elevator elevator)
      Integrates an elevator cabin into the building's control system.
      Parameters:
      elevator - the cabin unit to add
    • hallCall

      public void hallCall(int floor, Elevator.Direction direction)
      Processes a floor call from outside the elevator cabs. Selects the optimal cab based on distance and current workload (ETA heuristic).
      Parameters:
      floor - the floor index of the call
      direction - intended direction (UP or DOWN)
    • addPassenger

      public void addPassenger(Passenger p)
      Introduces a passenger into the building's waiting area.
      Parameters:
      p - the passenger to add
    • tick

      public void tick()
      Progresses the entire building simulation by one time step.
    • getName

      public String getName()
    • getMinFloor

      public int getMinFloor()
    • getMaxFloor

      public int getMaxFloor()
    • getElevators

      public List<Elevator> getElevators()