E

class passengersim.rm.standard_systems.E[source]

Bases: RmSys

RM system using standard forecasting and EMSR-B.

This RM system uses leg-level seat allocation controls with EMSR-B optimization, along with EM untruncation and standard leg forecasting.

Parameters:
emsr_variant : {'b', 'a'}, default='b'

Specifies which variant of the EMSR algorithm to use, either ‘b’ for EMSR-B, or ‘a’ for EMSR-A. At this time only ‘b’ is supported.

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’.

exp_smoothing_alpha : float, default 0.15

Specifies the alpha parameter to use for exponential smoothing. This parameter is only used if the forecast_algorithm is set to ‘exp_smoothing’. The default value is 0.15.

Notes

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

  1. EM Untruncation of Leg Demands

    This step applies the EM algorithm to detruncate observed leg 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 Leg Forecasting

    This step generates leg-level demand forecasts using a standard class-based forecasting algorithm (additive pickup by default). It runs full computations to produce leg 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. EMSR-B Optimization

    Optimizes leg-level seat availability using the Expected Marginal Seat Revenue Version B (EMSR-B) algorithm. This step runs on each DCP to update the seat availability controls based on the current leg forecasts, current sales, and the EMSR 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 leg-level class allocation 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] = 'leg'

This RM system uses leg-level class allocation availability controls.

actions : list[RmActionFactory | type[RmAction]] = [<class 'passengersim.rm.untruncation.LegUntruncation'>, <passengersim.rm._common.RmActionFactory object>, <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.