aeromaps.models.yaml_interpolator¶
YAML Interpolator Model for AeroMAPS¶
This module defines a generic interpolation model that can be used in AeroMAPS to interpolate values based on user-defined reference years and values specified in a YAML configuration file.
YAMLInterpolator ¶
YAMLInterpolator(name, custom_data_type, *args, **kwargs)
Bases: AeroMAPSModel
Generic interpolation model called each time an AeroMapsCustomDataType is used in the YAML configuration file of generic energy models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the model instance. |
required |
custom_data_type
|
AeroMapsCustomDataType
|
Custom data type instance containing interpolation parameters. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
input_names |
dict
|
Dictionary of input variable names populated at model initialisation before MDA chain creation. |
output_names |
dict
|
Dictionary of output variable names populated at model initialisation before MDA chain creation. |
Source code in aeromaps/models/yaml_interpolator.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
compute ¶
compute(input_data)
Execute the interpolation based on input data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_data
|
Dictionary containing all input data required for the computation, completed at model instantiation with information from yaml.. |
required |
Returns:
| Type | Description |
|---|---|
output_data
|
Dictionary containing all output data resulting from the computation. Contains outputs defined during model instantiation. |
Source code in aeromaps/models/yaml_interpolator.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 | |