energia.modeling.variables.control#
Control Variable
Functions
|
Add dunder methods based on the fields defined in the class. |
Classes
|
A particular facet of the system under consideration. |
|
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) |
- class Control(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:
AspectSome 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)
- 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 “”.
- 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.
- property I: Idx#
gana index set (I)
- property V: Var#
Variable
- alias(*names: str)#
Create aliases for the decision
- Parameters:
names (str) – Names of the aliases
- bound: str = ''#
- property box#
Box of domain indices
- property cons: list[C]#
Constraints
- crumple_domains()#
- property dispositions: dict[Self, dict[Commodity | Process | Storage | Transport, dict[Periods | Location | Linkage, dict[Location | Periods | Linkage, bool]]]]#
Dispositions dict
- property isneg: bool#
Does this remove from the domain?
- ispos: bool = True#
- label: str = ''#
- latex: str = ''#
- neg: str = ''#
- nn: bool = True#
- output(n_sol: int = 0, aslist: bool = False, asdict: bool = False, compare: bool = False) list[float] | dict[tuple[Idx, ...], float] | None#
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
- property program: Prg#
Mathematical Program
- show(descriptive=False)#
Pretty print the component
- property sign: float#
Gives the multiplier in balances
- property sizes#
dict of domain sizes
- use_multiplier: bool = False#
- primary_type: Type[_Component] | tuple[Type[_Component], ...]#