Skip to content

Carrier

ancillaries instance-attribute

ancillaries: Iterator[Ancillary]

An instance of RmSystem, called at each DCP to do detruncation / forecasting / optimization

brand_preference instance-attribute

brand_preference: float

control instance-attribute

control: Literal[
    "leg",
    "cabin",
    "theft",
    "bp",
    "bp_loose",
    "vn",
    "lft",
    "none",
]

Control method for this carrier.

cp_algorithm instance-attribute

cp_algorithm: Literal['None', 'BP', 'CBC']

cp_bounds instance-attribute

cp_bounds: float

cp_quantize instance-attribute

cp_quantize: int

cp_scale instance-attribute

cp_scale: float

frat5 instance-attribute

frat5: Frat5 | None

gt_available_seat_miles instance-attribute

gt_available_seat_miles: float

Grand total ASM, gets updated outside the burn period and is not reset by the reset methods

gt_cp_revenue instance-attribute

gt_cp_revenue: float

Grand total of CP revenue

gt_demand instance-attribute

gt_demand: int

Grand total generated demand, gets updated outside the burn period and is not reset by the reset methods

gt_revenue instance-attribute

gt_revenue: float

Grand total revenue, gets updated outside the burn period and is not reset by the reset methods

gt_revenue_passenger_miles instance-attribute

gt_revenue_passenger_miles: float

Grand total RPM, gets updated outside the burn period and is not reset by the reset methods

gt_sold instance-attribute

gt_sold: int

Grand total sold, gets updated outside the burn period and is not reset by the reset methods

load_factor_curve instance-attribute

load_factor_curve: Any | None

name instance-attribute

name: str

revenue instance-attribute

revenue: float

rm_system instance-attribute

rm_system: Any

sold instance-attribute

sold: int

__init__

__init__(
    name: str,
    control: Literal[
        "leg",
        "cabin",
        "theft",
        "bp",
        "bp_loose",
        "vn",
        "none",
    ] = "leg",
)

add_ancillary

add_ancillary(anc: Ancillary)

Add ancillary item, code & price)

add_carrier_history

add_carrier_history(
    trial: int,
    sample: int,
    sold: int,
    sold_priceable: int,
    revenue: float,
) -> None

Add an item to carrier history.

ONLY USED FOR UNIT TESTING

get_ancillary_price

get_ancillary_price(name: str) -> float

get_ancillary_sold

get_ancillary_sold(name: str) -> int

get_carrier_history

get_carrier_history() -> list