energia.components.commodities.commodity#

Commodity Base Class

Classes

Commodity([basis, label, citations])

A commodity, can be a material, chemical, energy, etc.

Conversion([aspect, add, sub, operation, ...])

Processes convert one Commodity to another Commodity Conversion provides the conversion of resources

Mapping()

A Mapping is a generic container for associating key/value pairs.

class Commodity(basis: Unit | None = None, label: str = '', citations: str = '', **kwargs)[source]#

Bases: _Component, Mapping

A commodity, can be a material, chemical, energy, etc.

Parameters:
  • label (str, optional) – Label of the commodity, used for plotting. Defaults to None.

  • name (str, optional) – Name of the commodity, used for indexing. Defaults to None.

  • basis (Unit, optional) – Unit basis of the commodity. Defaults to None.

Variables:
  • model (Model) – The model to which the component belongs.

  • name (str) – Set when the component is assigned as a Model attribute.

  • constraints (list[str]) – List of constraints associated with the component.

  • domains (list[Domain]) – List of domains associated with the component.

  • aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.

  • conversions (list[Conversion]) – List of conversions associated with the commodity. Defaults to [].

  • insitu (bool, optional) – If the commodity only exists insitu, i.e., does not scale any domains

property balance: dict[Conversion | Self, int | float]#

Conversion

property I#

gana index set (I)

property cons: list[C]#

Constraints

get(k[, d]) D[k] if k in D, else d.  d defaults to None.#
property horizon: Periods#

Circumscribing Periods (Temporal Scale)

items() a set-like object providing a view on D's items#
keys() a set-like object providing a view on D's keys#
property network: Location#

Circumscribing Loc (Spatial Scale)

property problem: Problem#

Feasible Region

property program: Prg#

Mathematical program

show(descriptive=False, category: str = '')#

Pretty print the component

property space: Space#

Space

property time: Time#

Time

values() an object providing a view on D's values#