energia.modeling.variables.loss#

Loss Variable

Functions

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

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

Classes

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

A particular facet of the system under consideration.

Loss(primary_type[, nn, ispos, neg, latex, ...])

Loss Entails the degradation of a state In the case of Capacity, it is the loss of capacity In the case of Inventory, it is the loss of inventory Unlike Dismantle, loss is not a decision

class Loss(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: Aspect

Loss Entails the degradation of a state In the case of Capacity, it is the loss of capacity In the case of Inventory, it is the loss of inventory Unlike Dismantle, loss is not a decision

update(domain: Domain, reporting: bool = False)[source]#

Add a domain to the decision variable

Balance(domain: Domain)#

Add a general resource balance for the aspect over the domain

property I: Idx#

gana index set (I)

Map(domain: Domain, reporting: bool = False)#

Map the aspect to the domain

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

gettime(*index) list[Periods]#

Finds the sparsest time scale in the domains

property horizon: Periods#

Circumscribing Periods (Temporal Scale)

property isneg: bool#

Does this remove from the domain?

ispos: bool = True#
label: str = ''#
latex: str = ''#
property maps: dict[str, dict[Domain, list[Domain]]]#

Maps of the decision

property maps_report: dict[str, dict[Domain, list[Domain]]]#

Maps of the decision

neg: str = ''#
property network: Location#

Circumscribing Location (Spatial Scale)

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 problem: Problem#

Tree

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

property space: Space#

Space

property time: Time#

Time

use_multiplier: bool = False#
primary_type: Type[_Component] | tuple[Type[_Component], ...]#