Skip to content

aeromaps.models.air_transport.aircraft_fleet_and_operations.fleet.fleet_model

fleet_model

Module for modeling aircraft fleet composition and renewal over time.

This module provides data structures and models for representing aircraft fleets, including individual aircraft, subcategories (e.g., narrow-body, wide-body), and categories (e.g., short-range, medium-range, long-range). It supports fleet evolution modeling using S-shaped logistic functions for aircraft market share transitions, and computes energy consumption, emissions (NOx, soot), and operating costs based on fleet composition.

The module uses YAML configuration files to define aircraft inventories and fleet structures, allowing flexible customization of fleet scenarios.

AircraftParameters dataclass

AircraftParameters(entry_into_service_year=None, consumption_evolution=None, nox_evolution=None, soot_evolution=None, doc_non_energy_evolution=None, cruise_altitude=None, hybridization_factor=0.0, ask_year=None, nrc_cost=None, rc_cost=None, oew=None, full_name=None)

Parameters defining an aircraft's characteristics and performance.

Attributes:

Name Type Description
entry_into_service_year Optional[float]

Year when the aircraft enters service [yr].

consumption_evolution Optional[float]

Relative change in energy consumption compared to reference aircraft [%].

nox_evolution Optional[float]

Relative change in NOx emissions compared to reference aircraft [%].

soot_evolution Optional[float]

Relative change in soot emissions compared to reference aircraft [%].

doc_non_energy_evolution Optional[float]

Relative change in non-energy direct operating costs compared to reference aircraft [%].

cruise_altitude Optional[float]

Typical cruise altitude of the aircraft [m].

hybridization_factor float

Degree of hybridization for hybrid-electric aircraft, from 0 (conventional) to 1 (fully electric) [-].

ask_year Optional[float]

Average number of Available Seat Kilometers produced per aircraft per year [ASK/yr].

nrc_cost Optional[float]

Non-recurring costs (development costs) [€].

rc_cost Optional[float]

Recurring costs (manufacturing cost per unit) [€].

oew Optional[float]

Operational Empty Weight of the aircraft [t].

full_name Optional[str]

Full qualified name including category and subcategory path.

ReferenceAircraftParameters dataclass

ReferenceAircraftParameters(energy_per_ask=None, emission_index_nox=None, emission_index_soot=None, doc_non_energy_base=None, entry_into_service_year=None, cruise_altitude=None, hybridization_factor=0.0, ask_year=None, nrc_cost=None, rc_cost=None, oew=None, full_name=None)

Parameters defining a reference aircraft used as baseline for comparisons.

Reference aircraft serve as the baseline against which new aircraft performance improvements are measured. Each subcategory has an "old" and a "recent" reference.

Attributes:

Name Type Description
energy_per_ask Optional[float]

Energy consumption per Available Seat Kilometer [MJ/ASK].

emission_index_nox Optional[float]

NOx emission index per ASK [kg/ASK].

emission_index_soot Optional[float]

Soot emission index per ASK [kg/ASK].

doc_non_energy_base Optional[float]

Base non-energy direct operating cost per ASK [€/ASK].

entry_into_service_year Optional[float]

Year when the reference aircraft entered service [yr].

cruise_altitude Optional[float]

Typical cruise altitude of the aircraft [m].

hybridization_factor float

Degree of hybridization, from 0 (conventional) to 1 (fully electric) [-].

ask_year Optional[float]

Average number of Available Seat Kilometers produced per aircraft per year [ASK/yr].

nrc_cost Optional[float]

Non-recurring costs (development costs) [€].

rc_cost Optional[float]

Recurring costs (manufacturing cost per unit) [€].

oew Optional[float]

Operational Empty Weight of the aircraft [t].

full_name Optional[str]

Full qualified name including category and subcategory path.

SubcategoryParameters dataclass

SubcategoryParameters(share=None)

Parameters for an aircraft subcategory.

Attributes:

Name Type Description
share Optional[float]

Market share of this subcategory within its parent category [%].

CategoryParameters dataclass

CategoryParameters(life, limit=2)

Parameters for an aircraft category.

Attributes:

Name Type Description
life float

Average operational lifetime of aircraft in this category [yr].

limit float

Lower threshold for market share below which aircraft share is set to zero [%] (needed for S-curve parametrization).

Aircraft

Aircraft(name=None, parameters=None, energy_type='DROP_IN_FUEL')

Bases: object

Represents an individual aircraft type in the fleet.

An aircraft belongs to a subcategory and has parameters that define its performance relative to a reference aircraft.

Parameters:

Name Type Description Default
name str

Name identifier for the aircraft type.

None
parameters AircraftParameters

Aircraft performance and cost parameters.

None
energy_type

Type of energy used: 'DROP_IN_FUEL', 'HYDROGEN', 'ELECTRIC', or 'HYBRID_ELECTRIC'.

'DROP_IN_FUEL'

Attributes:

Name Type Description
name str

Name identifier for the aircraft type.

parameters AircraftParameters

Aircraft performance and cost parameters.

energy_type str

Type of energy used by the aircraft.

Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
205
206
207
208
209
210
211
212
213
214
215
def __init__(
    self,
    name: str = None,
    parameters: AircraftParameters = None,
    energy_type="DROP_IN_FUEL",
):
    self.name = name
    if parameters is None:
        parameters = AircraftParameters()
    self.parameters = parameters
    self.energy_type = energy_type

from_dataframe_row

from_dataframe_row(row)

Populate aircraft attributes from a DataFrame row.

Parameters:

Name Type Description Default
row

DataFrame row containing aircraft data with columns matching AIRCRAFT_COLUMNS.

required

Returns:

Type Description
Aircraft

Self, with attributes populated from the row data.

Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
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
def from_dataframe_row(self, row):
    """Populate aircraft attributes from a DataFrame row.

    Parameters
    ----------
    row
        DataFrame row containing aircraft data with columns matching AIRCRAFT_COLUMNS.

    Returns
    -------
    Aircraft
        Self, with attributes populated from the row data.
    """
    self.name = row[AIRCRAFT_COLUMNS[0]]
    self.parameters.entry_into_service_year = row[AIRCRAFT_COLUMNS[1]]
    self.parameters.consumption_evolution = row[AIRCRAFT_COLUMNS[2]]
    self.parameters.nox_evolution = row[AIRCRAFT_COLUMNS[3]]
    self.parameters.soot_evolution = row[AIRCRAFT_COLUMNS[4]]
    self.parameters.doc_non_energy_evolution = row[AIRCRAFT_COLUMNS[5]]
    self.parameters.cruise_altitude = row[AIRCRAFT_COLUMNS[6]]
    self.energy_type = row[AIRCRAFT_COLUMNS[7]]
    self.parameters.hybridization_factor = row[AIRCRAFT_COLUMNS[8]]
    self.parameters.ask_year = row[AIRCRAFT_COLUMNS[9]]
    self.parameters.rc_cost = row[AIRCRAFT_COLUMNS[10]]
    self.parameters.nrc_cost = row[AIRCRAFT_COLUMNS[11]]
    self.parameters.oew = row[AIRCRAFT_COLUMNS[12]]

    return self

SubCategory

SubCategory(name=None, parameters=None)

Bases: object

Represents a subcategory of aircraft within a category.

Subcategories group similar aircraft types (e.g., conventional narrow-body, hydrogen narrow-body) within a category. Each subcategory has reference aircraft (old and recent) that serve as baselines for performance comparisons.

Parameters:

Name Type Description Default
name Optional[str]

Name identifier for the subcategory.

None
parameters Optional[SubcategoryParameters]

Subcategory parameters including market share.

None

Attributes:

Name Type Description
name str

Name identifier for the subcategory.

parameters SubcategoryParameters

Subcategory parameters including market share.

aircraft Dict[int, Aircraft]

Dictionary of aircraft belonging to this subcategory.

old_reference_aircraft ReferenceAircraftParameters

Parameters for the older reference aircraft baseline.

recent_reference_aircraft ReferenceAircraftParameters

Parameters for the more recent reference aircraft baseline.

Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
275
276
277
278
279
280
281
282
283
284
def __init__(
    self,
    name: Optional[str] = None,
    parameters: Optional[SubcategoryParameters] = None,
):
    self.name = name
    self.parameters = parameters or SubcategoryParameters()
    self.aircraft: Dict[int, Aircraft] = {}
    self.old_reference_aircraft = ReferenceAircraftParameters()
    self.recent_reference_aircraft = ReferenceAircraftParameters()

add_aircraft

add_aircraft(aircraft)

Add an aircraft to this subcategory.

Parameters:

Name Type Description Default
aircraft Aircraft

Aircraft instance to add to the subcategory.

required
Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
286
287
288
289
290
291
292
293
294
def add_aircraft(self, aircraft: Aircraft) -> None:
    """Add an aircraft to this subcategory.

    Parameters
    ----------
    aircraft
        Aircraft instance to add to the subcategory.
    """
    self.aircraft[len(self.aircraft)] = aircraft

remove_aircraft

remove_aircraft(aircraft_name)

Remove an aircraft from this subcategory by name.

Parameters:

Name Type Description Default
aircraft_name str

Name of the aircraft to remove.

required
Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
296
297
298
299
300
301
302
303
304
305
306
307
308
309
def remove_aircraft(self, aircraft_name: str) -> None:
    """Remove an aircraft from this subcategory by name.

    Parameters
    ----------
    aircraft_name
        Name of the aircraft to remove.
    """
    self.aircraft = {
        i: aircraft
        for i, aircraft in enumerate(
            [a for a in self.aircraft.values() if a.name != aircraft_name]
        )
    }

compute

compute()

Execute compute method on all aircraft in the subcategory.

Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
311
312
313
314
315
316
def compute(self) -> None:
    """Execute compute method on all aircraft in the subcategory."""
    for aircraft in self.aircraft.values():
        compute_method = getattr(aircraft, "compute", None)
        if callable(compute_method):
            compute_method()

Category

Category(name, parameters)

Bases: object

Represents a category of aircraft in the fleet (e.g., Short Range, Medium Range).

Categories group subcategories of aircraft that operate in similar market segments. Each category has parameters defining aircraft lifetime and market share thresholds.

Parameters:

Name Type Description Default
name str

Name identifier for the category (e.g., 'Short Range', 'Medium Range', 'Long Range').

required
parameters CategoryParameters

Category parameters including aircraft lifetime.

required

Attributes:

Name Type Description
name str

Name identifier for the category.

parameters CategoryParameters

Category parameters including aircraft lifetime.

subcategories Dict[int, SubCategory]

Dictionary of subcategories within this category.

total_shares float

Sum of all subcategory market shares (should equal 100%).

Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
344
345
346
347
348
def __init__(self, name: str, parameters: CategoryParameters):
    self.name = name
    self.parameters = parameters
    self.subcategories: Dict[int, SubCategory] = {}
    self.total_shares = 0.0

add_subcategory

add_subcategory(subcategory)

Add a subcategory to this category.

Parameters:

Name Type Description Default
subcategory SubCategory

SubCategory instance to add.

required
Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
356
357
358
359
360
361
362
363
364
def add_subcategory(self, subcategory: SubCategory) -> None:
    """Add a subcategory to this category.

    Parameters
    ----------
    subcategory
        SubCategory instance to add.
    """
    self.subcategories[len(self.subcategories)] = subcategory

remove_subcategory

remove_subcategory(subcategory_name)

Remove a subcategory from this category by name.

Parameters:

Name Type Description Default
subcategory_name str

Name of the subcategory to remove.

required
Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
def remove_subcategory(self, subcategory_name: str) -> None:
    """Remove a subcategory from this category by name.

    Parameters
    ----------
    subcategory_name
        Name of the subcategory to remove.
    """
    self.subcategories = {
        i: subcat
        for i, subcat in enumerate(
            [sub for sub in self.subcategories.values() if sub.name != subcategory_name]
        )
    }
    self._check_shares()

Fleet

Fleet(parameters=None, aircraft_inventory_path=None, fleet_config_path=None)

Bases: object

Represents the complete aircraft fleet structure.

The Fleet class manages the hierarchical structure of aircraft categories, subcategories, and individual aircraft types. It loads configuration from YAML files and provides methods for fleet manipulation and display.

Parameters:

Name Type Description Default
parameters

External parameters used for reference aircraft calibration (e.g., energy shares).

None
aircraft_inventory_path Optional[Path]

Path to the YAML file containing the aircraft inventory definitions. Defaults to the package's default aircraft inventory.

None
fleet_config_path Optional[Path]

Path to the YAML file containing the fleet structure configuration. Defaults to the package's default fleet configuration.

None

Attributes:

Name Type Description
categories Dict[str, Category]

Dictionary of aircraft categories indexed by category name.

parameters

External parameters for reference aircraft calibration.

aircraft_inventory_path Path

Path to the aircraft inventory YAML file.

fleet_config_path Path

Path to the fleet configuration YAML file.

all_aircraft_elements dict

Flattened dictionary of all aircraft elements per category.

Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
def __init__(
    self,
    parameters=None,
    aircraft_inventory_path: Optional[Path] = None,
    fleet_config_path: Optional[Path] = None,
):
    self._categories: Dict[str, Category] = {}
    self.parameters = parameters
    self.aircraft_inventory_path = (
        Path(aircraft_inventory_path)
        if aircraft_inventory_path is not None
        else DEFAULT_AIRCRAFT_INVENTORY_CONFIG_FILE
    )
    self.fleet_config_path = (
        Path(fleet_config_path) if fleet_config_path is not None else DEFAULT_FLEET_CONFIG_FILE
    )

    self._build_default_fleet()
    self.all_aircraft_elements = self.get_all_aircraft_elements()

categories property writable

categories

Dict[str, Category]: Dictionary of aircraft categories.

compute

compute()

Execute compute on all categories in the fleet.

Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
449
450
451
452
def compute(self):
    """Execute compute on all categories in the fleet."""
    for cat in self.categories.values():
        cat._compute()

get_all_aircraft_elements

get_all_aircraft_elements()

Retrieve all aircraft elements organized by category.

Creates a flattened view of all aircraft in the fleet, including reference aircraft, with their full qualified names set.

Returns:

Type Description
dict

Dictionary mapping category names to lists of aircraft elements (reference aircraft parameters and Aircraft instances).

Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
def get_all_aircraft_elements(self):
    """Retrieve all aircraft elements organized by category.

    Creates a flattened view of all aircraft in the fleet, including reference
    aircraft, with their full qualified names set.

    Returns
    -------
    dict
        Dictionary mapping category names to lists of aircraft elements
        (reference aircraft parameters and Aircraft instances).
    """
    all_aircraft_elements = {}

    for category in self.categories.values():
        if not category.subcategories:
            continue

        aircraft_per_category = []
        subcategory = category.subcategories[0]

        ref_old_aircraft_name = f"{category.name}:{subcategory.name}:old_reference"
        subcategory.old_reference_aircraft.full_name = ref_old_aircraft_name
        aircraft_per_category.append(subcategory.old_reference_aircraft)

        ref_recent_aircraft_name = f"{category.name}:{subcategory.name}:recent_reference"
        subcategory.recent_reference_aircraft.full_name = ref_recent_aircraft_name
        aircraft_per_category.append(subcategory.recent_reference_aircraft)

        for subcategory in category.subcategories.values():
            for aircraft in subcategory.aircraft.values():
                aircraft_name = f"{category.name}:{subcategory.name}:{aircraft.name}"
                aircraft.parameters.full_name = aircraft_name
                aircraft_per_category.append(aircraft)

        all_aircraft_elements[category.name] = aircraft_per_category

    return all_aircraft_elements

pretty_print

pretty_print(include_aircraft=True, indent=2, display=True, absolute=False, reference='recent')

Return (and optionally print) a summary of the fleet.

Parameters:

Name Type Description Default
include_aircraft bool

Whether to list individual aircraft under each subcategory.

True
indent int

Number of spaces used for indentation when printing nested entries.

2
display bool

If True, print the generated summary; otherwise only return the string.

True
absolute bool

When True, convert aircraft deltas (consumption, DOC, NOx, soot) into absolute values using the selected reference aircraft as the baseline.

False
reference str

Which reference aircraft to use for absolute conversions; accepts "recent" (default) or "old". If the requested reference is missing, the method falls back to the other available reference.

'recent'
Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
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
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
def pretty_print(
    self,
    include_aircraft=True,
    indent=2,
    display=True,
    absolute=False,
    reference="recent",
):
    """Return (and optionally print) a summary of the fleet.

    Parameters
    ----------
    include_aircraft : bool
        Whether to list individual aircraft under each subcategory.
    indent : int
        Number of spaces used for indentation when printing nested entries.
    display : bool
        If True, print the generated summary; otherwise only return the string.
    absolute : bool
        When True, convert aircraft deltas (consumption, DOC, NOx, soot) into
        absolute values using the selected reference aircraft as the baseline.
    reference : str
        Which reference aircraft to use for absolute conversions; accepts
        "recent" (default) or "old". If the requested reference is missing,
        the method falls back to the other available reference.
    """

    reference_mode = reference.lower()
    if reference_mode not in {"recent", "old"}:
        raise ValueError("reference must be 'recent' or 'old'")

    def _format_value(label, value, suffix=""):
        if value is None:
            return None
        if isinstance(value, float) and value.is_integer():
            value = int(value)
        return f"{label}={value}{suffix}"

    def _format_absolute(label, base_value, delta_percent, unit=""):
        if base_value is None or delta_percent is None:
            return None
        absolute_value = base_value * (1 + delta_percent / 100.0)
        return f"{label}={absolute_value:.4g}{unit}"

    def _format_reference_line(label, reference_obj):
        if reference_obj is None:
            return None
        bits = list(
            filter(
                None,
                [
                    _format_value("EIS", reference_obj.entry_into_service_year, " y"),
                    _format_value("energy/ASK", reference_obj.energy_per_ask, " MJ/ASK"),
                    _format_value("DOC", reference_obj.doc_non_energy_base, " €/ASK"),
                    _format_value("NOx", reference_obj.emission_index_nox, " kg/ASK"),
                    _format_value("soot", reference_obj.emission_index_soot, " kg/ASK"),
                ],
            )
        )
        descriptor = ", ".join(bits) if bits else "no data"
        return f"{level_two}- {label} reference ({descriptor})"

    def _select_base_reference(subcategory):
        preferred = (
            subcategory.recent_reference_aircraft
            if reference_mode == "recent"
            else subcategory.old_reference_aircraft
        )
        fallback = (
            subcategory.old_reference_aircraft
            if reference_mode == "recent"
            else subcategory.recent_reference_aircraft
        )
        return preferred or fallback

    def _format_aircraft_line(aircraft, base_reference=None):
        params = aircraft.parameters or AircraftParameters()
        if absolute and base_reference is not None:
            bits = list(
                filter(
                    None,
                    [
                        aircraft.energy_type or "UNKNOWN",
                        _format_value("EIS", params.entry_into_service_year, "y"),
                        _format_absolute(
                            "energy/ASK",
                            base_reference.energy_per_ask,
                            params.consumption_evolution,
                            " MJ/ASK",
                        ),
                        _format_absolute(
                            "DOC",
                            base_reference.doc_non_energy_base,
                            params.doc_non_energy_evolution,
                            " €/ASK",
                        ),
                        _format_absolute(
                            "NOx",
                            base_reference.emission_index_nox,
                            params.nox_evolution,
                            " kg/ASK",
                        ),
                        _format_absolute(
                            "soot",
                            base_reference.emission_index_soot,
                            params.soot_evolution,
                            " kg/ASK",
                        ),
                    ],
                )
            )
        else:
            bits = list(
                filter(
                    None,
                    [
                        aircraft.energy_type or "UNKNOWN",
                        _format_value("EIS", params.entry_into_service_year, "y"),
                        _format_value("cons", params.consumption_evolution, "%"),
                        _format_value("NOx", params.nox_evolution, "%"),
                        _format_value("soot", params.soot_evolution, "%"),
                        _format_value("DOC", params.doc_non_energy_evolution, "%"),
                    ],
                )
            )
        descriptor = ", ".join(bits) if bits else "no data"
        return f"{level_two}- {aircraft.name} ({descriptor})"

    lines = []
    indent = max(indent, 0)
    level_one = " " * indent
    level_two = " " * (indent * 2)

    if not self.categories:
        lines.append("Fleet has no categories configured.")
    for category in self.categories.values():
        subcategories = list(category.subcategories.values())
        share_sum = sum(float(sub.parameters.share or 0.0) for sub in subcategories)
        meta_bits = []
        if category.parameters is not None:
            if category.parameters.life is not None:
                meta_bits.append(f"life={category.parameters.life:g}y")
            if category.parameters.limit is not None:
                meta_bits.append(f"limit={category.parameters.limit:g}")
        meta_bits.append(f"subcategories={len(subcategories)}")
        if subcategories:
            meta_bits.append(f"share_sum={share_sum:.1f}%")
        category_header = f"{category.name} ({', '.join(meta_bits)})"
        lines.append(category_header)

        for subcategory in subcategories:
            share_value = subcategory.parameters.share if subcategory.parameters else None
            share_str = f"{share_value:.1f}%" if share_value is not None else "n/a"
            aircraft_count = len(subcategory.aircraft)
            sub_line = (
                f"{level_one}- {subcategory.name} "
                f"(share={share_str}, aircraft={aircraft_count})"
            )
            lines.append(sub_line)

            # Reference aircraft details
            ref_old_line = _format_reference_line("old", subcategory.old_reference_aircraft)
            if ref_old_line:
                lines.append(ref_old_line)
            ref_recent_line = _format_reference_line(
                "recent", subcategory.recent_reference_aircraft
            )
            if ref_recent_line:
                lines.append(ref_recent_line)

            if include_aircraft and aircraft_count:
                base_reference = _select_base_reference(subcategory) if absolute else None
                for aircraft in subcategory.aircraft.values():
                    lines.append(_format_aircraft_line(aircraft, base_reference=base_reference))

    output = "\n".join(lines)
    if display:
        print(output)
    return output

FleetModel

FleetModel(name='fleet_model', fleet=None, *args, **kwargs)

Bases: AeroMAPSModel

AeroMAPS model for computing fleet evolution and characteristics over time.

This model computes the temporal evolution of the aircraft fleet composition, including market shares for each aircraft type, energy consumption, emissions (NOx, soot), and non-energy direct operating costs. It uses S-shaped logistic functions to model the gradual introduction and retirement of aircraft types.

Parameters:

Name Type Description Default
name

Name of the model instance ('fleet_model' by default).

'fleet_model'
fleet

Fleet instance containing the fleet structure and aircraft definitions.

None
*args

Additional positional arguments passed to parent class.

()
**kwargs

Additional keyword arguments passed to parent class.

{}

Attributes:

Name Type Description
fleet Fleet

The Fleet instance used for computations.

Notes

The model computes several categories of outputs stored in self.df:

  • Single aircraft shares: Individual aircraft cumulative market penetration
  • Aircraft shares: Actual market share for each aircraft type
  • Energy consumption: Energy per ASK by subcategory and energy type
  • DOC non-energy: Non-energy direct operating costs by subcategory
  • Non-CO2 emissions: NOx and soot emission indices by subcategory
  • Category means: Weighted averages across subcategories for each category
Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
1056
1057
1058
def __init__(self, name="fleet_model", fleet=None, *args, **kwargs):
    super().__init__(name, *args, **kwargs)
    self.fleet = fleet

compute

compute()

Compute fleet evolution and all derived metrics.

Executes the complete fleet model computation pipeline:

  1. Single aircraft share computation (cumulative S-curve penetration)
  2. Aircraft share computation (differential market shares)
  3. Energy consumption and share by energy type
  4. Non-energy direct operating costs (DOC)
  5. Non-CO2 emission indices (NOx, soot)
  6. Category-level mean energy consumption
  7. Category-level mean DOC
  8. Category-level mean emission indices

Returns:

Type Description
ndarray

Dummy output array (actual results stored in self.df).

Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
def compute(
    self,
):
    """Compute fleet evolution and all derived metrics.

    Executes the complete fleet model computation pipeline:

    1. Single aircraft share computation (cumulative S-curve penetration)
    2. Aircraft share computation (differential market shares)
    3. Energy consumption and share by energy type
    4. Non-energy direct operating costs (DOC)
    5. Non-CO2 emission indices (NOx, soot)
    6. Category-level mean energy consumption
    7. Category-level mean DOC
    8. Category-level mean emission indices

    Returns
    -------
    np.ndarray
        Dummy output array (actual results stored in self.df).
    """
    # Start from empty dataframe (necessary for multiple runs of the model)
    self.df = pd.DataFrame(index=self.df.index)

    # Compute single aircraft shares
    self._compute_single_aircraft_share()

    # Compute aircraft shares
    self._compute_aircraft_share()

    # Compute energy consumption and share per subcategory with respect to energy type
    self._compute_energy_consumption_and_share_wrt_energy_type()

    # Compute non energy direct operating costs (DOC) and share per subcategory with respect to energy type
    self._compute_doc_non_energy()

    # Compute non-CO2 (NOx and soot) emission index and share per subcategory with respect to energy type
    self._compute_non_co2_emission_index()

    # Compute mean energy consumption per category with respect to energy type
    self._compute_mean_energy_consumption_per_category_wrt_energy_type()

    # Compute mean non energy direct operating cost (DOC) per category with respect to energy type
    self._compute_mean_doc_non_energy()

    # Compute mean non-CO2 emission index per category with respect to energy type
    self._compute_mean_non_co2_emission_index()

plot

plot()

Generate fleet renewal visualization plots.

Creates a 2-row matplotlib figure with one column per category. The top row shows stacked area plots of aircraft shares over time, including old reference, recent reference, and new aircraft types. The bottom row shows the evolution of mean fleet energy consumption.

The plot displays data from prospection_start_year to end_year. Aircraft shares are shown as cumulative (stacked) areas, while energy consumption is shown as a line plot.

Source code in aeromaps/models/air_transport/aircraft_fleet_and_operations/fleet/fleet_model.py
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
def plot(self):
    """Generate fleet renewal visualization plots.

    Creates a 2-row matplotlib figure with one column per category.
    The top row shows stacked area plots of aircraft shares over time,
    including old reference, recent reference, and new aircraft types.
    The bottom row shows the evolution of mean fleet energy consumption.

    The plot displays data from prospection_start_year to end_year.
    Aircraft shares are shown as cumulative (stacked) areas, while
    energy consumption is shown as a line plot.
    """
    x = np.linspace(
        self.prospection_start_year,
        self.end_year,
        self.end_year - self.prospection_start_year + 1,
    )

    categories = list(self.fleet.categories.values())

    f, axs = plt.subplots(2, len(categories), figsize=(20, 10))

    for i, category in enumerate(categories):
        # Top plot
        ax = axs[0, i]

        # Initial subcategory
        subcategory = category.subcategories[0]
        # Old reference aircraft
        var_name = (
            category.name + ":" + subcategory.name + ":" + "old_reference:single_aircraft_share"
        )
        ax.fill_between(
            x,
            self.df.loc[self.prospection_start_year : self.end_year, var_name],
            label=subcategory.name + " - Old reference aircraft",
        )

        # Recent reference aircraft
        var_name = (
            category.name
            + ":"
            + subcategory.name
            + ":"
            + "recent_reference:single_aircraft_share"
        )
        ax.fill_between(
            x,
            self.df.loc[self.prospection_start_year : self.end_year, var_name],
            label=subcategory.name + " - Recent reference aircraft",
        )

        for j, subcategory in category.subcategories.items():
            # New aircraft
            for aircraft in subcategory.aircraft.values():
                var_name = (
                    category.name
                    + ":"
                    + subcategory.name
                    + ":"
                    + aircraft.name
                    + ":single_aircraft_share"
                )
                ax.fill_between(
                    x,
                    self.df.loc[self.prospection_start_year : self.end_year, var_name],
                    label=subcategory.name + " - " + aircraft.name,
                )

        ax.set_xlim(self.prospection_start_year, self.end_year)
        ax.set_ylim(0, 100)
        ax.legend(loc="upper left", prop={"size": 8})
        ax.set_xlabel("Year")
        ax.set_ylabel("Share in fleet [%]")
        ax.set_title(categories[i].name)

        # Bottom plot
        ax = axs[1, i]
        ax.plot(
            x,
            self.df.loc[
                self.prospection_start_year : self.end_year,
                category.name + ":energy_consumption",
            ],
        )

        ax.set_xlim(self.prospection_start_year, self.end_year)
        ax.set_xlabel("Year")
        ax.set_ylabel("Fleet mean energy consumption [MJ/ASK]")
        # ax.set_title(categories[i].name)

    plt.plot()