Skip to content

Demand

base_demand instance-attribute

base_demand: float

business instance-attribute

business: bool

curve_number instance-attribute

curve_number: int

dest instance-attribute

dest: str

distance instance-attribute

distance: float

Market distance.

This is a pass-through attribute of the market object.

fares instance-attribute

fares: Iterator[Fare]

generated_demand instance-attribute

generated_demand: float

gt_demand instance-attribute

gt_demand: float

gt_eliminated_chose_nothing instance-attribute

gt_eliminated_chose_nothing: int

gt_eliminated_no_offers instance-attribute

gt_eliminated_no_offers: int

gt_eliminated_wtp instance-attribute

gt_eliminated_wtp: int

gt_revenue instance-attribute

gt_revenue: float

gt_sold instance-attribute

gt_sold: int

identifier instance-attribute

identifier: str

The unique identifier of this demand, in the form of "orig~dest@segment".

market instance-attribute

market: Market

The market this demand is part of.

orig instance-attribute

orig: str

price instance-attribute

price: float

prob_duration instance-attribute

prob_duration: list[float]

prob_favored_carrier instance-attribute

prob_favored_carrier: dict[str, float]

prob_saturday_night instance-attribute

prob_saturday_night: float

reference_fare instance-attribute

reference_fare: float

revenue instance-attribute

revenue: float

scenario_demand instance-attribute

scenario_demand: float

segment instance-attribute

segment: str

sold instance-attribute

sold: int

unsold instance-attribute

unsold: int

__init__

__init__(
    orig: str | None = None,
    dest: str | None = None,
    segment: str = "",
    base_demand: float = 0,
    scenario_demand: float = 0,
    market: Market | None = None,
)

add_choice_model

add_choice_model(choicemodel: ChoiceModel)

Add a choice model to this market segment

add_curve

add_curve(curve: BookingCurve)

Add a booking curve to this market segment

add_dwm

add_dwm(dwm: DecisionWindow)

Add a DecisionWindow model to this market segment

add_fare

add_fare(fare: Fare)

Add a fare to this market segment

add_group_sizes

add_group_sizes(group_sizes: list[float])

Group sizes is an array of proportions, i.e [0.5, 0.4, 0.1] has 40% of bookings with 2 passengers

add_path

add_path(path: Path)

Add an itinerary path to this market segment

get_carrier_revenue

get_carrier_revenue(carrier_code: str)

Get revenue for the specified carrier code

get_carrier_sold

get_carrier_sold(carrier_code: str)

Get sold for the specified carrier code

get_demand_dcp

get_demand_dcp(dcp: int)

Get demand for the specified DCP

get_min_elapsed_time

get_min_elapsed_time() -> int

Find the shortest elapsed time across all paths