Class Passenger

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

public class Passenger extends Object implements Serializable
Represents an individual agent utilizing a vertical transportation system. Tracks waiting time, transit time, and movement through various logical states of a trip. * @version 2.0
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • Passenger

      public Passenger(int sourceFloor, int destinationFloor)
      Initializes a new passenger with a specific travel intent.
      Parameters:
      sourceFloor - the index of the floor where the passenger starts
      destinationFloor - the index of the target floor
      Throws:
      IllegalArgumentException - if source and destination are identical
  • Method Details

    • getId

      public String getId()
    • getSourceFloor

      public int getSourceFloor()
    • getDestinationFloor

      public int getDestinationFloor()
    • getState

      public Passenger.State getState()
    • getWaitTicks

      public int getWaitTicks()
      Returns:
      the number of simulation ticks spent waiting outside a cab
    • getTravelTicks

      public int getTravelTicks()
      Returns:
      the number of simulation ticks spent inside a cab
    • setState

      public void setState(Passenger.State state)
    • tick

      public void tick()
      Advances the passenger's internal timers based on current state.
    • getCurrentElevator

      public Elevator getCurrentElevator()
    • setElevator

      public void setElevator(Elevator elevator)
    • toString

      public String toString()
      Overrides:
      toString in class Object