FirstComeFirstServed

class passengersim.rm.specialty_systems.fcfs.FirstComeFirstServed[source]

Bases: RmSys

A first come, first served RM system.

First come first served (FCFS) is a simple method for allocating capacity to customers, and it operates pretty much as you would expect: customers whom arrive first are offered products, no attempt is made to optimize for anything.

This process of capacity allocation will also occur if no RM optimization algorithm is applied, but the explicit system allow the user to be intentional about selecting this algorithm. This intentionality is enforced by PassengerSim, as actually having no RM system is an error. This RM system allows the user to explicitly select a no-optimization RM system.

This RM system does implement leg-level untruncation and forecasting, but does not do any with the resulting forecasts.

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>]

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.