Snapshot¶
Store input and calculation results in snapshots.
Though the power system operates continuously, it is considered in discrete time in power flow calculation. That is, between two consecutive time indices, the system state is assumed to remain steady, so small variations are ignored. Usually, the duration between indices is long compared to the frequency of alternating current (50 Hz in Europe and 60 Hz in the US).
The result for voltages in the previous snapshot can be used as the initial guess in power flow calculation.
-
class
mgrid.power_flow.snapshot.
Snapshot
(increments, previous, voltages=None, flows=None)[source]¶ Bases:
object
Store input in incremental format and results in dataframes.
-
property
base
¶ Get the base grid model and snapshot.
- Returns
[description]
- Return type
[type]
-
flows
: Optional[pandas.core.frame.DataFrame] = None¶ power flow along edges in kW
-
increments
: Dict[Tuple[str, str], float]¶ incremental values of conversion elements with respect to the previous snapshot
-
previous
: Union[mgrid.grid.geographic.GeoGrid, mgrid.power_flow.snapshot.Snapshot, mgrid.grid.supra.SupraGrid]¶ previous snapshot
-
result_pandapower
(net)[source]¶ Get results from a
pandapower
model.- Parameters
net – a grid modelled using
pandapower
.
-
result_pypsa
(net)[source]¶ Get results from a
pypsa
model.- Parameters
net – a grid modelled using
pypsa
.
-
update_previsou
(previous)[source]¶ Update items with respect to given previous snapshost.
- Parameters
previous (
Snapshot
) – another snapshot used as previous reference.
-
voltages
: Optional[pandas.core.frame.DataFrame] = None¶ votlage at buses in kVA
-
property
Snapshot Series¶
Class for building a series of snapshots.
A GeoGrid
or SupraGrid
object will serve as the default snapshot.
Increments at some snapshot will be stored in Snapshot
object.
The input and result of power flow calculation are stored in the same instance. There are two kinds of results, voltages and flows.