Class EconomyInfo

java.lang.Object
org.deltava.beans.econ.EconomyInfo
All Implemented Interfaces:
Serializable

public class EconomyInfo extends Object implements Serializable
A bean to store information about simulated economic cycles.
Since:
3.7
Version:
11.2
Author:
Luke
See Also:
  • Constructor Details

    • EconomyInfo

      public EconomyInfo(double target, double amp)
      Initializes the economy. The amplitude cannot exceed one half of the difference between the target load and either 1 or 0.
      Parameters:
      target - the target load factor between 0 and 1
      amp - the target amplitude
  • Method Details

    • getTargetLoad

      public double getTargetLoad()
      Returns the airline-wide target load.
      Returns:
      the target load factor between 0 and 1
    • getMinimumLoad

      public double getMinimumLoad()
      Returns the minimum load factor for a flight.
      Returns:
      the load factor between 0 and 1
    • getAmplitude

      public double getAmplitude()
      Returns the target load amplitude.
      Returns:
      the amplitude
    • getStartDate

      public Instant getStartDate()
      Returns the airline start date.
      Returns:
      the start date
    • getCyclesPerYear

      public double getCyclesPerYear()
      Returns the frequency of the yearly oscilation.
      Returns:
      the number of cycles per year
    • getCycleLength

      public int getCycleLength()
      Returns the cycle length in days.
      Returns:
      the cycle length
    • setStartDate

      public void setStartDate(Instant dt)
      Updates the airline start date. The time component will be cleared.
      Parameters:
      dt - the start date/time
    • setMinimumLoad

      public void setMinimumLoad(double load)
      Updates the minimum load factor for a flight.
      Parameters:
      load - the load factor between 0 and 1
    • setCyclesPerYear

      public void setCyclesPerYear(double hz)
      Sets the frequency of the yearly oscilation.
      Parameters:
      hz - the number of cycles per year
    • setCycleLength

      public void setCycleLength(int days)
      Sets the yearly cycle length.
      Parameters:
      days - the number of days per cycle
    • toString

      public String toString()
      Overrides:
      toString in class Object