Forecasting
Forecasting is a key part of revenue management systems. You need to know how many customers of each type you should expect, so you can tailor the set of products being offered to maximize revenue.
In PassengerSim, forecasting is included as a step within an RM system, typically after untruncation and before any optimization.
from passengersim.rm.emsr import ExpectedMarginalSeatRevenue
from passengersim.rm.standard_forecasting import StandardLegForecast
from passengersim.rm.systems import RmSys, RmSysOption, register_rm_system
from passengersim.rm.untruncation import LegUntruncation
@register_rm_system
class E(RmSys):
actions = [
LegUntruncation,
StandardLegForecast.configure( #(1)!
algorithm=RmSysOption("forecast_algorithm", default="additive_pickup"), #(2)!
alpha=RmSysOption(
"exp_smoothing_alpha", expected_type=float, default=0.15
),
),
ExpectedMarginalSeatRevenue.configure(
variant=RmSysOption("emsr_variant", default="b"),
),
]
- The forecaster (in this example, a standard leg forecast) is included as a
step here. Selected options are passed to it via the
configuremethod, which allows options to be set from the RM system configuration. - The configurable option name for the RM system is specified here as
"forecast_algorithm", to clarify its purpose. The attribute being controlled on theStandardLegForecastis simplyalgorithm, which is clear within the context of forecast step alone, but potentially ambiguous in the context of the RM system as a whole.
StandardLegForecast
Bases: RmAction
Standard leg-level demand forecasting tool.
algorithm
instance-attribute
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.
StandardPathForecast
Bases: RmAction
Standard path-level demand forecasting tool.
algorithm
instance-attribute
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.