energia.modeling.constraints.bind#

Bind constraint

Functions

normalize(data[, how])

min max normalization of data

timer(logger[, kind, level])

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

Classes

Bind(sample, parameter[, leq, geq, eq, ...])

Bind constraint

F([one, two, one_type, two_type, mul, add, ...])

Provides relational operations between parameter, variable, parametric variable, or function sets (F).

V(*index[, itg, nn, bnr, mutable, tag, ltx])

Ordered set of variables (Var).

cached_property(func)

class Bind(sample: Sample, parameter: float | list[float] | dict[float, float] | tuple[float, float] | list[tuple[float, float]] | list[dict[float, float]], leq: bool = False, geq: bool = False, eq: bool = False, forall: list[_X | _Component] | None = None, parameter_name: str = '')[source]#

Bases: object

Bind constraint

Parameters:
  • sample (Sample) – The sample variable to bind

  • parameter (float | list[float] | dict[float, float] | tuple[float, float] | list[tuple[float, float]]) – The parameter bound

  • leq (bool) – If True, the sample is constrained to be less than or equal to the bound

  • geq (bool) – If True, the sample is constrained to be greater than or equal to the bound

  • eq (bool) – If True, the sample is constrained to be equal to the bound

  • forall (list[_X | _Component] | None) – If provided, the constraint is applied for all elements in this list

Variables:
  • model (Model) – The model to which the component belongs.

  • nominal (float | None) – The nominal value of the sample variable.

  • norm (bool) – If True, the sample variable is normalized.

  • domain (Domain) – The domain of the sample.

  • aspect (Aspect) – The aspect of the sample.

  • report (bool) – If True, the sample variable is reported.

  • program (Prg) – The program to which the sample belongs.

write()[source]#

Writes the bind constraint

property parameter: list[float] | float | dict[float, float] | tuple[float, float] | list[tuple[float, float]][source]#

Parameter bound of the bind constraint

property lhs[source]#

Left hand side of the bind constraint

property rhs: V | F | Param#

Right hand side of the bind constraint

property rel[source]#

Constraint name suffix

property cons_name[source]#

Constraint name

property iscalc: bool#

Is this a calculation bind constraint?

property P#

Gets the parameter set