energia.modeling.variables.aspect#
Variable
Functions
|
Add dunder methods based on the fields defined in the class. |
|
Convert nested dict to level-wise compact structure, merging repeated keys at all levels. |
Classes
|
A particular facet of the system under consideration. |
|
alias of |
|
A commodity, can be a material, chemical, energy, etc. |
|
Point represented by a tuple of indices |
|
Impact Indicator |
|
Interaction between Players |
|
A number of temporal Periods. |
|
Linkage between two Locations. |
|
A discretization of Space. |
|
alias of |
|
Represents a discrete choice to be taken within a spatiotemporal disposition. |
|
A discretization of Time. |
|
Player or Actor, the one taking the decisions based on information provided |
|
Process converts one Resource to another Resource at some Location |
|
Sets a bound on a variable (V) within a particular domain. |
|
Spatial representation of the system. |
|
Storage is a container for three main elements: 1. |
|
Temporal representation of a system. |
|
Exports Resource through Link basically, moves Resources between Locations |
|
- class Aspect(primary_type: Type[_Component] | tuple[Type[_Component], ...], nn: bool = True, ispos: bool = True, neg: str = '', latex: str = '', bound: str = '', label: str = '', use_multiplier: bool = False)[source]#
Bases:
objectA particular facet of the system under consideration. A sample of an aspect at a specific disposition is represented by a variable (\(\overset{\*}{v} \in \overset{\*}{\mathcal{V}}\)). The range of values which the \(\overset{\*}{v}\) is bounded such that:
\[\overset{\*}{v} \in [\underline{\theta}, \overline{\theta}]\]Aspects can be decision-variables (\(\dot{v}\)) that prescribe a control action or a set point for the state, or derived (calculated) variables (\(\hat{v}\)) that represent the state of the system. States can be operation capacity, production levels, purchase levels, emissions, consumption levels, etc.
- Parameters:
primary_types (Type[_Component] | tuple[Type[_Component], ...]) – associated components type(s). Defaults to None.
nn (bool) – If True, the decision is a non-negative decision. Defaults to True.
ispos (bool) – If True, the decision is positive (non-negative). Defaults to True.
neg (str) – Negative form or representation of the decision, if any. Defaults to “”.
latex (str) – LaTeX string. Defaults to “”.
bound (str) – if the aspect is bounded by another. Defaults to “”.
label (str) – Label for the decision. Defaults to “”.
use_multiplier (bool) – Use a scaler (such as distance) for calculations
- Variables:
model (Model) – Model to which the Aspect belongs.
name (str) – Name of the Aspect.
indices (list[Location | Linkage, Periods]) – List of indices (Location, Periods) associated with the Aspect.
bound_spaces (dict[Commodity | Process | Storage | Transport, list[Location | Linkage]]) – Spaces where the Aspect has been already bound.
domains (list[Domain]) – List of domains associated with the Aspect.
- Raises:
ValueError – If primary_type is not defined.
- primary_type: Type[_Component] | tuple[Type[_Component], ...]#
- nn: bool = True#
- ispos: bool = True#
- neg: str = ''#
- latex: str = ''#
- bound: str = ''#
- label: str = ''#
- use_multiplier: bool = False#
- property I: Idx#
gana index set (I)
- property V: Var#
Variable
- property cons: list[C]#
Constraints
- property dispositions: dict[Self, dict[Commodity | Process | Storage | Transport, dict[Periods | Location | Linkage, dict[Location | Periods | Linkage, bool]]]]#
Dispositions dict
- property sizes#
dict of domain sizes
- property box#
Box of domain indices
- alias(*names: str)[source]#
Create aliases for the decision
- Parameters:
names (str) – Names of the aliases
- output(n_sol: int = 0, aslist: bool = False, asdict: bool = False, compare: bool = False) list[float] | dict[tuple[Idx, ...], float] | None[source]#
Solution
- Parameters:
n_sol (int, optional) – Solution number. Defaults to 0.
compare (bool, optional) – Compares the solution with the previous one. Defaults to False.
optional) (aslist (bool,) – Returns values taken as dict. Defaults to False.
optional) – Returns values taken as list. Defaults to False.
- Returns:
List of values taken by the decision.
- Return type:
list[float] | None