energia.modeling.constraints.vmap

energia.modeling.constraints.vmap#

Map

Functions

is_(a, b, /)

Same as a is b.

sigma(variable[, over, position])

Summation without recursion, also allows better printing

timer(logger[, kind, level])

Logs execution time and optionally shows a full computation using function arguments and result.

Classes

Map(aspect, domain[, reporting, label])

Maps between domains

cached_property(func)

class Map(aspect: Aspect, domain: Domain, reporting=False, label: str = '')[source]#

Bases: object

Maps between domains

Parameters:
  • aspect (Aspect) – Aspect to which the constraint is applied.

  • domain (Domain) – Domain over which the aspect is defined.

  • reporting (bool) – If True, the map is for a reporting variable.

  • label (str) – Label for the constraint. Defaults to “”.

write(from_domain: Domain, to_domain: Domain, tsum=False, msum=False)[source]#

Scales up variable to a lower dimension

property var[source]#
property name: str[source]#
property maps: dict[Domain, list[Domain]][source]#
rhs(domain: Domain, tsum=False, msum=False)[source]#

Gives the sum of the variable over the domain