energia.components.temporal#

energia.temporal init file

Classes

Periods([size, of, n, label, citations])

A discretization of Time.

TemporalScales(discretizations[, names])

A temporal scale for a model.

class Periods(size: int | float = 1, of: Self | None = None, n: int | None = None, label: str = '', citations: str = '')[source]#

Bases: _X

A discretization of Time.

Parameters:
  • periods (int | float) – Number of periods in Periods. Defaults to 1.

  • of (Periods | Lag, optional) – The periods of which this is a multiple. Defaults to None.

  • name (str, optional) – Name of the periods. Defaults to None.

  • label (str, optional) – Label of the periods. Defaults to None.

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

  • time (Time) – Time to which the Periods belongs.

  • horizon (Periods) – Horizon of the Time.

  • I (I) – Index set of the Periods.

  • constraints (list[str]) – List of constraints associated with the Periods. Defaults to [].

  • domains (list[Domain]) – List of domains associated with the Periods. Defaults to [].

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

isroot()[source]#

Is used to define another period?

ishorizon() bool[source]#

Is this the horizon of the model?

property tree: dict[Self, dict]#

Tree representation of the Periods

property cons: list[C]#

Constraints

property horizon: Self#

Time Horizon

property time: Time[source]#

Time to which the Periods belongs

property I: I[source]#

Index tuple

property i: I[source]#

Only Index

property true_size: float#

True size of the Periods

howmany(of: Periods)[source]#

How many periods make this period

property program: Prg#

Mathematical program

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

Pretty print the component

class TemporalScales(discretizations: list[int], names: list[str] | None = None)[source]#

Bases: object

A temporal scale for a model.

Parameters:
  • discretizations (list[int]) – List of discretizations for the temporal scale.

  • names (list[str], optional) – Names of the discretizations. Defaults to [t<i>] for each discretization.

Modules

lag

Temporal Lag

modes

Operational Mode attached to a Parameter

periods

Time Periods

scales

Temporal Scales