energia.modeling.indices.domain#

Domain

Functions

dataclass([cls, init, repr, eq, order, ...])

Add dunder methods based on the fields defined in the class.

field(*[, default, default_factory, init, ...])

Return an object to identify dataclass fields.

is_(a, b, /)

Same as a is b.

is_not(a, b, /)

Same as a is not b.

Classes

Domain(indicator, commodity, process, ...)

Point represented by a tuple of indices

cached_property(func)

class Domain(indicator: Indicator | None = None, commodity: Commodity | None = None, process: Process | None = None, storage: Storage | None = None, transport: Transport | None = None, player: Player | None = None, couple: Interact | None = None, location: Location | None = None, linkage: Linkage | None = None, periods: Periods | None = None, lag: Lag | None = None, modes: Modes | None = None, samples: list[Sample] = <factory>)[source]#

Bases: _Hash

Point represented by a tuple of indices

Parameters:
  • indicator (Indicator | None) – Indicates the impact of some activity through an equivalency, e.g. GWP, ODP.

  • commodity (Commodity | None) – Represents the flow of any stream, measured using some basis, e.g. water, Rupee, carbon-dioxide.

  • process (Process | None) – Process that is being considered, e.g. dam, farming.

  • storage (Storage | None) – Storage that is being considered, e.g. reservoir.

  • transport (Transport | None) – Transport that is being considered, e.g. pipeline, road.

  • player (Player | None) – Actor that takes decisions, e.g. me, you.

  • couple (Couple | None) – Other actor that might be paired with the player.

  • location (Location | None) – Spatial aspect of the domain, e.g. Goa, Texas.

  • linkage (Linkage | None) – Linkage aspect of the domain, e.g. pipeline, road.

  • periods (Periods | None) – Temporal aspect of the domain, e.g. year, month.

  • lag (Lag | None) – Indicates whether the temporal element is lagged or not.

  • modes (Modes | None) – Modes applicable to the domain.

  • samples (list[Bind] | None) – List of samples that can be summed over.

Variables:

model (Model) – Model to which the Domain belongs.

indicator: Indicator | None = None#
commodity: Commodity | None = None#
process: Process | None = None#
storage: Storage | None = None#
transport: Transport | None = None#
player: Player | None = None#
couple: Interact | None = None#
location: Location | None = None#
linkage: Linkage | None = None#
periods: Periods | None = None#
lag: Lag | None = None#
modes: Modes | None = None#
samples: list[Sample]#
property stream: Indicator | Commodity | None#

Stream

property operation: Process | Storage | Transport | None#

Operation

property primary: Indicator | Commodity | Process | Storage | Transport | list[Sample]#

Primary component

property sample: Sample | None#

Sample

property space: Location | Linkage | None#

Space

property maker: Player | Interact | None#

Decision-maker

property time: Periods | Lag#

Time

property linked: bool#

Linked

property lagged: bool#

Lagged

property isroot: bool#

This implies that the domain is of the form <object, space, time>

property isrootroot: bool#

This implies that the domain is of the form <object, network, horizon> Thus, an element attached to this domain has the lowest possible dimensionality

property disposition: tuple[str, ...]#

Disposition

property name#

Name

property idxname#

Name of the index

property index: list[Aspect | _X]#

list of _Index elements

property index_primary: list[Indicator | Commodity | Process | Storage | Transport]#

Primary index

Returns:

list of primary indices

Return type:

list[X]

property index_spatiotemporal: list[Aspect | _X]#

List of indices with modes

Returns:

list of indices with modes

Return type:

list[X]

property index_binds: list[Aspect | _X]#

List of bind indices

Returns:

list of bind indices

Return type:

list[X]

property index_modes: list[Modes]#

Set of mode indices

property index_short: list[Indicator | Commodity | Process | Storage | Transport | Sample | Modes]#

Set of indices

property tree: dict#

Convert index into tree

property aspects: list[Aspect]#

Aspects

property args: dict[str, Indicator | Commodity | Player | Process | Storage | Transport | Location | Linkage | Periods | Lag | Modes | list[Sample] | None]#

Dictionary of indices

property dictionary: dict[str, Indicator | Commodity | Process | Storage | Transport | Player | Location | Linkage | Periods | Lag | Modes | list[Sample] | None]#

Dictionary of Components

property tup#

Tuple of objects

property lst#

Tuple of objects

property I: list[Idx | list[V]][source]#

List of I

property size: int#

Size of the domain

inform_components_of_cons(cons_name: str)[source]#

Update the constraints declared at every index

inform_components_of_domain(aspect: Aspect)[source]#

Update all components in the domains with the aspects that they have been modeled in

Parameters:

aspect (Aspect) – Aspect being modeled

copy() Self[source]#

Make a copy of self

edit(what: dict[str, _X]) Self[source]#

Change some aspects and return a new Domain

param_tree(parameter: float | list[float], rel: str) dict[source]#

Tree representation of the Domain