Functions¶
This section lists important functions for running a time series simulation. It introduces the time series main function and the auxiliary methods for preparing a time series simulation. Furthermore, various internal functions are listed.
Run Function¶
- run_timeseries(net, time_steps=None, continue_on_divergence=False, verbose=True, **kwargs)¶
Time Series main function
Execution of pipe flow calculations for a time series using controllers. Optionally other functions than pipeflow can be called by setting the run function in kwargs.
Note
Refers to pandapower power flow.
- Parameters
net (pandapipesNet) – The pandapipes format network
time_steps (list or tuple, default None) – Time steps to calculate as list or tuple (start, stop). If None, all time steps from provided data source are simulated.
continue_on_divergence (bool, default False) – If True, time series calculation continues in case of errors.
verbose (bool, default True) – Prints progress bar or if logger.level == Debug, it prints debug messages
kwargs (dict) – Keyword arguments for run_control and runpp
- Returns
No output
Functions for Preparation¶
To prepare a time series simulation, classes/ methods of pandapower are accessed.
DFData
is derived from the DataSource
class. The controller ConstControl
is also required and can be
found in chapter Controller. In the following all functions
for the preparation are listed:
Further Functions¶
The following functions are called within run_timeseries
.
- init_time_series(net, time_steps, continue_on_divergence=False, verbose=True, **kwargs)¶
Initializes the time series calculation.
Creates the dict ts_variables, which includes necessary variables for the time series / control function.
- Parameters
net (pandapipesNet) – The pandapipes format network
time_steps (list or tuple) – Time steps to calculate as list or tuple (start, stop). If None, all time steps from provided data source are simulated.
continue_on_divergence (bool, default False) – If True, time series calculation continues in case of errors.
verbose (bool, default True) – Prints progress bar or logger debug messages
kwargs (dict) – Keyword arguments for run_control and runpp
- Returns
ts_variables, kwargs
- Return type
dict, dict
- control_diagnostic(net, respect_in_service=True)¶
Diagnostic function to find obvious mistakes in control data
- print_progress(i, time_step, time_steps, verbose, **kwargs)¶
- run_loop(net, ts_variables, run_control_fct=<function run_control>, output_writer_fct=<function _call_output_writer>, **kwargs)¶
runs the time series loop which calls pp.runpp (or another run function) in each iteration
- Parameters
- net - pandapower net
- ts_variables - settings for time series
- run_time_step(net, time_step, ts_variables, run_control_fct=<function run_control>, output_writer_fct=<function _call_output_writer>, **kwargs)¶
Time Series step function Is called to run the PANDAPOWER AC power flows with the timeseries module
- INPUT:
net - The pandapower format network
time_step (int) - time_step to be calculated
ts_variables (dict) - contains settings for controller and time series simulation. See init_time_series()
- cleanup(net, ts_variables)¶