aeromaps.models.impacts.generic_energy_model.common.energy_carriers_manager¶
EnergyCarrierMetadata
dataclass
¶
EnergyCarrierMetadata(name=None, aircraft_type=None, default=False, mandate_type=None, energy_origin=None, resources_used=None, resources_used_processes=None, cost_model=None, environmental_model=None)
Dataclass to hold metadata for an energy carrier.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Name of the energy carrier. |
aircraft_type |
str
|
Type of aircraft the energy carrier is associated with. |
default |
bool
|
Indicates if this is the default energy carrier for the aircraft type. |
mandate_type |
str
|
Type of mandate the energy carrier obeys to (share, volume) |
energy_origin |
str
|
Origin of the energy (e.g., renewable, fossil). |
resources_used |
List[str]
|
List of resources used by the energy carrier. |
resources_used_processes |
dict
|
Dictionary mapping resources used by associated processes. |
cost_model |
str
|
Type of cost model used (e.g., top-down, bottom-up). |
environmental_model |
str
|
Type of environmental model used (e.g., top-down, bottom-up). |
EnergyCarrierManager ¶
EnergyCarrierManager(carriers=None)
Manager class to handle a collection of energy carriers and provide methods to add and retrieve them based on various criteria.
Attributes:
| Name | Type | Description |
|---|---|---|
carriers |
List[EnergyCarrierMetadata]
|
List of energy carrier metadata instances. |
Initialize the EnergyCarrierManager with an optional list of energy carriers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
carriers
|
List[EnergyCarrierMetadata]
|
Initial list of energy carrier metadata instances. |
None
|
Source code in aeromaps/models/impacts/generic_energy_model/common/energy_carriers_manager.py
53 54 55 56 57 58 59 60 61 62 | |
add ¶
add(carrier)
Add a new energy carrier to the manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
carrier
|
EnergyCarrierMetadata
|
Energy carrier metadata instance to add. |
required |
Source code in aeromaps/models/impacts/generic_energy_model/common/energy_carriers_manager.py
64 65 66 67 68 69 70 71 72 73 | |
get ¶
get(**criteria)
Retrieve energy carriers that match all specified criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
criteria
|
Keyword arguments used to match attributes of energy carriers; only carriers matching all provided criteria are returned. |
{}
|
Returns:
| Type | Description |
|---|---|
matches
|
Energy carrier metadata instances that match the given criteria. |
Source code in aeromaps/models/impacts/generic_energy_model/common/energy_carriers_manager.py
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 | |
get_all ¶
get_all()
Return all energy carriers managed by this object.
Returns:
| Type | Description |
|---|---|
carriers
|
All energy carrier metadata instances stored in the manager. |
Source code in aeromaps/models/impacts/generic_energy_model/common/energy_carriers_manager.py
102 103 104 105 106 107 108 109 110 111 | |
get_all_types ¶
get_all_types(parameter)
Retrieve unique values of a specified attribute across all energy carriers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter
|
str
|
Name of the attribute to aggregate unique values for. |
required |
Returns:
| Type | Description |
|---|---|
values
|
Unique values of the specified parameter across all energy carriers. |
Source code in aeromaps/models/impacts/generic_energy_model/common/energy_carriers_manager.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |