Pricing behavior
A pricing behavior defines the strategy under which flights assign prices to seats.
BaseBehaviorModel
dataclass
Bases: PricingModel
Base class for all types of pricing behavior models.
Source code in src/rmlab/data/parametric/pricing_behavior.py
11 12 13 14 15 |
|
RakeBehaviorModel
dataclass
Bases: BaseBehaviorModel
A kind of pricing behavior model in which a set of seat thresholds are used to allocate seats to fares based on the flight occupation. These thresholds can be squeezed with respect to the total flight occupation or shifted up from zero occupation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
zero_shift | float | Per-unit relative displacement of all the thresholds | required |
squeeze | float | Per-unit relative contraction of the all thresholds | required |
Source code in src/rmlab/data/parametric/pricing_behavior.py
17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
RakeEBCBehaviorModel
dataclass
Bases: RakeStraightBehaviorModel
A kind of pricing behavior model in which a set of seat thresholds are derived from an expected booking curve and a confidence level. Derives from RakeStraightBehavior to have default rakes when there is no input data from which the EBC is built.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
confidence | float | Level from which the thresholds slope is derived. | required |
Example
behavior = ExpectedBookingCurveThresholds(confidence=0.95, seats_per_dbd=0.15, zero_shift=0.06, squeeze=0.7)
Source code in src/rmlab/data/parametric/pricing_behavior.py
47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
RakeStraightBehaviorModel
dataclass
Bases: RakeBehaviorModel
A kind of pricing behavior model in which a set of seat thresholds are used to allocate seats to fares based on the flight occupation. These thresholds are straight, in the sense that the seat limits form a straight line with day before departure.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
seats_per_dbd | float | Rate of increase in number of seats per day of all thresholds | required |
Example
behavior = RakeStraightBehaviorModel(seats_per_dbd=0.15, zero_shift=0.06, squeeze=0.7)
Source code in src/rmlab/data/parametric/pricing_behavior.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
make_pricing_behavior_from_json(filename_or_dict)
Make a pricing behavior instance from a json representation (from file or dict).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename_or_dict | Union[str, dict] | JSON filename or dictionary in json format | required |
Examples from dict:
dict_rake_straight_behavior = dic()
dict_rake_straight_behavior["type"] = "rake_straight"
dict_rake_straight_behavior["seats_per_dbd"] = 0.15
dict_rake_straight_behavior["zero_shift"] = 0.06
dict_rake_straight_behavior["squeeze"] = 0.7
my_pricing_rake_straight_behavior = make_from_json(dict_rake_straight_behavior)
Example from file: my_pricing_rake_straight_behavior.json
{
"type" : "rake_straight",
"seats_per_dbd" : 0.15,
"zero_shift" : 0.06,
"squeeze" : 0.7
}
my_pricing_rake_straight_behavior = make_pricing_behavior_from_json("my_pricing_behavior.json")
Source code in src/rmlab/data/parametric/pricing_behavior.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|