energia.dimensions.problem#
Decision Tree
Functions
|
Add dunder methods based on the fields defined in the class. |
Classes
|
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) |
|
Point represented by a tuple of indices |
|
Aspect (Decision) Tree. |
|
|
|
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:
_DimensionAspect (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 aspects: list[Consequence | Stream | Control | State]#
All Decisions
- 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:
- Raises:
ValueError – If keys is not one of the allowed values