Using ActiveClass interface

The interface described below requires the extras dependencies. Please see installation instructions.

The OpenDSSDirect.py interface may not support all classes or element by default, however you can access these values by using the class_to_dataframe interface.

An example is shown below for the Storage class.

[1]:
import opendssdirect as dss

dss.run_command('Redirect ../../tests/data/13Bus/IEEE13Nodeckt.dss')

dss.Circuit.AllBusNames()

dss.run_command(
    "New Storage.{bus_name} Bus1={bus_name} phases=1 kV=2.2 kWRated={rating} kWhRated={kwh_rating} kWhStored={initial_state} %IdlingkW=0 %reserve=0 %EffCharge=100 %EffDischarge=100 State=CHARGING".format(
    bus_name='675',
    rating=20,
    kwh_rating=20,
    initial_state=20
    ))


dss.run_command(
    "New Storage.{bus_name} Bus1={bus_name} phases=1 kV=2.2 kWRated={rating} kWhRated={kwh_rating} kWhStored={initial_state} %IdlingkW=0 %reserve=0 %EffCharge=100 %EffDischarge=100 State=CHARGING".format(
    bus_name='611',
    rating=20,
    kwh_rating=20,
    initial_state=20
    ))

dss.run_command('Solve');
[2]:
dss.utils.class_to_dataframe('Storage')
[2]:
%Charge %Discharge %EffCharge %EffDischarge %IdlingkW %Idlingkvar %R %X %reserve %stored ... kWhstored kWrated kv kvar like model pf phases spectrum yearly
Storage.611 100 100 100 100 0 0 0 50 0 100 ... 20 20 2.2 0 1 1 1
Storage.675 100 100 100 100 0 0 0 50 0 100 ... 20 20 2.2 0 1 1 1

2 rows × 44 columns