loops
Classes for loops, which control the simulation workflow
- class Scheduler(base_loop: AbstractLoop | None = None, with_thermal: bool = True, schedules: dict = {}, ts_start: int = 0, steps: int = 1)[source]
Bases:
AbstractLoop
Class for simple multi-step simulations
- __init__(base_loop: AbstractLoop | None = None, with_thermal: bool = True, schedules: dict = {}, ts_start: int = 0, steps: int = 1) None [source]
Init the Scheduler class
- Parameters:
base_loop (AbstractLoop, optional) – The base loop object to use during the simulation phase. If not specified, a
SimpleStep
object will be instantiated. The default is None.with_thermal (bool, optional) – Whether to carry out the thermal simulation. This argument is ignored if a base loop is given. The default is True.
schedules (dict, optional) – A dictionary containing the schedules to be updated during the multi-step simulation. The keys must be strings with the name of the attribute to be changed. The values should be Pandas dataframes where the index values are the time-step IDs and the column names are the name of the edges containing the components for which the attribute should be changed. The default is {}.
ts_start (int, optional) – Starting time-step ID. The default is 0.
steps (int, optional) – Maximum number of time-steps. The default is 1.
- Return type:
None
- class SimpleStep(with_thermal: bool = True, hydraulic_sim_kwargs: dict = {}, thermal_sim_kwargs: dict = {})[source]
Bases:
AbstractLoop
Class for simple simulation step
- __init__(with_thermal: bool = True, hydraulic_sim_kwargs: dict = {}, thermal_sim_kwargs: dict = {}) None [source]
Init the SimpleStep class
- Parameters:
with_thermal (bool, optional) – Whether to carry out the thermal simulation. The default is True.
hydraulic_sim_kwargs (dict, optional) – Keyword arguments for
solve_hydraulics()
. The default is {}.thermal_sim_kwargs (dict, optional) – Keyword arguments for
solve_thermal()
. The default is {}.
- Return type:
None