commonpower.modeling.param_initialization.IterableInitializer
- class IterableInitializer(vals: tuple[float] | list[float] | tuple[int] | list[int])[source]
Bases:
ParamInitializerThis initializer iterates over a given iterable. Once a full iteration is complete, it starts over.
- Parameters:
vals (Union[tuple[float], list[float], tuple[int], list[int]]) – Values to iterate over.
Methods
Returns the value from the current position in the iterable.
is_uncertainwith_uncertainty- get_init_val(at_time: datetime) int | float[source]
Returns the value from the current position in the iterable.
- Parameters:
at_time (datetime) – Current timestamp. If the given timestamp is smaller than the timestamp that was given at the last call, the iteration resets to the beginning.
- Returns:
float – Initial value.