energia.dimensions.problem#

Decision Tree

Functions

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

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

Classes

Control(primary_type[, nn, ispos, neg, ...])

Some action to be performed by a component that adjusts a state variable can have a consequence (Impact) or elicit a motion (Stream) that has a consequence (Impact)

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

Point represented by a tuple of indices

Problem(model)

Aspect (Decision) Tree.

cached_property(func)

chain(*iterables)

Return a chain object whose .__next__() method returns elements from the first iterable until it is exhausted, then elements from the next iterable, until all of the iterables are exhausted.

class Problem(model: Model)[source]#

Bases: _Dimension

Aspect (Decision) Tree.

All the aspects are attached to this object.

Parameters:

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

Variables:
  • name (str) – Name of the dimension, generated based on the class and model name.

  • controls (list[Decision]) – List of controls. Defaults to empty list.

  • streams (list[Stream]) – List of streams. Defaults to empty list.

  • consequences (list[Impact]) – List of consequences. Defaults to empty list.

  • players (list[Player]) – List of players. Defaults to empty list.

Note

  • name is generated based on Model name

  • controls, streams, consequences, and players are populated as model is defined

property time: Time[source]#

Time

property space: Space[source]#

Space

property aspects: list[Consequence | Stream | Control | State]#

All Decisions

property domains: list[Domain]#

All Domains

get(keys: Literal['aspects', 'states', 'controls', 'streams', 'consequences', 'domains'] = 'aspects', values: Literal['aspects', 'states', 'controls', 'streams', 'consequences', 'domains'] = 'domains') dict[Aspect | Domain, list[Aspect | Domain]][source]#

Get a dictionary of the tree with a particular structure

Parameters:
  • keys (Literal[ 'aspects', 'states', 'controls', 'streams', 'consequences', 'domains' ], optional) – Keys to use for the dictionary. Defaults to ‘aspects’.

  • values (Literal[ 'aspects', 'states', 'controls', 'streams', 'consequences', 'domains' ], optional) – Values to use for the dictionary. Defaults to ‘domains’.

Returns:

dictionary with particular structure

Return type:

dict[Aspect | Domain, list[Aspect | Domain]]

Raises:

ValueError – If keys is not one of the allowed values

model: Model#