edisgo.opf.powermodels_opf
Functions
|
Run OPF for the edisgo object and write results back to it. |
Module Contents
- edisgo.opf.powermodels_opf.pm_optimize(edisgo_obj, s_base=1, flexible_cps=None, flexible_hps=None, flexible_loads=None, flexible_storage_units=None, opf_version=1, method='soc', warm_start=False, silence_moi=False)
Run OPF for the edisgo object and write results back to it.
If the time index is a single contiguous interval, this runs one OPF (
_pm_optimize_single()). If the time index is NON-contiguous (disconnected intervals, e.g. from automatic timestep selection), each contiguous interval is optimized separately and independently — storage/heat state does not carry across the gap — and the results are combined:per-interval operation schedules accumulate in
edisgo.timeseries;the detailed
edisgo.opf_resultsframes are merged by time index;a per-interval solve report is stored in
edisgo.opf_results.interval_results;if any interval was infeasible, an
InfeasibleModelErroris raised after the feasible intervals’ results have been stored.
The overlying-grid SOC attributes and reactive-power time series (which
to_powermodels/from_powermodelsmutate or replace on the current interval) are snapshotted and restored pristine before each interval so a later interval sees intact input. Parameters are as for_pm_optimize_single().