Skip to content

Technology

Bases: BaseModel


              flowchart TD
              technologydata.technology.Technology[Technology]

              

              click technologydata.technology.Technology href "" "technologydata.technology.Technology"
            

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:

  • __contains__ –

    Check if a parameter exists.

  • __delitem__ –

    Delete a parameter by name.

  • __getitem__ –

    Access a parameter by name.

  • __setitem__ –

    Set a parameter by name.

  • __str__ –

    Return a compact human-readable summary of the Technology.

  • adjust_region –

    Adjust technology parameters to match a different region.

  • adjust_scale –

    Scale parameter values by a scaling factor.

  • calculate_parameters –

    Derive missing parameters using registered equations.

  • check_consistency –

    Check equation-level consistency for selected parameters.

  • to_currency –

    Adjust the currency of all parameters of the technology to the target currency.

case instance-attribute

case: Annotated[str, Field(description='Case or scenario identifier.')]

detailed_technology instance-attribute

detailed_technology: Annotated[str, Field(description='Detailed technology name.')]

name instance-attribute

name: Annotated[str, Field(description='Name of the technology.')]

parameters instance-attribute

parameters: Annotated[dict[str, Parameter], Field(default_factory=dict, description='Parameters.')]

region instance-attribute

region: Annotated[str, Field(description='Region identifier.')]

year instance-attribute

year: Annotated[int, Field(description='Year of the data.')]

__contains__

__contains__(key: str) -> bool

Check if a parameter exists.

Parameters:

  • key (str) –

    Parameter name.

Returns:

  • bool –

    True if the parameter exists, False otherwise.

__delitem__

__delitem__(key: str) -> None

Delete a parameter by name.

Parameters:

  • key (str) –

    Parameter name.

__getitem__

__getitem__(key: str) -> Parameter

Access a parameter by name.

Parameters:

  • key (str) –

    Parameter name.

Returns:

__setitem__

__setitem__(key: str, value: Parameter) -> None

Set a parameter by name.

Parameters:

  • key (str) –

    Parameter name.

  • value (Parameter) –

    The parameter to set.

__str__

__str__() -> str

Return a compact human-readable summary of the Technology.

Returns:

  • str –

    Summary with name, region, year, case, and parameter names.

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(targets: str | list[str] | None = None, equation_names: dict[str, str] | None = None) -> Self

Derive missing parameters using registered equations.

Parameters:

  • targets (str or list of str, default: None ) –

    Parameter names to derive. If None, all parameters that can be derived from currently available parameters (and are not already present) are calculated automatically.

  • equation_names (dict of str to str, default: None ) –

    Mapping of parameter name to equation name, used to override the default equation for specific targets (e.g. {"eac": "eac_simple"}).

Returns:

  • Technology –

    A new Technology instance with the derived parameters added.

Raises:

  • ValueError –

    If a requested target has no applicable equation, required parameters are missing, or input currencies are inconsistent.

check_consistency

check_consistency(parameters: Sequence[str] | None = None, equations: EquationRegistry | None = None, rtol: float = 1e-06, atol: float = 1e-09) -> dict[str, bool | str]

Check equation-level consistency for selected parameters.

If parameters is given, only equations linked to those parameters are checked and other parameters are ignored. If parameters is None, all parameters present on this technology are checked.

If equations is not provided, the package default registry is used.

Returns a mapping from equation name to status:

  • True if values are consistent with the equation.
  • False if values violate the equation.
  • "missing parameters" followed by the list of missing parameters to evaluate the equation, e.g. "missing parameters: ['wacc', 'lifetime']".
  • "inapplicable" if none of the equations parameters are present, followed by the list of these missing parameters, e.g. "inapplicable: ['specific_investment', 'annuity_factor']".

Only equations that share at least one parameter with the checked parameter set appear in the result. If parameters is given explicitly and names a parameter with no registered equation at all, a :class:ValueError is raised.

Parameters:

  • parameters (Sequence[str] | None, default: None ) –

    The parameters to check for consistency. If None are specified, all parameters of the Technology are considered.

  • equations (EquationRegistry | None, default: None ) –

    A registry of equations to check against. Defaults to technologydata.equation_registry.

  • rtol (float, default: 1e-06 ) –

    Relative tolerance to use for checking consistency of the parameters.

  • atol (float, default: 1e-09 ) –

    Absolute tolerance to use for checking consistency of the parameters.

Returns:

  • dict[str, bool | str] –

    Consistency status per checked equation.

Raises:

  • ValueError –

    If parameters is given explicitly and includes a name for which no equation is registered.

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.