Getting Started
Installation
We strongly recommend the use of virtual environments manager.
Using pip
pip install dssdata
Using poetry
poetry add dssdata
Samples
Static Power Flow (Snapshot)
Instance the class SystemClass indicating the path to the .dss file and the base system voltage.
Execute a static power flow using run_static_pf, informing the instance of SystemClass and a Tool. The DSSData provides some tools to a quick start.
from dssdata import SystemClass
from dssdata.pfmodes import run_static_pf
from dssdata.tools import voltages
distSys = SystemClass(path="master.dss", kV=[13.8], loadmult=1.2)
[voltageDataFrame] = run_static_pf(distSys, tools=[voltages.get_all])
Time series Power Flow
Instance the class SystemClass indicating the path to the .dss file and the base system voltage.
Execute a time series power flow using cfg_tspf and run_tspf, informing the instance of SystemClass and a Tool. The DSSData provides some tools to a quick start.
from dssdata import SystemClass
from dssdata.pfmodes import cfg_tspf, run_tspf
from dssdata.tools import lines, voltages
distSys = SystemClass(path="master.dss", kV=[13.8], loadmult=1.2)
cfg_tspf(distSys, step_size="5m", initial_time=(0, 0))
tools = [voltages.get_all]
[voltageDataFrame] = run_tspf(distSys, tools=tools, num_steps=288)