Class LoadFactor

java.lang.Object
org.deltava.beans.econ.LoadFactor

public class LoadFactor extends Object
A utility class to calculate flight passenger load factors. The target load factor per day changes hourly. It is calculated using a sine wave based around an airline-wide target load factor, the cycle length and the maximum amplitude. There is a secondary load factor which moves in 360-minute cycles.
Since:
3.7
Version:
11.2
Author:
Luke
  • Constructor Details

    • LoadFactor

      public LoadFactor(EconomyInfo info)
      Initializes the load factor calculator.
      Parameters:
      info - an EconomyInfo bean
  • Method Details

    • getTargetLoad

      public double getTargetLoad(Instant dt)
      Returns the target load factor for a date.
      Parameters:
      dt - the date/time
      Returns:
      a load factor between 0 and 1
    • generate

      public double generate(Instant dt)
      Calculates a load factor for a flight.
      Parameters:
      dt - the flight date/time
      Returns:
      a load factor between 0 and 1