Technology
¶
Bases: BaseModel
Represent a technology with region, year, and a flexible set of parameters.
Attributes:
-
name(str) –Name of the technology.
-
detailed_technology(str) –More detailed technology name.
-
case(str) –Case or scenario identifier.
-
region(str) –Region identifier.
-
year(int) –Year of the data.
-
parameters(Dict[str, Parameter]) –Dictionary of parameter names to Parameter objects.
Methods:
-
__getitem__–Access a parameter by name.
-
__setitem__–Set a parameter by name.
-
adjust_region–Adjust technology parameters to match a different region.
-
adjust_scale–Scale parameter values by a scaling factor.
-
calculate_parameters–Calculate missing or derived parameters.
-
check_consistency–Check for consistency and completeness of parameters.
-
to_currency–Adjust the currency of all parameters of the technology to the target currency.
detailed_technology
instance-attribute
¶
detailed_technology: Annotated[str, Field(description='Detailed technology name.')]
parameters
instance-attribute
¶
parameters: Annotated[dict[str, Parameter], Field(default_factory=dict, description='Parameters.')]
__getitem__
¶
__getitem__(key: str) -> Parameter
Access a parameter by name.
Parameters:
-
key(str) –Parameter name.
Returns:
-
Parameter–The requested parameter.
__setitem__
¶
__setitem__(key: str, value: Parameter) -> None
Set a parameter by name.
Parameters:
-
key(str) –Parameter name.
-
value(Parameter) –The parameter to set.
adjust_region
¶
adjust_region(target_region: str) -> Self
Adjust technology parameters to match a different region.
Parameters:
-
target_region(str) –The target region.
Returns:
-
Technology–A new Technology object with adjusted region.
adjust_scale
¶
adjust_scale(scaling_factor: float) -> Self
Scale parameter values by a scaling factor.
Parameters:
-
scaling_factor(float) –The scaling factor to apply.
Returns:
-
Technology–A new Technology object with scaled parameters.
calculate_parameters
¶
calculate_parameters(parameters: Any | None = None) -> Self
Calculate missing or derived parameters.
Parameters:
-
parameters(Optional[Any], default:None) –List of parameter names to calculate, or "
" for all missing.
Returns:
-
Technology–A new Technology object with calculated parameters.
check_consistency
¶
check_consistency() -> bool
Check for consistency and completeness of parameters.
Returns:
-
bool–True if consistent, False otherwise.
to_currency
¶
to_currency(target_currency: str, overwrite_country: None | str = None, source: str = 'worldbank') -> Self
Adjust the currency of all parameters of the technology to the target currency.
The conversion includes inflation and exchange rates based on the object's region.
If a different country should be used for inflation adjustment, use overwrite_country.
Parameters:
-
target_currency(str) –The target currency (e.g., 'EUR_2020').
-
overwrite_country(str, default:None) –ISO 3166 alpha-3 country code to use for inflation adjustment instead of the object's region.
-
source(str, default:'worldbank') –The source of the inflation data, either "worldbank"/"wb" or "international_monetary_fund"/"imf". Defaults to "worldbank". Depending on the source, different years to adjust for inflation may be available.
Returns:
-
Technology–A new Technology object with all its parameters adjusted to the target currency.