Class LoadFactor
java.lang.Object
org.deltava.beans.econ.LoadFactor
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleCalculates a load factor for a flight.doublegetTargetLoad(Instant dt) Returns the target load factor for a date.
-
Constructor Details
-
LoadFactor
Initializes the load factor calculator.- Parameters:
info- an EconomyInfo bean
-
-
Method Details
-
getTargetLoad
Returns the target load factor for a date.- Parameters:
dt- the date/time- Returns:
- a load factor between 0 and 1
-
generate
Calculates a load factor for a flight.- Parameters:
dt- the flight date/time- Returns:
- a load factor between 0 and 1
-