energia.modeling.parameters.conversion#
Conversion
Classes
|
Processes convert one Commodity to another Commodity Conversion provides the conversion of resources |
|
A number of temporal Periods. |
|
A Mapping is a generic container for associating key/value pairs. |
|
Represents a discrete choice to be taken within a spatiotemporal disposition. |
|
Piece Wise Linear Conversion |
|
- class Conversion(aspect: str = '', add: str = '', sub: str = '', operation: Operation | Storage | None = None, resource: Commodity | None = None, balance: dict[Commodity, float | list[float]] | None = None, hold: int | float | None = None, attr_name: str = '', symbol: str = 'η', use_max_time: bool = False)[source]#
Bases:
Mapping,_HashProcesses convert one Commodity to another Commodity Conversion provides the conversion of resources
- Parameters:
- Variables:
name (str) – Name of the component, generated based on the operation.
base (Commodity) – Basis Commodity, usually has a value 1 in the conversion matrix, set using __call__. Defaults to None.
conversion (dict[Commodity : int | float]) – {Commoditys: conversion}. Defaults to {}, set using __eq__.
lag (Lag) – Temporal lag (processing time) for conversion, set using __getitem__.
periods (Periods) – Periods over which the conversion is defined. Defaults to None.
- Raises:
ValueError – If conversion lists are of inconsistent lengths.
Note
name and operation are generated post init
base (__call__), conversion (__eq__), lag (__getitem__) are defined as the program is built
Storage contains two processes (charge and discharge), hence is provided separately
- classmethod from_balance(balance: dict[Commodity, float | list[float]], by: str = '', add: str = '', sub: str = '', operation: Operation | None = None, basis: Commodity | None = None) Self[source]#
Creates Conversion from balance dict
- property name: str#
Name
- balancer()[source]#
Checks if there is a list in the conversion If yes, tries to make everything consistent
- time_checker(commodity: Commodity, space: Location | Linkage, time: Periods)[source]#
This checks if it is actually necessary to write conversion at denser temporal scales
- write(space: Location | Linkage, time: Periods | Lag, modes: Modes | None = None)[source]#
Writes equations for conversion balance
- get(k[, d]) D[k] if k in D, else d. d defaults to None.#
- class PWLConversion(conversions: list[Conversion], sample: Sample, aspect: str = '', add: str = '', sub: str = '')[source]#
Bases:
Mapping,_HashPiece Wise Linear Conversion
- classmethod from_balance(balance: dict[Modes, Conversion], sample: Sample) Self[source]#
Creates PWLConversion from balance dict
- property aspect: str#
- property add: str#
- property sub: str#
- property lag: str#
- property name: str#
Name
- write(space: Location | Linkage, time: Periods | Lag)[source]#
Writes equations for conversion balance
- get(k[, d]) D[k] if k in D, else d. d defaults to None.#