Frat5Curve

class passengersim.config.Frat5Curve[source]

Bases: Named

Fare Ratio at which 50% of customers will buy up to a higher fare.

This is expressed as a curve, because the ratio generally changes over the booking horizon, because the mixture of customer types changes as the departure date approaches.

Attributes:

enforce_monotonic

Enforce monotonicity of Frat 5 curves.

curve

Define a Frat5 curve.

max_cap

Maximum Q-equivalent demand implied by any unit of demand in any fare class.

enforce_monotonic : bool

Enforce monotonicity of Frat 5 curves.

Typically it is expected that the Frat5 curve is monotonic, i.e. that the average willingness to pay only increases as the departure date approaches. It is easy to accidentally define the Frat5 curve “backwards”, and thus PassengerSim will check that the Frat5 curve is monotonically increasing by default. To violate this assumption, set enforce_monotonic to False, which will disable the check that the Frat5 curve is monotonic.

curve : dict[int, float]

Define a Frat5 curve.

To be consistent with the econometric interpretation of the Frat5 curve, the values should increase as the keys (DCPs, e.g. days to departure) decrease. This implies that average willingness to pay increases as the departure date approaches.

Example

- name: curve_C
  curve:
    63: 1.4
    56: 1.4
    49: 1.5
    42: 1.5
    35: 1.6
    31: 1.7
    28: 1.8
    24: 1.9
    21: 2.3
    17: 2.7
    14: 3.2
    10: 3.3
    7: 3.4
    5: 3.4
    3: 3.5
    1: 3.5
max_cap : float

Maximum Q-equivalent demand implied by any unit of demand in any fare class.

This cap is applied only on the recording of Q-equivalent demand that occurs within the simulation engine itself, and not as part of any RM step. Simulation-recorded Q-equivalent demand can be used by RM steps, such as within PODS-like hybrid forecasting models, but the max-cap filter transform is implicitly already baked in to the Q-equivalent demand before the RM step can use it.

This can be contrasted against a max_cap parameter used in the RM step, which can applied against observed demand within the RM step, but the RM step receives the “raw” sales data, without adulteration by the simulation engine.

name : str