energia.modeling.variables.states

Contents

energia.modeling.variables.states#

State 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.

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

Consequence of an action

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

Endogenous Stream of Resource, also a state variable

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

Exogenous Stream of Resource, also a state variable

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

Indicator Stream of Resource, also a state variable

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

Inventory State Variable Can only have Stored as primary

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

Set Point State Variable Operational set point (utilization)

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

Capacity State Variable Operational capacity

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

State Variable Operational capacity or set point (utilization)

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

Stream of Resource, also a state variable

class State(primary_type: Type[_Component] | tuple[Type[_Component], ...], nn: bool = True, ispos: bool = True, neg: str = '', latex: str = '', bound: State | None = None, label: str = '', use_multiplier: bool = False, add: Control | None = None, sub: Control | None = None)[source]#

Bases: Aspect

State Variable Operational capacity or set point (utilization)

add: Control | None = None#
sub: Control | None = None#
bound: State | None = None#
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

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], ...]#
class Inventory(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, add: EndoStream | None = None, sub: EndoStream | None = None)[source]#

Bases: Aspect

Inventory State Variable Can only have Stored as primary

add: EndoStream | None = None#
sub: EndoStream | None = None#
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

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

Each inherited object has their own

use_multiplier: bool = False#
primary_type: Type[_Component] | tuple[Type[_Component], ...]#
class Size(primary_type: Type[_Component] | tuple[Type[_Component], ...], nn: bool = True, ispos: bool = True, neg: str = '', latex: str = '', bound: State | None = None, label: str = '', use_multiplier: bool = False, add: Control | None = None, sub: Control | None = None)[source]#

Bases: State

Capacity State Variable Operational capacity

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

add: Control | None = None#
alias(*names: str)#

Create aliases for the decision

Parameters:

names (str) – Names of the aliases

bound: State | None = None#
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

sub: Control | None = None#
property time: Time#

Time

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

Add a domain to the decision variable

use_multiplier: bool = False#
primary_type: Type[_Component] | tuple[Type[_Component], ...]#
class SetPoint(primary_type: Type[_Component] | tuple[Type[_Component], ...], nn: bool = True, ispos: bool = True, neg: str = '', latex: str = '', bound: State | None = None, label: str = '', use_multiplier: bool = False, add: Control | None = None, sub: Control | None = None)[source]#

Bases: State

Set Point State Variable Operational set point (utilization)

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

add: Control | None = None#
alias(*names: str)#

Create aliases for the decision

Parameters:

names (str) – Names of the aliases

bound: State | None = None#
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

sub: Control | None = None#
property time: Time#

Time

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

Add a domain to the decision variable

use_multiplier: bool = False#
primary_type: Type[_Component] | tuple[Type[_Component], ...]#
class Consequence(primary_type: Type[_Component] | tuple[Type[_Component], ...], nn: bool = True, ispos: bool = True, neg: str = '', latex: str = '', bound: State | None = None, label: str = '', use_multiplier: bool = False, add: Control | None = None, sub: Control | None = None)[source]#

Bases: State

Consequence of an action

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

add: Control | None = None#
alias(*names: str)#

Create aliases for the decision

Parameters:

names (str) – Names of the aliases

bound: State | None = None#
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

sub: Control | None = None#
property time: Time#

Time

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

Add a domain to the decision variable

use_multiplier: bool = False#
primary_type: Type[_Component] | tuple[Type[_Component], ...]#
class Stream(primary_type: Type[_Component] | tuple[Type[_Component], ...], nn: bool = True, ispos: bool = True, neg: str = '', latex: str = '', bound: State | None = None, label: str = '', use_multiplier: bool = False, add: Control | None = None, sub: Control | None = None)[source]#

Bases: State

Stream of Resource, also a state 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

add: Control | None = None#
alias(*names: str)#

Create aliases for the decision

Parameters:

names (str) – Names of the aliases

bound: State | None = None#
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

sub: Control | None = None#
property time: Time#

Time

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

Add a domain to the decision variable

use_multiplier: bool = False#
primary_type: Type[_Component] | tuple[Type[_Component], ...]#
class EndoStream(primary_type: Type[_Component] | tuple[Type[_Component], ...], nn: bool = True, ispos: bool = True, neg: str = '', latex: str = '', bound: State | None = None, label: str = '', use_multiplier: bool = False, add: Control | None = None, sub: Control | None = None)[source]#

Bases: Stream

Endogenous Stream of Resource, also a state variable

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

add: Control | None = None#
alias(*names: str)#

Create aliases for the decision

Parameters:

names (str) – Names of the aliases

bound: State | None = None#
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

sub: Control | None = None#
property time: Time#

Time

use_multiplier: bool = False#
primary_type: Type[_Component] | tuple[Type[_Component], ...]#
class ExoStream(primary_type: Type[_Component] | tuple[Type[_Component], ...], nn: bool = True, ispos: bool = True, neg: str = '', latex: str = '', bound: State | None = None, label: str = '', use_multiplier: bool = False, add: Control | None = None, sub: Control | None = None)[source]#

Bases: Stream

Exogenous Stream of Resource, also a state variable

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

add: Control | None = None#
alias(*names: str)#

Create aliases for the decision

Parameters:

names (str) – Names of the aliases

bound: State | None = None#
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

sub: Control | None = None#
property time: Time#

Time

use_multiplier: bool = False#
primary_type: Type[_Component] | tuple[Type[_Component], ...]#
class IndStream(primary_type: Type[_Component] | tuple[Type[_Component], ...], nn: bool = True, ispos: bool = True, neg: str = '', latex: str = '', bound: State | None = None, label: str = '', use_multiplier: bool = False, add: Control | None = None, sub: Control | None = None)[source]#

Bases: Stream

Indicator Stream of Resource, also a state variable

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

add: Control | None = None#
alias(*names: str)#

Create aliases for the decision

Parameters:

names (str) – Names of the aliases

bound: State | None = None#
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

sub: Control | None = None#
property time: Time#

Time

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