aeromaps.models.air_transport.air_traffic.rpk_market¶
rpk_market¶
Per-market RPK models for use when a MarketManager is loaded.
Three classes:
RPKMeasuresMarket— sigmoid demand-reduction factor for one market.RPKMarket— CAGR+COVID recovery RPK for one market.RPKReferenceMarket— reference RPK trajectory for one market.
All use model_type="custom" (AeroMAPSCustomModelWrapper). Input/output
names are built from the market id at construction time, so no custom_setup
hook is required.
RPKMeasuresMarket ¶
RPKMeasuresMarket(name, market_id, *args, **kwargs)
Bases: AeroMAPSModel
Sigmoid demand-reduction impact for one passenger market.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Discipline name. |
required |
market_id
|
str
|
Market identifier (e.g. |
required |
Source code in aeromaps/models/air_transport/air_traffic/rpk_market.py
38 39 40 41 42 43 44 45 46 47 48 49 | |
compute ¶
compute(input_data)
Compute demand-reduction multiplier for one passenger market.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_data
|
dict
|
Inputs for final impact, start year, and duration. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Output dictionary with the measures impact series. |
Source code in aeromaps/models/air_transport/air_traffic/rpk_market.py
51 52 53 54 55 56 57 58 59 60 61 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 | |
RPKMarket ¶
RPKMarket(name, market_id, output_suffix='', *args, **kwargs)
Bases: AeroMAPSModel
CAGR-based RPK growth with COVID recovery for one passenger market.
Reads per-market parameters flattened from markets.yaml by
_initialize_markets():
<mid>_rpk_share_last_historical_year<mid>_cagr_reference_periods/<mid>_cagr_reference_periods_values<mid>_covid_drop_start_year,<mid>_covid_end_year,<mid>_covid_end_year_reference_ratio<mid>_measures_impact(output ofRPKMeasuresMarket)covid_start_year(global, fromparameters.json)rpk_init(global historical series)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Discipline name. |
required |
market_id
|
str
|
Market identifier. |
required |
output_suffix
|
str
|
Appended to all output names. Used in cost-feedback mode to publish the
baseline trajectory as |
''
|
Source code in aeromaps/models/air_transport/air_traffic/rpk_market.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
compute ¶
compute(input_data)
Compute per-market RPK with CAGR, COVID recovery, and measures impact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_data
|
dict
|
Inputs containing market shares, CAGR references, and COVID settings. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Output series for market RPK and growth metrics. |
Source code in aeromaps/models/air_transport/air_traffic/rpk_market.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
RPKAggregator ¶
RPKAggregator(name, passenger_market_ids, output_suffix='', *args, **kwargs)
Bases: AeroMAPSModel
Sum per-market RPKs into a single total rpk consumed by downstream models.
Also computes total annual_growth_rate_passenger, cagr_rpk, and
prospective_evolution_rpk so legacy downstream disciplines need no changes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Discipline name. |
required |
passenger_market_ids
|
list of str
|
Ordered list of passenger market ids. |
required |
output_suffix
|
str
|
Appended to |
''
|
Source code in aeromaps/models/air_transport/air_traffic/rpk_market.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | |
compute ¶
compute(input_data)
Aggregate per-market RPK and compute growth metrics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_data
|
dict
|
Inputs containing per-market RPK and reference series. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Output totals and growth metrics for passenger RPK. |
Source code in aeromaps/models/air_transport/air_traffic/rpk_market.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | |
RPKReferenceMarket ¶
RPKReferenceMarket(name, market_id, *args, **kwargs)
Bases: AeroMAPSModel
Reference RPK trajectory for one passenger market.
Reads the historical RPK directly from the exogenous rpk_init series
(split by <mid>_rpk_share_last_historical_year) rather than from the post-elasticity
rpk_<mid> output. This keeps the counterfactual branch out of the MDA
coupling graph in cost-feedback mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Discipline name. |
required |
market_id
|
str
|
Market identifier. |
required |
Source code in aeromaps/models/air_transport/air_traffic/rpk_market.py
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | |
compute ¶
compute(input_data)
Compute reference RPK trajectory for one passenger market.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_data
|
dict
|
Inputs containing market RPK, CAGR reference, and COVID settings. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Output series for reference RPK and its growth rate. |
Source code in aeromaps/models/air_transport/air_traffic/rpk_market.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | |
RPKElasticity ¶
RPKElasticity(name, passenger_market_ids, *args, **kwargs)
Bases: AeroMAPSModel
Global price-elasticity layer for cost-feedback mode.
Sits between the no-elasticity baseline (RPKMarket + RPKAggregator
with _no_elasticity suffix) and the downstream consumers of rpk /
rpk_<mid>. The elasticity multiplier is global — computed once from
aggregate airfare — and applied to every market proportionally, identical
to the redistribution step in the legacy RPKWithElasticity.
The cycle rpk → airfare_per_rpk → rpk is closed by GEMSEO's MDA: this
discipline reads airfare_per_rpk (output of the cost chain) and writes
rpk (input of the cost chain).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Discipline name. |
required |
passenger_market_ids
|
list of str
|
Ordered list of passenger market ids. |
required |
Source code in aeromaps/models/air_transport/air_traffic/rpk_market.py
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | |
compute ¶
compute(input_data)
Apply the global elasticity multiplier to baseline RPK trajectories.
The multiplier is (airfare / initial_airfare)**price_elasticity
clamped to 1 up to (and including) the latest per-market
covid_end_year — matching legacy RPKWithElasticity which
treated historic and COVID-recovery years as exogenous.
Each market's baseline is multiplied by the same scalar series;
the total is the sum.
Source code in aeromaps/models/air_transport/air_traffic/rpk_market.py
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | |