P

class passengersim.rm.standard_systems.P[source]

Bases: RmSys

RM system using standard path-level forecasting and ProBP.

This RM system uses path-level bid price controls with probabilistic bid price (ProBP) optimization, along with EM untruncation and standard leg forecasting.

Parameters:
forecast_algorithm : {'additive_pickup', 'exp_smoothing', 'multiplicative_pickup'}, default 'additive_pickup'

Specifies which leg-level forecasting algorithm to use for generating leg demand forecasts. Options are ‘additive_pickup’, ‘exp_smoothing’, or ‘multiplicative_pickup’. The default is ‘additive_pickup’.

bid_price_vector : bool, default True

If True, enables bid price vector optimization in ProBP. If False, uses scalar bid prices.

sub_bp : bool, default False

If True, use SubBP instead of ProBP. Under ProBP the revenue from a connecting fare is prorated among the legs to determine the displacement cost, while for SubBP the displacement costs for each leg are found by using the bid prices from the other legs directly without proration.

Notes

This RM system consists of the following actions executed in order:

  1. EM Untruncation of Path Demands

    This step applies the EM algorithm to detruncate observed path sales into inferred true demand levels. It runs only once at the beginning of each sample day, and detruncates demand for all timeframes.

  2. Standard Path Forecasting

    This step generates path-level demand forecasts using a standard class-based forecasting algorithm (additive pickup by default). It runs full computations to produce path forecasts for the entire booking horizon in one pass at the beginning of each sample day, and on later DCPs it simply moves a pointer forward through that array of forecasts to provide the correct forecast values at that time.

  3. Path Forecast Daily Decay Adjustment

    This step applies a daily decay adjustment to the path-level forecasts, to account for the changes in expected demand to come in between DCPs. It runs every day that isn’t a DCP, to adjust the path forecasts accordingly.

  4. ProBP Optimization

    Optimizes path-level bid prices using the Probabilistic Bid Price (ProBP) algorithm. This step runs every day, to update the bid price controls based on the current path forecasts, current sales, and the ProBP optimization logic.

Initialize the RM system.

Parameters:
carrier : str

The carrier code for which this RM system is configured.

cfg : Config, optional

The top level configuration object for the simulation, which is also used to help initialize this system. For example, the collection of data collection points (DCPs) given as days prior to departure, is used for steps that have a frequency of “DCP” to identify which days to run.

**kwargs

Additional keyword arguments to configure the RM actions in this system.

Raises:

ValueError – If availability_control is not defined, or if no actions are defined, or if any provided keyword argument does not match any action’s configuration options.

Attributes

availability_control

This RM system uses bid price availability controls.

actions

List of RM actions (or action factories) to execute in this RM system.

availability_control : Literal['leg', 'cabin', 'bp', 'bp_loose', 'classless', None] = 'bp'

This RM system uses bid price availability controls.

actions : list[RmActionFactory | type[RmAction]] = [<class 'passengersim.rm.untruncation.PathUntruncation'>, <passengersim.rm._common.RmActionFactory object>, <class 'passengersim.rm.standard_forecasting.PathForecastDailyDecay'>, <passengersim.rm._common.RmActionFactory object>]

List of RM actions (or action factories) to execute in this RM system.

Each item in this list should be either an RmActionFactory instance, or an RmAction subclass. If an RmAction subclass is provided, its configure() class method will be called to create an RmActionFactory with no configurable parameters.

Subclasses of RmSys must set this class variable to a non-empty list of actions to be executed in order when this RM system runs.