Skip to content

Std Forecasting

StandardLegForecast

Bases: RmAction

Standard leg-level demand forecasting tool.

requires class-attribute instance-attribute

requires: set[str] = {'leg_demand'}

produces class-attribute instance-attribute

produces: set[str] = {'leg_forecast'}

frequency class-attribute instance-attribute

frequency = 'dcp'

algorithm instance-attribute

algorithm = algorithm

Forecasting algorithm.

There are several available forecasting algorithms:

additive_pickup is an additive pickup model, which generates a forecast by considering the "pickup", or the number of new sales in a booking class, in each time period (DCP). This model is additive in that the forecast of demand yet to come at given time is computed as the sum of forecast pickups in all future time periods. This forecasting model does not consider the level of demand already accumulated, only the demand expected in the future. The forecast is made considering the results from the prior 26 sample days. The additive pickup model ignores the value of the alpha parameter, and it can safely be omitted when using this algorithm.

exp_smoothing is an exponential smoothing model. This model uses the alpha parameter to control the amount of smoothing applied. It does not (currently) incorporate trend effects or seasonality.

multiplicative_pickup is a multiplicative pickup model. This model is in development.

alpha instance-attribute

alpha = alpha

Exponential smoothing factor.

This setting is ignored if the forecast algorithm is not "exp_smoothing".

__init__

__init__(
    *,
    algorithm: Literal[
        "additive_pickup",
        "exp_smoothing",
        "multiplicative_pickup",
    ] = "additive_pickup",
    alpha: float = 0.15,
    carrier: str = "",
    minimum_sample: int = 10,
    dcps: Collection[int] = (),
)

run

run(sim: Simulation, days_prior: int)

StandardPathForecast

Bases: RmAction

Standard path-level demand forecasting tool.

requires class-attribute instance-attribute

requires: set[str] = {'path_demand'}

produces class-attribute instance-attribute

produces: set[str] = {'path_forecast'}

frequency class-attribute instance-attribute

frequency = 'dcp'

algorithm instance-attribute

algorithm = algorithm

Forecasting algorithm.

There are several available forecasting algorithms:

additive_pickup is an additive pickup model, which generates a forecast by considering the "pickup", or the number of new sales in a booking class, in each time period (DCP). This model is additive in that the forecast of demand yet to come at given time is computed as the sum of forecast pickups in all future time periods. This forecasting model does not consider the level of demand already accumulated, only the demand expected in the future. The forecast is made considering the results from the prior 26 sample days. The additive pickup model ignores the value of the alpha parameter, and it can safely be omitted when using this algorithm.

exp_smoothing is an exponential smoothing model. This model uses the alpha parameter to control the amount of smoothing applied. It does not (currently) incorporate trend effects or seasonality.

multiplicative_pickup is a multiplicative pickup model. This model is in development.

alpha instance-attribute

alpha = alpha

Exponential smoothing factor.

This setting is ignored if the forecast algorithm is not "exp_smoothing".

__init__

__init__(
    *,
    algorithm: Literal[
        "additive_pickup",
        "exp_smoothing",
        "multiplicative_pickup",
    ] = "additive_pickup",
    alpha: float = 0.15,
    carrier: str = "",
    minimum_sample: int = 10,
    dcps: Collection[int] = (),
)

run

run(sim: Simulation, days_prior: int)

PathForecastDailyDecay

Bases: RmAction

Apply daily decay to path-level demand forecasts.

frequency class-attribute instance-attribute

frequency = 'non_dcp'

__init__

__init__(
    *,
    carrier: str = "",
    minimum_sample: int = 10,
    dcps: Collection[int] = (),
)

run

run(sim: Simulation, days_prior: int)