energia.components.temporal.modes

energia.components.temporal.modes#

Operational Mode attached to a Parameter

Classes

Idx

alias of I

Modes([size, sample, parent, n])

Represents a discrete choice to be taken within a spatiotemporal disposition.

cached_property(func)

class Modes(size: int = 1, sample: Sample | None = None, parent: Self | None = None, n: int | None = None)[source]#

Bases: _X

Represents a discrete choice to be taken within a spatiotemporal disposition. Modes can split usage. A Mode of Operation can be used for Conversion, Use, etc.

Parameters:
  • n_modes (int) – Number of modes. Defaults to 1.

  • sample (Sample | None) – The aspect and component (sample) which is being ‘moded’. Defaults to None.

  • parent (Self | None) – Parent mode, if any. Defaults to None.

  • n (int | None) – Position in the parent mode set. Defaults to None.

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

  • name (str) – Set when the component is assigned as a Model attribute.

  • constraints (list[str]) – List of constraints associated with the component.

  • domains (list[Domain]) – List of domains associated with the component.

  • aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.

property I: I[source]#

Index set of modes

property cons: list[C]#

Constraints

property program: Prg#

Mathematical program

show(descriptive=False, category: str = '')#

Pretty print the component