opendssdirect package reference

Contents

opendssdirect package reference#

Since version 0.9, OpenDSSDirect.py is organized in classes, also exposed as submodules for compatibility with previous versions. That is, prefer to import it as from opendssdirect import dss. The submodules expose functions bound to the methods of the interface classes, using the default DSS instance. Check Upgrading to OpenDSSDirect.py v0.9+ for a more complete overview of the changes.

For the enum classes that can be used in many of the API methods, see Enumerations. For the utils module, see opendssdirect.utils.

On the docstrings in this document, when a function/method has an equivalent in the official COM implementation, links are now provided to the new EPRI documentation site, introduced in January 2024. Despite the examples from the official OpenDSS being mostly written in MATLAB using the COM API, users should be able to map the general use logic to OpenDSSDirect.py. On the other hand, if the function is an API extension, it is marked as such.

The OpenDSSDirect class#

This class, as exposed in the default instance dss (from opendssdirect import dss), has attributes representing all the submodules listed in the next section, plus extra functions.

class OpenDSSDirect(ctx_api_util=None, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

This is the main OpenDSSDirect.py class that wraps all the available interfaces.

Besides the traditional submodules from previous (pre-v0.9) versions, it has a shortcut for commands as the call operator, plus some utility methods.

Note that users do not typically need to create instances of this class manually. For creating multiple, separate DSS engine instances, use the NewContext() method.

This class also provides function to return DSS-Python and AltDSS representations of the same engine, allowing users to mix usage of the packages more easily.

DSSException#

None

Shortcut to the DSSException class.

NewContext()#

Creates a new DSS engine context, wrapped by the OpenDSSDirect.py classes.

A DSS Context encapsulates most of the global state of the original OpenDSS engine, allowing the user to create multiple instances in the same process. By creating contexts manually, the management of threads and potential issues should be handled by the user.

(API Extension)

__call__(cmds: Union[AnyStr, List[AnyStr]] = None)#

Shortcut to pass text commands. Allow single and multiple commands in a string, or a list of commands.

For multiple commands, a big string tends to be the faster.

Equivalent to OpenDSSDirect.Text.Commands

Examples:


    # single command
    dss("new Circuit.test") 

    # list of commands (either will work)
    dss(["new Circuit.test", "new Line.line1 bus1=a bus2=b"])

    # block of commands in a big string
    dss("""
        clear
        new Circuit.test
        new Line.line1 bus1=a bus2=b
        new Load.load1 bus1=a bus2=b
    """)

(API Extension)

__init__(ctx_api_util=None, prefer_lists=None)#

Creates a new OpenDSSDirect.py instance for the DSS context specified in ctx_api_util.

Not intended for typical usage. For creating new separate DSS instances, refer to the NewContext() method.

dss_lib#

None

dss_lib provides access to the low-level CFFI library; this is not recommended for most users and may change across versions. The intention is to allow some (very) advanced operations directly, when the high-level interface either does not model some specific detail, or when users know how to manually address some data directly with lower overhead.

WARNING: if used incorrectly, could even crash your computer.

run_command(text)#

Use the Text interface of OpenDSS, grabbing all output text in a string.

This is deprecated since it doesn’t handle errors as exceptions and can confuse users.

Use instead: dss("commands"), dss.Text.Command("command"), or dss.Text.Commands("commands").

to_altdss() altdss.AltDSS#

Returns an instance of AltDSS for the active DSS Context.

A compatible AltDSS (pip install altdss) is required.

to_dss_python() dss.IDSS#

Returns an instance of DSS-Python for the active DSS Context.

utils#

None

Shortcut to the utils module.

Iterable base class#

The Iterable base class is used by most of the interface classes that expose DSS objects. This includes the common Name(), First(), Next(), Count(), AllNames(), Idx(), and Python dunder methods to allow using len() and iteration.

class Iterable(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

opendssdirect.ActiveClass#

class IActiveClass(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

ActiveClassName()#

Returns name of active class.

Original COM help: https://opendss.epri.com/ActiveClassName.html

ActiveClassParent()#

Get the name of the parent class of the active class

Original COM help: https://opendss.epri.com/ActiveClassParent.html

AllNames()#

Array of strings consisting of all element names in the active class.

Original COM help: https://opendss.epri.com/AllNames.html

Count()#

Number of elements in Active Class. Same as NumElements Property.

Original COM help: https://opendss.epri.com/Count.html

First()#

Sets first element in the active class to be the active DSS object. If the object is a CktElement, ActiveCktELement also points to this element.

Returns 0 if none.

Original COM help: https://opendss.epri.com/First.html

Name(*args)#

Name of the Active Element of the Active Class

Original COM help: https://opendss.epri.com/Name.html

Next()#

Sets next element in active class to be the active DSS object. If the object is a CktElement, ActiveCktElement also points to this element.

Returns 0 if no more.

Original COM help: https://opendss.epri.com/Next.html

NumElements()#

Number of elements in this class. Same as Count property.

Original COM help: https://opendss.epri.com/NumElements.html

ToJSON(options=0)#

Returns the data (as a list) of all elements from the active class as a JSON-encoded string.

The options parameter contains bit-flags to toggle specific features. See Obj_ToJSON (C-API) for more, or DSSObj.to_json in Python.

Additionally, the ExcludeDisabled flag can be used to excluded disabled elements from the output.

(API Extension)

__init__(api_util, prefer_lists=None)#
__name__#

‘ActiveClass’

opendssdirect.Basic#

class IBasic(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

AdvancedTypes(*args)#

When enabled, there are two side-effects:

  • Per DSS Context: Complex arrays and complex numbers can be returned and consumed by the Python API.

  • Global effect: The low-level API provides matrix dimensions when available (EnableArrayDimensions is enabled).

As a result, for example, OpenDSSDirect.CktElement.Yprim() is returned as a complex matrix instead of a plain array.

When disabled, the legacy plain arrays are used and complex numbers cannot be consumed by the Python API.

Defaults to False for backwards compatibility.

(API Extension)

AllowChangeDir(*args)#

If disabled, the engine will not change the active working directory during execution. E.g. a “compile” command will not “chdir” to the file path.

If you have issues with long paths, enabling this might help in some scenarios.

Defaults to True (allow changes, backwards compatible) in the 0.10.x versions of DSS C-API. This might change to False in future versions.

This can also be set through the environment variable DSS_CAPI_ALLOW_CHANGE_DIR. Set it to 0 to disallow changing the active working directory.

(API Extension)

AllowDOScmd(*args)#

If enabled, the DOScmd command is allowed. Otherwise, an error is reported if the user tries to use it.

Defaults to False/0 (disabled state). Users should consider DOScmd deprecated on DSS-Extensions.

This can also be set through the environment variable DSS_CAPI_ALLOW_DOSCMD. Setting it to 1 enables the command.

(API Extension)

AllowEditor(*args)#

Gets/sets whether running the external editor for “Show” is allowed

AllowEditor controls whether the external editor is used in commands like “Show”. If you set to 0 (false), the editor is not executed. Note that other side effects, such as the creation of files, are not affected.

(API Extension)

AllowForms(*args)#

Gets/sets whether text output is allowed (DSS-Extensions) or general forms/windows are shown (official OpenDSS).

Original COM help: https://opendss.epri.com/AllowForms.html

COMErrorResults(*args)#

If enabled, in case of errors or empty arrays, the API returns arrays with values compatible with the official OpenDSS COM interface.

For example, consider the function Loads_Get_ZIPV. If there is no active circuit or active load element:

  • In the disabled state (COMErrorResults(False)), the function will return “[]”, an array with 0 elements.

  • In the enabled state (COMErrorResults(True)), the function will return “[0.0]” instead. This should be compatible with the return value of the official COM interface.

Defaults to True/1 (enabled state) in the v0.12.x series. This will change to false in future series.

This can also be set through the environment variable DSS_CAPI_COM_DEFAULTS. Setting it to 0 disables the legacy/COM behavior. The value can be toggled through the API at any time.

(API Extension)

Classes()#

List of DSS intrinsic classes (names of the classes)

Original COM help: https://opendss.epri.com/Classes1.html

ClearAll()#
CompatFlags(*args)#

Controls some compatibility flags introduced to toggle some behavior from the official OpenDSS.

THE FLAGS ARE GLOBAL, affecting all DSS engines in the process.

These flags may change for each version of DSS C-API, but the same value will not be reused. That is, when we remove a compatibility flag, it will have no effect but will also not affect anything else besides raising an error if the user tries to toggle a flag that was available in a previous version.

We expect to keep a very limited number of flags. Since the flags are more transient than the other options/flags, it was preferred to add this generic function instead of a separate function per flag.

See the enumeration DSSCompatFlags for available flags, including description.

(API Extension)

DataPath(*args)#

DSS Data File Path. Default path for reports, etc. from DSS

Original COM help: https://opendss.epri.com/DataPath.html

DefaultEditor()#

Returns the path name for the default text editor.

Original COM help: https://opendss.epri.com/DefaultEditor.html

LegacyModels(*args)#

LegacyModels was a flag used to toggle legacy (pre-2019) models for PVSystem, InvControl, Storage and StorageControl. In the official OpenDSS version 9.0, the old models were removed. They were temporarily present here but were also removed in DSS C-API v0.13.0.

NOTE: this property will be removed for v1.0. It is left to avoid breaking the current API too soon.

(API Extension)

NewCircuit(name)#
NumCircuits()#

Number of Circuits currently defined

Original COM help: https://opendss.epri.com/NumCircuits.html

NumClasses()#

Number of DSS intrinsic classes

Original COM help: https://opendss.epri.com/NumClasses.html

NumUserClasses()#

Number of user-defined classes

Original COM help: https://opendss.epri.com/NumUserClasses.html

Reset()#

This is a no-op function, does nothing. Left for compatibility.

Original COM help: https://opendss.epri.com/Reset1.html

SetActiveClass(ClassName)#
ShowPanel()#
Start(code)#

This is a no-op function, does nothing. Left for compatibility.

Calling Start in AltDSS/DSS-Extensions is required but that is already handled automatically, so the users do not need to call it manually, unless using AltDSS/DSS C-API directly without further tools.

On the official OpenDSS, Start also does nothing at all in the current versions.

Original COM help: https://opendss.epri.com/Start.html

UserClasses()#

List of user-defined classes

Original COM help: https://opendss.epri.com/UserClasses.html

Version()#

Get version string for the DSS.

Original COM help: https://opendss.epri.com/Version.html

__init__(api_util, prefer_lists=None)#
__name__#

‘Basic’

opendssdirect.Bus#

class IBus(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

AllPCEatBus()#

Returns an array with the names of all PCE connected to the active bus

Original COM help: https://opendss.epri.com/AllPCEatBus.html

AllPDEatBus()#

Returns an array with the names of all PDE connected to the active bus

Original COM help: https://opendss.epri.com/AllPDEatBus1.html

Coorddefined()#

Indicates whether a coordinate has been defined for this bus

Original COM help: https://opendss.epri.com/Coorddefined.html

CplxSeqVoltages()#

Complex Double array of Sequence Voltages (0, 1, 2) at this Bus.

Original COM help: https://opendss.epri.com/CplxSeqVoltages.html

Cust_Duration()#

Accumulated customer outage durations

Original COM help: https://opendss.epri.com/Cust_Duration.html

Cust_Interrupts()#

Annual number of customer-interruptions from this bus

Original COM help: https://opendss.epri.com/Cust_Interrupts.html

Distance()#

Distance from energymeter (if non-zero)

Original COM help: https://opendss.epri.com/Distance.html

GetUniqueNodeNumber(StartNumber)#

Return a unique node number at the active bus to avoid node collisions and adds it to the node list for the bus.

Original COM help: https://opendss.epri.com/GetUniqueNodeNumber.html

Int_Duration()#

Average interruption duration, hr.

Original COM help: https://opendss.epri.com/Int_Duration.html

Isc()#

Short circuit currents at bus; Complex Array.

Original COM help: https://opendss.epri.com/Isc.html

Lambda()#

Accumulated failure rate downstream from this bus; faults per year

Original COM help: https://opendss.epri.com/Lambda.html

LineList()#

List of strings: Full Names of LINE elements connected to the active bus.

Original COM help: https://opendss.epri.com/LineList.html

LoadList()#

List of strings: Full Names of LOAD elements connected to the active bus.

Original COM help: https://opendss.epri.com/LoadList.html

N_Customers()#

Total numbers of customers served downline from this bus

Original COM help: https://opendss.epri.com/N_Customers.html

N_interrupts()#

Number of interruptions this bus per year

Original COM help: https://opendss.epri.com/N_interrupts.html

Name()#

Name of Bus

Original COM help: https://opendss.epri.com/Name1.html

Nodes()#

Integer Array of Node Numbers defined at the bus in same order as the voltages.

Original COM help: https://opendss.epri.com/Nodes.html

NumNodes()#

Number of Nodes this bus.

Original COM help: https://opendss.epri.com/NumNodes.html

PuVoltage()#

Complex Array of pu voltages at the bus.

Original COM help: https://opendss.epri.com/puVoltages.html

SectionID()#

Integer ID of the feeder section in which this bus is located.

Original COM help: https://opendss.epri.com/SectionID.html

SeqVoltages()#

Double Array of sequence voltages at this bus. Magnitudes only.

Original COM help: https://opendss.epri.com/SeqVoltages.html

TotalMiles()#

Total length of line downline from this bus, in miles. For recloser siting algorithm.

Original COM help: https://opendss.epri.com/TotalMiles.html

VLL()#

For 2- and 3-phase buses, returns array of complex numbers representing L-L voltages in volts. Returns -1.0 for 1-phase bus. If more than 3 phases, returns only first 3.

Original COM help: https://opendss.epri.com/VLL.html

VMagAngle()#

Array of doubles containing voltages in Magnitude (VLN), angle (degrees)

Original COM help: https://opendss.epri.com/VMagAngle.html

Voc()#

Open circuit voltage; Complex array.

Original COM help: https://opendss.epri.com/Voc.html

Voltages()#

Complex array of voltages at this bus.

Original COM help: https://opendss.epri.com/Voltages.html

X(*args)#

X Coordinate for bus

Original COM help: https://opendss.epri.com/x.html

Y(*args)#

Y coordinate for bus

Original COM help: https://opendss.epri.com/y.html

YscMatrix()#

Complex array of Ysc matrix at bus. Column by column.

Original COM help: https://opendss.epri.com/YscMatrix.html

ZSC012Matrix()#

Array of doubles (complex) containing the complete 012 Zsc matrix. Only available after Zsc is computed, either through the “ZscRefresh” command, or running a “FaultStudy” solution. Only available for buses with 3 nodes.

Original COM help: https://opendss.epri.com/ZSC012Matrix.html

Zsc0()#

Complex Zero-Sequence short circuit impedance at bus.

Original COM help: https://opendss.epri.com/Zsc0.html

Zsc1()#

Complex Positive-Sequence short circuit impedance at bus.

Original COM help: https://opendss.epri.com/Zsc1.html

ZscMatrix()#

Complex array of Zsc matrix at bus. Column by column.

Original COM help: https://opendss.epri.com/ZscMatrix.html

ZscRefresh()#

Refreshes the Zsc matrix for the active bus.

Original COM help: https://opendss.epri.com/ZscRefresh.html

__init__(api_util, prefer_lists=None)#
__name__#

‘Bus’

kVBase()#

Base voltage at bus in kV

Original COM help: https://opendss.epri.com/kVBase.html

puVLL()#

Returns Complex array of pu L-L voltages for 2- and 3-phase buses. Returns -1.0 for 1-phase bus. If more than 3 phases, returns only 3 phases.

Original COM help: https://opendss.epri.com/puVLL.html

puVmagAngle()#

Array of doubles containing voltage magnitude, angle (degrees) pairs in per unit

Original COM help: https://opendss.epri.com/puVmagAngle.html

opendssdirect.CapControls#

class ICapControls(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

CTRatio(*args)#

Transducer ratio from primary current to control current.

Original COM help: https://opendss.epri.com/CTratio.html

Capacitor(*args)#

Name of the Capacitor that is controlled.

Original COM help: https://opendss.epri.com/Capacitor.html

Count()#

Number of objects of this type

DeadTime(*args)#

Dead time after capacitor is turned OFF before it can be turned back ON for the active CapControl.

Default is 300 sec.

Original COM help: https://opendss.epri.com/DeadTime.html

Delay(*args)#

Time delay [s] to switch on after arming. Control may reset before actually switching.

Original COM help: https://opendss.epri.com/Delay.html

DelayOff(*args)#

Time delay [s] before switching off a step. Control may reset before actually switching.

Original COM help: https://opendss.epri.com/DelayOff.html

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

Mode(*args)#

Type of automatic controller.

Original COM help: https://opendss.epri.com/Mode.html

MonitoredObj(*args)#

Full name of the element that PT and CT are connected to.

Original COM help: https://opendss.epri.com/MonitoredObj.html

MonitoredTerm(*args)#

Terminal number on the element that PT and CT are connected to.

Original COM help: https://opendss.epri.com/MonitoredTerm.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

OFFSetting(*args)#

Threshold to switch off a step. See Mode for units.

Original COM help: https://opendss.epri.com/OFFSetting.html

ONSetting(*args)#

Threshold to arm or switch on a step. See Mode for units.

Original COM help: https://opendss.epri.com/ONSetting.html

PTRatio(*args)#

Transducer ratio from primary feeder to control voltage.

Original COM help: https://opendss.epri.com/PTratio.html

Reset()#

Force a reset of this CapControl.

Original COM help: https://opendss.epri.com/Reset.html

UseVoltOverride(*args)#

Enables Vmin and Vmax to override the control Mode

Original COM help: https://opendss.epri.com/UseVoltOverride.html

Vmax(*args)#

With VoltOverride, swtich off whenever PT voltage exceeds this level.

Original COM help: https://opendss.epri.com/Vmax.html

Vmin(*args)#

With VoltOverride, switch ON whenever PT voltage drops below this level.

Original COM help: https://opendss.epri.com/Vmin.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘CapControls’

opendssdirect.Capacitors#

class ICapacitors(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AddStep()#
AllNames()#

Array of all names of this object type

AvailableSteps()#

Number of Steps available in cap bank to be switched ON.

Original COM help: https://opendss.epri.com/AvailableSteps.html

Close()#
Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsDelta(*args)#

Delta connection or wye?

Original COM help: https://opendss.epri.com/IsDelta.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NumSteps(*args)#

Number of steps (default 1) for distributing and switching the total bank kVAR.

Original COM help: https://opendss.epri.com/NumSteps.html

Open()#
States(*args)#

An array of integers [0..NumSteps-1] indicating state of each step. If the read value is -1 an error has occurred.

Original COM help: https://opendss.epri.com/States.html

SubtractStep()#
__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Capacitors’

kV(*args)#

Bank kV rating. Use LL for 2 or 3 phases, or actual can rating for 1 phase.

Original COM help: https://opendss.epri.com/kV.html

kvar(*args)#

Total bank KVAR, distributed equally among phases and steps.

opendssdirect.Circuit#

class ICircuit(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

AllBusDistances()#

Returns distance from each bus to parent EnergyMeter. Corresponds to sequence in AllBusNames.

Original COM help: https://opendss.epri.com/AllBusDistances.html

AllBusMagPu()#

Double Array of all bus voltages (each node) magnitudes in Per unit

Original COM help: https://opendss.epri.com/AllBusVmagPu.html

AllBusNames()#

Array of strings containing names of all buses in circuit (see AllNodeNames).

Original COM help: https://opendss.epri.com/AllBusNames.html

AllBusVMag()#

Array of magnitudes (doubles) of voltages at all buses

Original COM help: https://opendss.epri.com/AllBusVmag.html

AllBusVolts()#

Complex array of all bus, node voltages from most recent solution

Original COM help: https://opendss.epri.com/AllBusVolts.html

AllElementLosses()#

Array of total losses (complex) in each circuit element

Original COM help: https://opendss.epri.com/AllElementLosses.html

AllElementNames()#

Array of strings containing Full Name of all elements.

Original COM help: https://opendss.epri.com/AllElementNames.html

AllNodeDistances()#

Returns an array of distances from parent EnergyMeter for each Node. Corresponds to AllBusVMag sequence.

Original COM help: https://opendss.epri.com/AllNodeDistances.html

AllNodeDistancesByPhase(Phase)#

Returns an array of doubles representing the distances to parent EnergyMeter. Sequence of array corresponds to other node ByPhase properties.

AllNodeNames()#

Array of strings containing full name of each node in system in same order as returned by AllBusVolts, etc.

Original COM help: https://opendss.epri.com/AllNodeNames.html

AllNodeNamesByPhase(Phase)#

Return array of strings of the node names for the By Phase criteria. Sequence corresponds to other ByPhase properties.

AllNodeVmagByPhase(Phase)#

Returns Array of doubles represent voltage magnitudes for nodes on the specified phase.

AllNodeVmagPUByPhase(Phase)#

Returns array of per unit voltage magnitudes for each node by phase

Capacity(Start, Increment)#

Compute the maximum load the active circuit can serve in the PRESENT YEAR.

This method uses the EnergyMeter objects with the registers set with the SET UEREGS= (...) command for the AutoAdd functions.

Returns the metered kW (load + losses - generation) and per unit load multiplier for the loading level at which something in the system reports an overload or undervoltage. If no violations, then it returns the metered kW for peak load for the year (1.0 multiplier).

Aborts and returns 0 if no EnergyMeters.

Original COM help: https://opendss.epri.com/Capacity1.html

Disable(Name)#

Disable a circuit element by name (removes from circuit but leave in database).

Original COM help: https://opendss.epri.com/Disable.html

ElementLosses(Value)#

Array of total losses (complex) in a selection of elements. Use the element indices (starting at 1) as parameter.

(API Extension)

Enable(Name)#

Enable a circuit element by name

Original COM help: https://opendss.epri.com/Enable.html

EndOfTimeStepUpdate()#

Call EndOfTimeStepCleanup in SolutionAlgs (Do cleanup, sample monitors, and increment time).

Original COM help: https://opendss.epri.com/EndOfTimeStepUpdate.html

FirstElement()#

Set the first element of active class to be the Active element in the active circuit.

Returns 0 if none.

Original COM help: https://opendss.epri.com/FirstElement.html

FirstPCElement()#

Set the first Power Conversion (PC) element to be the active element.

Returns 0 if none.

Original COM help: https://opendss.epri.com/FirstPCElement.html

FirstPDElement()#

Set the first Power Delivery (PD) element to be the active element.

Returns 0 if none.

Original COM help: https://opendss.epri.com/FirstPDElement.html

FromJSON(data, options=0)#

Replaces the circuit, if any, with the one provided from a JSON-encoded string. If a Python dict is provided, json.dumps(data) is applied first.

The expected layout is defined from the JSON schema proposed at dss-extensions/AltDSS-Schema

The options parameter contains bit-flags to toggle specific features. See the enum DSSJSONFlags.

(API Extension)

LineLosses()#

Complex total line losses in the circuit

Original COM help: https://opendss.epri.com/LineLosses.html

Losses()#

Total losses in active circuit, complex number (two-element array of double).

Original COM help: https://opendss.epri.com/Losses.html

Name()#

Name of the active circuit.

NextElement()#

Set the next element of the active class to be the active element in the active circuit. Returns 0 if no more elements..

Original COM help: https://opendss.epri.com/NextElement.html

NextPCElement()#

Get the next Power Conversion (PC) element to be the active element.

Original COM help: https://opendss.epri.com/NextPCElement.html

NextPDElement()#

Get the next Power Delivery (PD) element to be the active element.

Original COM help: https://opendss.epri.com/NextPDElement.html

NumBuses()#

Total number of Buses in the circuit.

Original COM help: https://opendss.epri.com/NumBuses.html

NumCktElements()#

Number of CktElements in the circuit.

Original COM help: https://opendss.epri.com/NumCktElements.html

NumNodes()#

Total number of nodes in the circuit.

Original COM help: https://opendss.epri.com/NumNodes1.html

ParentPDElement()#

Sets Parent PD element, if any, to be the active circuit element and returns index>0; Returns 0 if it fails or not applicable.

Original COM help: https://opendss.epri.com/ParentPDElement.html

Sample()#

Force all Meters and Monitors to take a sample.

Original COM help: https://opendss.epri.com/Sample.html

Save(dirOrFilePath, options)#

Equivalent of the “save circuit” DSS command, but allows customization through the saveFlags argument, which is a set of bit flags. See the “DSSSaveFlags” enumeration for available flags:

  • CalcVoltageBases: Include the command CalcVoltageBases.

  • SetVoltageBases: Include commands to set the voltage bases individually.

  • IncludeOptions: Include most of the options (from the Set/Get DSS commands).

  • IncludeDisabled: Include disabled circuit elements (and LoadShapes).

  • ExcludeDefault: Exclude default DSS items if they are not modified by the user.

  • SingleFile: Use a single file instead of a folder for output.

  • KeepOrder: Save the circuit elements in the order they were loaded in the active circuit. Guarantees better reproducibility, especially when the system is ill-conditioned. Requires “SingleFile” flag.

  • ExcludeMeterZones: Do not export meter zones (as “feeders”) separately. Has no effect when using a single file.

  • IsOpen: Export commands to open terminals of elements.

  • ToString: to the result string. Requires “SingleFile” flag.

If SingleFile is enabled, the first argument (dirOrFilePath) is the file path, otherwise it is the folder path. For string output, the argument is not used.

(API Extension)

SaveSample()#

Force all meters and monitors to save their current buffers.

Original COM help: https://opendss.epri.com/SaveSample.html

SetActiveBus(BusName)#

Sets Active bus by name.

Ignores node list. Returns bus index (zero based) compatible with AllBusNames and Buses collection.

Original COM help: https://opendss.epri.com/SetActiveBus.html

SetActiveBusi(BusIndex)#

Set ActiveBus by an integer value.

0-based index compatible with SetActiveBus return value and AllBusNames indexing. Returns 0 if OK.

Original COM help: https://opendss.epri.com/SetActiveBusi.html

SetActiveClass(ClassName)#

Set the active class by name.

Use FirstElement, NextElement to iterate through the class. Returns -1 if fails.

Original COM help: https://opendss.epri.com/SetActiveClass.html

SetActiveElement(FullName)#

Set the Active Circuit Element using the full object name (e.g. “generator.g1”).

Returns -1 if not found. Else index to be used in CktElements collection or AllElementNames.

Original COM help: https://opendss.epri.com/SetActiveElement.html

SubstationLosses()#

Complex losses in all transformers designated to substations.

Original COM help: https://opendss.epri.com/SubstationLosses.html

SystemY()#

(read-only) System Y matrix (after a solution has been performed). This is deprecated as it returns a dense matrix. Only use it for small systems. For large-scale systems, prefer YMatrix.GetCompressedYMatrix.

Original COM help: https://opendss.epri.com/SystemY.html

ToJSON(options=0)#

Returns data for all objects and basic circuit properties as a JSON-encoded string.

The JSON data is organized using the JSON schema proposed at dss-extensions/AltDSS-Schema

The options parameter contains bit-flags to toggle specific features. See the enum DSSJSONFlags or Obj_ToJSON (C-API) for more.

(API Extension)

TotalPower()#

Total power (complex), kVA delivered to the circuit

Original COM help: https://opendss.epri.com/TotalPower.html

UpdateStorage()#

Force an update to all storage classes.

Typically done after a solution. Done automatically in intrinsic solution modes.

Original COM help: https://opendss.epri.com/UpdateStorage.html

YCurrents()#

Array of doubles containing complex injection currents for the present solution. It is the “I” vector of I=YV

Original COM help: https://opendss.epri.com/YCurrents.html

YNodeOrder()#

Array of strings containing the names of the nodes in the same order as the Y matrix

Original COM help: https://opendss.epri.com/YNodeOrder.html

YNodeVArray()#

Complex array of actual node voltages in same order as SystemY matrix.

Original COM help: https://opendss.epri.com/YNodeVarray.html

__init__(api_util, prefer_lists=None)#
__name__#

‘Circuit’

opendssdirect.CktElement#

class ICktElement(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

AllPropertyNames()#

Array containing all property names of the active device.

Original COM help: https://opendss.epri.com/AllPropertyNames.html

AllVariableNames()#

Array of strings listing all the published state variable names. Valid only for PCElements.

Original COM help: https://opendss.epri.com/AllVariableNames.html

AllVariableValues()#

Array of doubles. Values of state variables of active element if PC element. Valid only for PCElements.

Original COM help: https://opendss.epri.com/AllVariableValues.html

BusNames(*args)#

Bus definitions to which each terminal is connected.

Original COM help: https://opendss.epri.com/BusNames.html

Close(Term, Phs)#

Close the specified terminal and phase, if non-zero, or all conductors at the terminal.

Original COM help: https://opendss.epri.com/Close1.html

Controller(idx)#

Full name of the i-th controller attached to this element. Ex: str = Controller(2). See NumControls to determine valid index range

CplxSeqCurrents()#

Complex double array of Sequence Currents for all conductors of all terminals of active circuit element.

Original COM help: https://opendss.epri.com/CplxSeqCurrents.html

CplxSeqVoltages()#

Complex double array of Sequence Voltage for all terminals of active circuit element.

Original COM help: https://opendss.epri.com/CplxSeqVoltages1.html

Currents()#

Complex array of currents into each conductor of each terminal

Original COM help: https://opendss.epri.com/Currents1.html

CurrentsMagAng()#

Currents in magnitude, angle (degrees) format as a array of doubles.

Original COM help: https://opendss.epri.com/CurrentsMagAng.html

DisplayName(*args)#

Display name of the object (not necessarily unique)

Original COM help: https://opendss.epri.com/DisplayName.html

EmergAmps(*args)#

Emergency Ampere Rating for PD elements

Original COM help: https://opendss.epri.com/EmergAmps.html

Enabled(*args)#

Boolean indicating that element is currently in the circuit.

Original COM help: https://opendss.epri.com/Enabled.html

EnergyMeter()#

Name of the Energy Meter this element is assigned to.

Original COM help: https://opendss.epri.com/EnergyMeter.html

GUID()#

globally unique identifier for this object

Original COM help: https://opendss.epri.com/GUID.html

Handle()#

Pointer to this object

Original COM help: https://opendss.epri.com/Handle.html

HasOCPDevice()#

True if a recloser, relay, or fuse controlling this ckt element. OCP = Overcurrent Protection

Original COM help: https://opendss.epri.com/HasOCPDevice.html

HasSwitchControl()#

This element has a SwtControl attached.

Original COM help: https://opendss.epri.com/HasSwitchControl.html

HasVoltControl()#

This element has a CapControl or RegControl attached.

Original COM help: https://opendss.epri.com/HasVoltControl.html

IsIsolated()#

Returns true if the current active element is isolated. Note that this only fetches the current value. See also the Topology interface.

(API Extension)

IsOpen(Term, Phs)#
Losses()#

Total losses in the element: two-element double array (complex), in VA (watts, vars)

Original COM help: https://opendss.epri.com/Losses1.html

Name()#

Full Name of Active Circuit Element

Original COM help: https://opendss.epri.com/Name4.html

NodeOrder()#

Array of integer containing the node numbers (representing phases, for example) for each conductor of each terminal.

Original COM help: https://opendss.epri.com/NodeOrder.html

NodeRef()#

Array of integers, a copy of the internal NodeRef of the CktElement.

(API Extension)

NormalAmps(*args)#

Normal ampere rating for PD Elements

Original COM help: https://opendss.epri.com/NormalAmps.html

NumConductors()#

Number of Conductors per Terminal

Original COM help: https://opendss.epri.com/NumConductors.html

NumControls()#

Number of controls connected to this device. Use to determine valid range for index into Controller array.

Original COM help: https://opendss.epri.com/NumControls.html

NumPhases()#

Number of Phases

Original COM help: https://opendss.epri.com/NumPhases.html

NumProperties()#

Number of Properties this Circuit Element.

Original COM help: https://opendss.epri.com/NumProperties.html

NumTerminals()#

Number of Terminals this Circuit Element

Original COM help: https://opendss.epri.com/NumTerminals.html

OCPDevIndex()#

Index into Controller list of OCP Device controlling this CktElement

Original COM help: https://opendss.epri.com/OCPDevIndex.html

OCPDevType()#

0=None; 1=Fuse; 2=Recloser; 3=Relay; Type of OCP controller device

Original COM help: https://opendss.epri.com/OCPDevType.html

Open(Term, Phs)#

Open the specified terminal and phase, if non-zero, or all conductors at the terminal.

Original COM help: https://opendss.epri.com/Open1.html

PhaseLosses()#

Complex array of losses (kVA) by phase

Original COM help: https://opendss.epri.com/PhaseLosses.html

Powers()#

Complex array of powers (kVA) into each conductor of each terminal

Original COM help: https://opendss.epri.com/Powers.html

Residuals()#

Residual currents for each terminal: (magnitude, angle in degrees)

Original COM help: https://opendss.epri.com/Residuals.html

SeqCurrents()#

Double array of symmetrical component currents (magnitudes only) into each 3-phase terminal

Original COM help: https://opendss.epri.com/SeqCurrents.html

SeqPowers()#

Complex array of sequence powers (kW, kvar) into each 3-phase terminal

Original COM help: https://opendss.epri.com/SeqPowers.html

SeqVoltages()#

Double array of symmetrical component voltages (magnitudes only) at each 3-phase terminal

Original COM help: https://opendss.epri.com/SeqVoltages1.html

TotalPowers()#

Returns an array with the total powers (complex, kVA) at ALL terminals of the active circuit element.

Original COM help: https://opendss.epri.com/TotalPowers.html

Variable(MyVarName)#

If the active element is a PCElement, get the value of a variable by name. Otherwise, an exception is raised.

Variablei(Idx)#

If the active element is a PCElement, get the value of a variable by its integer index. Otherwise, an exception is raised.

Voltages()#

Complex array of voltages at terminals

Original COM help: https://opendss.epri.com/Voltages1.html

VoltagesMagAng()#

Voltages at each conductor in magnitude, angle form as array of doubles.

Original COM help: https://opendss.epri.com/VoltagesMagAng.html

YPrim()#

YPrim matrix, column order, complex numbers

Original COM help: https://opendss.epri.com/Yprim.html

__init__(api_util, prefer_lists=None)#
__name__#

‘CktElement’

setVariableByIndex(Idx, Value)#
setVariableByName(Idx, Value)#

opendssdirect.CNData#

class ICNData(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

CNData objects

(API Extension)

AllNames()#

Array of all names of this object type

Count()#

Number of objects of this type

DiaCable(*args)#
DiaIns(*args)#
DiaStrand(*args)#
Diameter(*args)#
EmergAmps(*args)#

Emergency ampere rating

EpsR(*args)#
First()#

Sets the first object of this type active. Returns 0 if none.

GMRUnits(*args)#
GMRac(*args)#
GmrStrand(*args)#
Idx(*args)#

Gets the current index or sets the active object of this type by index

InsLayer(*args)#
Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NormAmps(*args)#

Normal Ampere rating

RStrand(*args)#
Rac(*args)#
Radius(*args)#
RadiusUnits(*args)#
Rdc(*args)#
ResistanceUnits(*args)#
__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘CNData’

k(*args)#

opendssdirect.CtrlQueue#

class ICtrlQueue(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

Action(Param1)#

(write-only) Set the active action by index

Original COM help: https://opendss.epri.com/Action.html

ActionCode()#

Code for the active action. Integer code to tell the control device what to do.

Use this to determine what the user-defined controls are supposed to do. It can be any 32-bit integer of the user’s choosing and is the same value that the control pushed onto the control queue earlier.

Original COM help: https://opendss.epri.com/ActionCode.html

ClearActions()#

Clear all actions from the Control Proxy’s Action List (they are popped off the list).

Original COM help: https://opendss.epri.com/ClearActions.html

ClearQueue()#

Clear the control queue.

Original COM help: https://opendss.epri.com/ClearQueue.html

Delete(ActionHandle)#

Delete an Action from the DSS Control Queue by the handle that is returned when the action is added.

(The Push function returns the handle.)

Original COM help: https://opendss.epri.com/Delete.html

DeviceHandle()#

Handle (User defined) to device that must act on the pending action.

The user-written code driving the interface may support more than one control element as necessary to perform the simulation. This handle is an index returned to the user program that lets the program know which control is to perform the active action.

Original COM help: https://opendss.epri.com/DeviceHandle.html

DoAllQueue()#

Execute all actions currently on the Control Queue.

Side effect: clears the queue.

Original COM help: https://opendss.epri.com/DoAllQueue.html

NumActions()#

Number of Actions on the current action list (that have been popped off the control queue by CheckControlActions)

Original COM help: https://opendss.epri.com/NumActions.html

PopAction()#

Pops next action off the action list and makes it the active action. Returns zero if none.

Original COM help: https://opendss.epri.com/PopAction.html

Push(Hour, Seconds, ActionCode, DeviceHandle)#

Push a control action onto the DSS control queue by time, action code, and device handle (user defined). Returns Control Queue handle.

Original COM help: https://opendss.epri.com/Push.html

Queue()#

Array of strings containing the entire queue in CSV format

Original COM help: https://opendss.epri.com/Queue.html

QueueSize()#

Number of items on the OpenDSS control Queue

Original COM help: https://opendss.epri.com/QueueSize.html

Show()#

Export the queue to a CSV table and show it.

Original COM help: https://opendss.epri.com/Show.html

__init__(api_util, prefer_lists=None)#
__name__#

‘CtrlQueue’

opendssdirect.Element#

class IElement(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

AllPropertyNames()#

Array of strings containing the names of all properties for the active DSS object.

Original COM help: https://opendss.epri.com/AllPropertyNames1.html

Name()#

Full Name of Active DSS Object (general element or circuit element).

Original COM help: https://opendss.epri.com/Name5.html

NumProperties()#

Number of Properties for the active DSS object.

Original COM help: https://opendss.epri.com/NumProperties1.html

ToJSON(options=0)#

Returns the properties of the active DSS object as a JSON-encoded string.

The options parameter contains bit-flags to toggle specific features. See Obj_ToJSON (C-API) for more, or DSSObj.to_json in Python.

(API Extension)

__init__(api_util, prefer_lists=None)#
__name__#

‘Element’

opendssdirect.Error#

class IError(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

Description()#

Description of error for last operation

Original COM help: https://opendss.epri.com/Description1.html

EarlyAbort(*args)#

EarlyAbort controls whether all errors halts the DSS script processing (Compile/Redirect), defaults to True.

(API Extension)

ExtendedErrors(*args)#

Controls whether the extended error mechanism is used. Defaults to True.

Extended errors are errors derived from checks across the API to ensure a valid state. Although many of these checks are already present in the original/official COM interface, the checks do not produce any error message. An error value can be returned by a function but this value can, for many of the functions, be a valid value. As such, the user has no means to detect an invalid API call.

Extended errors use the Error interface to provide a more clear message and should help users, especially new users, to find usage issues earlier.

At Python level, an exception is raised when an error is detected through the Error interface.

The current default state is ON. For compatibility, the user can turn it off to restore the previous behavior.

(API Extension)

Number()#

Error Number (returns current value and then resets to zero)

Original COM help: https://opendss.epri.com/Number.html

UseExceptions(*args)#

Controls whether the automatic error checking mechanism is enable, i.e., if the DSS engine errors (from the Error interface) are mapped exception when detected.

When disabled, the user takes responsibility for checking for errors. This can be done through the Error interface. When Error.Number is not zero, there should be an error message in Error.Description. This is compatible with the behavior on the official OpenDSS (Windows-only COM implementation) when AllowForms is disabled.

Users can also use the DSS command Export ErrorLog to inspect for errors.

WARNING: This is a global setting, affects all DSS instances from DSS-Python, OpenDSSDirect.py and AltDSS.

(API Extension)

__init__(api_util, prefer_lists=None)#
__name__#

‘Error’

opendssdirect.Executive#

class IExecutive(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

Command(i)#

Get i-th command

Original COM help: https://opendss.epri.com/Command.html

CommandHelp(i)#

Get help string for i-th command

Original COM help: https://opendss.epri.com/CommandHelp.html

NumCommands()#

Number of DSS Executive Commands

Original COM help: https://opendss.epri.com/NumCommands.html

NumOptions()#

Number of DSS Executive Options

Original COM help: https://opendss.epri.com/NumOptions.html

Option(i)#

Get i-th option

Original COM help: https://opendss.epri.com/Option.html

OptionHelp(i)#

Get help string for i-th option

Original COM help: https://opendss.epri.com/OptionHelp.html

OptionValue(i)#

Get present value of i-th option

Original COM help: https://opendss.epri.com/OptionValue.html

__init__(api_util, prefer_lists=None)#
__name__#

‘Executive’

opendssdirect.Fuses#

class IFuses(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Close()#

Close all phases of the fuse.

Original COM help: https://opendss.epri.com/Close3.html

Count()#

Number of objects of this type

Delay(*args)#

A fixed delay time in seconds added to the fuse blowing time determined by the TCC curve. Default is 0. This represents a fuse clear or other delay.

Original COM help: https://opendss.epri.com/Delay1.html

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsBlown()#

Current state of the fuses. TRUE if any fuse on any phase is blown. Else FALSE.

Original COM help: https://opendss.epri.com/IsBlown.html

MonitoredObj(*args)#

Full name of the circuit element to which the fuse is connected.

Original COM help: https://opendss.epri.com/MonitoredObj1.html

MonitoredTerm(*args)#

Terminal number to which the fuse is connected.

Original COM help: https://opendss.epri.com/MonitoredTerm1.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NormalState(*args)#

Array of strings indicating the normal state of each phase of the fuse.

Original COM help: https://opendss.epri.com/NormalState2.html

NumPhases()#

Number of phases, this fuse.

Original COM help: https://opendss.epri.com/NumPhases1.html

Open()#

Manual opening of all phases of the fuse.

Original COM help: https://opendss.epri.com/Open2.html

RatedCurrent(*args)#

Multiplier or actual amps for the TCCcurve object. Defaults to 1.0.

Multiply current values of TCC curve by this to get actual amps.

Original COM help: https://opendss.epri.com/RatedCurrent.html

Reset()#

Reset fuse to normal state.

Original COM help: https://opendss.epri.com/Reset7.html

State(*args)#

Array of strings indicating the state of each phase of the fuse.

Original COM help: https://opendss.epri.com/State2.html

SwitchedObj(*args)#

Full name of the circuit element switch that the fuse controls. Defaults to the MonitoredObj.

Original COM help: https://opendss.epri.com/SwitchedObj.html

SwitchedTerm(*args)#

Number of the terminal of the controlled element containing the switch controlled by the fuse.

Original COM help: https://opendss.epri.com/SwitchedTerm.html

TCCCurve(*args)#

Name of the TCCcurve object that determines fuse blowing.

Original COM help: https://opendss.epri.com/TCCcurve.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Fuses’

opendssdirect.Generators#

class IGenerators(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Bus1(*args)#

Bus to which the Generator is connected. May include specific node specification.

(API Extension)

Class(*args)#

An arbitrary integer number representing the class of Generator so that Generator values may be segregated by class.

(API Extension)

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

ForcedON(*args)#

Indicates whether the generator is forced ON regardless of other dispatch criteria.

Original COM help: https://opendss.epri.com/ForcedON.html

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsDelta(*args)#

Generator connection. True/1 if delta connection, False/0 if wye.

(API Extension)

Model(*args)#

Generator Model

Original COM help: https://opendss.epri.com/Model.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

PF(*args)#

Power factor (pos. = producing vars). Updates kvar based on present kW value.

Original COM help: https://opendss.epri.com/PF.html

Phases(*args)#

Number of phases

Original COM help: https://opendss.epri.com/Phases.html

RegisterNames()#

Array of Names of all generator energy meter registers

See also the enum GeneratorRegisters.

RegisterValues()#

Array of values in generator energy meter registers.

Original COM help: https://opendss.epri.com/RegisterValues.html

Status(*args)#

Response to dispatch multipliers: Fixed=1 (dispatch multipliers do not apply), Variable=0 (follows curves).

Related enumeration: GeneratorStatus

(API Extension)

Vmaxpu(*args)#

Vmaxpu for generator model

Original COM help: https://opendss.epri.com/Vmaxpu.html

Vminpu(*args)#

Vminpu for Generator model

Original COM help: https://opendss.epri.com/Vminpu.html

Yearly(*args)#

Name of yearly loadshape

(API Extension)

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Generators’

daily(*args)#

Name of the loadshape for a daily generation profile.

(API Extension)

duty(*args)#

Name of the loadshape for a duty cycle simulation.

(API Extension)

kV(*args)#

Voltage base for the active generator, kV

Original COM help: https://opendss.epri.com/kV1.html

kVARated(*args)#

kVA rating of the generator

Original COM help: https://opendss.epri.com/kVArated.html

kW(*args)#

kW output for the active generator. kvar is updated for current power factor.

Original COM help: https://opendss.epri.com/kW.html

kva(*args)#

kVA rating of electrical machine. Applied to machine or inverter definition for Dynamics mode solutions.

(API Extension)

kvar(*args)#

kvar output for the active generator. Updates power factor based on present kW value.

Original COM help: https://opendss.epri.com/kvar.html

opendssdirect.GICSources#

class IGICSources(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Bus1()#

First bus name of GICSource (Created name)

Bus2()#

Second bus name

Count()#

Number of objects of this type

EE(*args)#

Eastward E Field, V/km

EN(*args)#

Northward E Field V/km

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

Lat1(*args)#

Latitude of Bus1 (degrees)

Lat2(*args)#

Latitude of Bus2 (degrees)

Lon1(*args)#

Longitude of Bus1 (Degrees)

Lon2(*args)#

Longitude of Bus2 (Degrees)

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

Phases(*args)#

Number of Phases, this GICSource element.

Volts(*args)#

Specify dc voltage directly

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘GICSources’

opendssdirect.Isource#

class IIsource(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Amps(*args)#

Magnitude of the ISource in amps

Original COM help: https://opendss.epri.com/Amps.html

AngleDeg(*args)#

Phase angle for ISource, degrees

Original COM help: https://opendss.epri.com/AngleDeg.html

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Frequency(*args)#

The present frequency of the ISource, Hz

Original COM help: https://opendss.epri.com/Frequency.html

Idx(*args)#

Gets the current index or sets the active object of this type by index

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Isource’

opendssdirect.LineCodes#

class ILineCodes(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

C0(*args)#

Zero-sequence capacitance, nF per unit length

Original COM help: https://opendss.epri.com/C2.html

C1(*args)#

Positive-sequence capacitance, nF per unit length

Original COM help: https://opendss.epri.com/C3.html

Cmatrix(*args)#

Capacitance matrix, nF per unit length

Original COM help: https://opendss.epri.com/Cmatrix1.html

Count()#

Number of objects of this type

EmergAmps(*args)#

Emergency ampere rating

Original COM help: https://opendss.epri.com/EmergAmps2.html

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsZ1Z0()#

Flag denoting whether impedance data were entered in symmetrical components

Original COM help: https://opendss.epri.com/IsZ1Z0.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NormAmps(*args)#

Normal Ampere rating

Original COM help: https://opendss.epri.com/NormAmps1.html

Phases(*args)#

Number of Phases

Original COM help: https://opendss.epri.com/Phases2.html

R0(*args)#

Zero-Sequence Resistance, ohms per unit length

Original COM help: https://opendss.epri.com/R2.html

R1(*args)#

Positive-sequence resistance ohms per unit length

Original COM help: https://opendss.epri.com/R3.html

Rmatrix(*args)#

Resistance matrix, ohms per unit length

Original COM help: https://opendss.epri.com/Rmatrix1.html

Units(*args)#
X0(*args)#

Zero Sequence Reactance, Ohms per unit length

Original COM help: https://opendss.epri.com/X2.html

X1(*args)#

Positive-sequence reactance, ohms per unit length

Original COM help: https://opendss.epri.com/X3.html

Xmatrix(*args)#

Reactance matrix, ohms per unit length

Original COM help: https://opendss.epri.com/Xmatrix1.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘LineCodes’

opendssdirect.LineGeometries#

class ILineGeometries(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

LineGeometry objects

(API Extension)

AllNames()#

Array of all names of this object type

Cmatrix(Frequency, Length, Units)#

Capacitance matrix, nF

Conductors()#

Array of strings with names of all conductors in the active LineGeometry object

Count()#

Number of objects of this type

EmergAmps(*args)#

Emergency ampere rating

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

Name(*args)#

Gets the current name or sets the active object of this type by name

Nconds(*args)#

Number of conductors in this geometry. Default is 3. Triggers memory allocations. Define first!

Next()#

Sets next object of this type active. Returns 0 if no more.

NormAmps(*args)#

Normal ampere rating

Phases(*args)#

Number of Phases

Reduce(*args)#
RhoEarth(*args)#
Rmatrix(Frequency, Length, Units)#

Resistance matrix, ohms

Units(*args)#
Xcoords(*args)#

Get/Set the X (horizontal) coordinates of the conductors

Xmatrix(Frequency, Length, Units)#

Reactance matrix, ohms

Ycoords(*args)#

Get/Set the Y (vertical/height) coordinates of the conductors

Zmatrix(Frequency, Length, Units)#

Complex impedance matrix, ohms

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘LineGeometries’

opendssdirect.LineSpacings#

class ILineSpacings(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

LineSpacing objects

(API Extension)

AllNames()#

Array of all names of this object type

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

Name(*args)#

Gets the current name or sets the active object of this type by name

Nconds(*args)#
Next()#

Sets next object of this type active. Returns 0 if no more.

Phases(*args)#

Number of Phases

Units(*args)#
Xcoords(*args)#

Get/Set the X (horizontal) coordinates of the conductors

Ycoords(*args)#

Get/Set the Y (vertical/height) coordinates of the conductors

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘LineSpacings’

opendssdirect.Lines#

class ILines(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Bus1(*args)#

Name of bus for terminal 1.

Original COM help: https://opendss.epri.com/Bus1.html

Bus2(*args)#

Name of bus for terminal 2.

Original COM help: https://opendss.epri.com/Bus2.html

C0(*args)#

Zero Sequence capacitance, nanofarads per unit length.

Original COM help: https://opendss.epri.com/C0.html

C1(*args)#

Positive Sequence capacitance, nanofarads per unit length.

Original COM help: https://opendss.epri.com/C1.html

CMatrix(*args)#
Count()#

Number of objects of this type

EmergAmps(*args)#

Emergency (maximum) ampere rating of Line.

Original COM help: https://opendss.epri.com/EmergAmps1.html

First()#

Sets the first object of this type active. Returns 0 if none.

Geometry(*args)#

Line geometry code

Original COM help: https://opendss.epri.com/Geometry.html

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsSwitch(*args)#

Sets/gets the Line element switch status. Setting it has side-effects to the line parameters.

(API Extension)

Length(*args)#

Length of line section in units compatible with the LineCode definition.

Original COM help: https://opendss.epri.com/Length.html

LineCode(*args)#

Name of LineCode object that defines the impedances.

Original COM help: https://opendss.epri.com/LineCode.html

Name(*args)#

Gets the current name or sets the active object of this type by name

New(Name)#
Next()#

Sets next object of this type active. Returns 0 if no more.

NormAmps(*args)#

Normal ampere rating of Line.

Original COM help: https://opendss.epri.com/NormAmps.html

NumCust()#

Number of customers on this line section.

Original COM help: https://opendss.epri.com/NumCust.html

Parent()#

Sets Parent of the active Line to be the active line. Returns 0 if no parent or action fails.

Original COM help: https://opendss.epri.com/Parent.html

Phases(*args)#

Number of Phases, this Line element.

Original COM help: https://opendss.epri.com/Phases1.html

R0(*args)#

Zero Sequence resistance, ohms per unit length.

Original COM help: https://opendss.epri.com/R0.html

R1(*args)#

Positive Sequence resistance, ohms per unit length.

Original COM help: https://opendss.epri.com/R1.html

RMatrix(*args)#

Resistance matrix (full), ohms per unit length. Array of doubles.

Original COM help: https://opendss.epri.com/Rmatrix.html

Rg(*args)#

Earth return resistance value used to compute line impedances at power frequency

Original COM help: https://opendss.epri.com/Rg.html

Rho(*args)#

Earth Resistivity, m-ohms

Original COM help: https://opendss.epri.com/Rho.html

SeasonRating()#

Delivers the rating for the current season (in Amps) if the “SeasonalRatings” option is active

Original COM help: https://opendss.epri.com/SeasonRating.html

Spacing(*args)#

Line spacing code

Original COM help: https://opendss.epri.com/Spacing.html

TotalCust()#

Total Number of customers served from this line section.

Original COM help: https://opendss.epri.com/TotalCust.html

Units(*args)#
X0(*args)#

Zero Sequence reactance ohms per unit length.

Original COM help: https://opendss.epri.com/X0.html

X1(*args)#

Positive Sequence reactance, ohms per unit length.

Original COM help: https://opendss.epri.com/X1.html

XMatrix(*args)#

Reactance matrix (full), ohms per unit length. Array of doubles.

Original COM help: https://opendss.epri.com/Xmatrix.html

Xg(*args)#

Earth return reactance value used to compute line impedances at power frequency

Original COM help: https://opendss.epri.com/Xg.html

Yprim(*args)#

Yprimitive for the active line object (complex array).

Original COM help: https://opendss.epri.com/Yprim1.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Lines’

opendssdirect.LoadShape#

class ILoadShape(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

HrInterval(*args)#

Fixed interval time value, in hours.

Original COM help: https://opendss.epri.com/HrInterval.html

Idx(*args)#

Gets the current index or sets the active object of this type by index

MinInterval(*args)#

Fixed Interval time value, in minutes

Original COM help: https://opendss.epri.com/MinInterval.html

Name(*args)#

Gets the current name or sets the active object of this type by name

New(Name)#

Create a new LoadShape, with default parameters

Next()#

Sets next object of this type active. Returns 0 if no more.

Normalize()#

Normalize the LoadShape data inplace

Npts(*args)#

Get/set Number of points in active Loadshape.

Original COM help: https://opendss.epri.com/Npts.html

PBase(*args)#

Base P value for normalization. Default is zero, meaning the peak will be used.

Original COM help: https://opendss.epri.com/Pbase.html

PMult(*args)#

Array of doubles for the P multiplier in the Loadshape.

Original COM help: https://opendss.epri.com/Pmult.html

QBase(*args)#

Base for normalizing Q curve. If left at zero, the peak value is used.

Original COM help: https://opendss.epri.com/Qbase.html

QMult(*args)#

Array of doubles containing the Q multipliers.

Original COM help: https://opendss.epri.com/Qmult.html

SInterval(*args)#

Fixed interval time value, in seconds.

Original COM help: https://opendss.epri.com/Sinterval.html

TimeArray(*args)#

Time array in hours corresponding to P and Q multipliers when the Interval=0.

Original COM help: https://opendss.epri.com/TimeArray.html

UseActual(*args)#

Boolean flag to let Loads know to use the actual value in the curve rather than use the value as a multiplier.

Original COM help: https://opendss.epri.com/UseActual.html

UseFloat32()#

Converts the current LoadShape data to float32/single precision. If there is no data or the data is already represented using float32, nothing is done.

(API Extension)

UseFloat64()#

Converts the current LoadShape data to float64/double precision. If there is no data or the data is already represented using float64, nothing is done.

(API Extension)

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘LoadShape’

opendssdirect.Loads#

class ILoads(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

AllocationFactor(*args)#

Factor for allocating loads by connected xfkva

Original COM help: https://opendss.epri.com/AllocationFactor.html

CFactor(*args)#

Factor relates average to peak kw. Used for allocation with kwh and kwhdays

Original COM help: https://opendss.epri.com/Cfactor.html

CVRCurve(*args)#

Name of a loadshape with both Mult and Qmult, for CVR factors as a function of time.

Original COM help: https://opendss.epri.com/CVRcurve.html

CVRvars(*args)#

Percent reduction in Q for percent reduction in V. Must be used with dssLoadModelCVR.

Original COM help: https://opendss.epri.com/CVRvars.html

CVRwatts(*args)#

Percent reduction in P for percent reduction in V. Must be used with dssLoadModelCVR.

Original COM help: https://opendss.epri.com/CVRwatts.html

Class(*args)#

Code number used to separate loads by class or group. No effect on the solution.

Original COM help: https://opendss.epri.com/Class.html

Count()#

Number of objects of this type

Daily(*args)#

Name of the loadshape for a daily load profile.

Original COM help: https://opendss.epri.com/daily.html

Duty(*args)#

Name of the loadshape for a duty cycle simulation.

Original COM help: https://opendss.epri.com/duty.html

First()#

Sets the first object of this type active. Returns 0 if none.

Growth(*args)#

Name of the growthshape curve for yearly load growth factors.

Original COM help: https://opendss.epri.com/Growth.html

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsDelta(*args)#

Delta loads are connected line-to-line.

Original COM help: https://opendss.epri.com/IsDelta1.html

Model(*args)#

The Load Model defines variation of P and Q with voltage.

Original COM help: https://opendss.epri.com/Model1.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NumCust(*args)#

Number of customers in this load, defaults to one.

Original COM help: https://opendss.epri.com/NumCust1.html

PF(*args)#

Get or set Power Factor for Active Load. Specify leading PF as negative. Updates kvar based on present value of kW

Original COM help: https://opendss.epri.com/PF1.html

PctMean(*args)#

Average percent of nominal load in Monte Carlo studies; only if no loadshape defined for this load.

Original COM help: https://opendss.epri.com/PctMean.html

PctStdDev(*args)#

Percent standard deviation for Monte Carlo load studies; if there is no loadshape assigned to this load.

Original COM help: https://opendss.epri.com/PctStdDev.html

Phases(*args)#

Number of phases

(API Extension)

RelWeighting(*args)#

Relative Weighting factor for the active LOAD

Original COM help: https://opendss.epri.com/RelWeight.html

Rneut(*args)#

Neutral resistance for wye-connected loads.

Original COM help: https://opendss.epri.com/Rneut.html

Sensor()#

Name of the sensor monitoring this load.

Original COM help: https://opendss.epri.com/Sensor.html

Spectrum(*args)#

Name of harmonic current spectrum shape.

Original COM help: https://opendss.epri.com/Spectrum.html

Status(*args)#

Response to load multipliers: Fixed (growth only), Exempt (no LD curve), Variable (all).

Original COM help: https://opendss.epri.com/Status.html

Vmaxpu(*args)#

Maximum per-unit voltage to use the load model. Above this, constant Z applies.

Original COM help: https://opendss.epri.com/Vmaxpu1.html

VminEmerg(*args)#

Minimum voltage for unserved energy (UE) evaluation.

Original COM help: https://opendss.epri.com/Vminemerg.html

VminNorm(*args)#

Minimum voltage for energy exceeding normal (EEN) evaluations.

Original COM help: https://opendss.epri.com/Vminnorm.html

Vminpu(*args)#

Minimum voltage to apply the load model. Below this, constant Z is used.

Original COM help: https://opendss.epri.com/Vminpu1.html

XfkVA(*args)#

Rated service transformer kVA for load allocation, using AllocationFactor. Affects kW, kvar, and pf.

Original COM help: https://opendss.epri.com/xfkVA.html

Xneut(*args)#

Neutral reactance for wye-connected loads.

Original COM help: https://opendss.epri.com/Xneut.html

Yearly(*args)#

Name of yearly duration loadshape

Original COM help: https://opendss.epri.com/Yearly.html

ZipV(*args)#

Array of 7 doubles with values for ZIPV property of the load object

Original COM help: https://opendss.epri.com/ZIPV.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Loads’

kV(*args)#

kV rating for active Load. For 2 or more phases set Line-Line kV. Else actual kV across terminals.

Original COM help: https://opendss.epri.com/kV2.html

kVABase(*args)#

Base load kva. Also defined kw and kvar or pf input, or load allocation by kwh or xfkva.

Original COM help: https://opendss.epri.com/kva.html

kW(*args)#

Set kW for active Load. Updates kvar based on present PF.

Original COM help: https://opendss.epri.com/kW1.html

kWh(*args)#

kWh billed for this period. Can be used with Cfactor for load allocation.

Original COM help: https://opendss.epri.com/kwh.html

kWhDays(*args)#

Length of kWh billing period for average demand calculation. Default 30.

Original COM help: https://opendss.epri.com/kwhdays.html

kvar(*args)#

Reactive power in kvar for active Load. If set, updates PF based on present kW.

Original COM help: https://opendss.epri.com/kvar1.html

puSeriesRL(*args)#

Percent of Load that is modeled as series R-L for harmonics studies

Original COM help: https://opendss.epri.com/pctSeriesRL.html

opendssdirect.Meters#

class IMeters(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllBranchesInZone()#

Wide string list of all branches in zone of the active EnergyMeter object.

Original COM help: https://opendss.epri.com/AllBranchesInZone.html

AllEndElements()#

Array of names of all zone end elements.

Original COM help: https://opendss.epri.com/AllEndElements.html

AllNames()#

Array of all names of this object type

AllocFactors(*args)#

Array of doubles: set the phase allocation factors for the active meter.

Original COM help: https://opendss.epri.com/AllocFactors.html

AvgRepairTime()#

Average Repair time in this section of the meter zone

Original COM help: https://opendss.epri.com/AvgRepairTime.html

CalcCurrent(*args)#

Set the magnitude of the real part of the Calculated Current (normally determined by solution) for the Meter to force some behavior on Load Allocation

Original COM help: https://opendss.epri.com/CalcCurrent.html

CloseAllDIFiles()#

Close All Demand Interval Files. Users are required to close the DI files at the end of a run.

Original COM help: https://opendss.epri.com/CloseAllDIFiles.html

Count()#

Number of objects of this type

CountBranches()#

Number of branches in Active EnergyMeter zone. (Same as sequence list size)

Original COM help: https://opendss.epri.com/CountBranches.html

CountEndElements()#

Number of zone end elements in the active meter zone.

Original COM help: https://opendss.epri.com/CountEndElements.html

CustInterrupts()#

Total customer interruptions for this Meter zone based on reliability calcs.

Original COM help: https://opendss.epri.com/CustInterrupts.html

DIFilesAreOpen()#

Global Flag in the DSS to indicate if Demand Interval (DI) files have been properly opened.

Original COM help: https://opendss.epri.com/DIFilesAreOpen.html

DoReliabilityCalc(AssumeRestoration)#

Calculate reliability indices

Original COM help: https://opendss.epri.com/DoReliabilityCalc.html

FaultRateXRepairHrs()#

Sum of Fault Rate time Repair Hrs in this section of the meter zone

Original COM help: https://opendss.epri.com/FaultRateXRepairHrs.html

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

MeteredElement(*args)#

Name of metered element

Original COM help: https://opendss.epri.com/MeteredElement.html

MeteredTerminal(*args)#

Number of Metered Terminal

Original COM help: https://opendss.epri.com/MeteredTerminal.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NumSectionBranches()#

Number of branches (lines) in this section

Original COM help: https://opendss.epri.com/NumSectionBranches.html

NumSectionCustomers()#

Number of Customers in the active section.

Original COM help: https://opendss.epri.com/NumSectionCustomers.html

NumSections()#

Number of feeder sections in this meter’s zone

Original COM help: https://opendss.epri.com/NumSections.html

OCPDeviceType()#

Type of OCP device. 1=Fuse; 2=Recloser; 3=Relay

Original COM help: https://opendss.epri.com/OCPDeviceType.html

OpenAllDIFiles()#

Open Demand Interval (DI) files

Original COM help: https://opendss.epri.com/OpenAllDIFiles.html

PeakCurrent(*args)#

Array of doubles to set values of Peak Current property

Original COM help: https://opendss.epri.com/Peakcurrent.html

RegisterNames()#

Array of strings containing the names of the registers.

See also the enum EnergyMeterRegisters for the standard register names. Besides those listed in the enumeration, users may need to check RegisterNames in order to find a specific register index at runtime.

Original COM help: https://opendss.epri.com/RegisterNames1.html

RegisterValues()#

Array of all the values contained in the Meter registers for the active Meter.

Original COM help: https://opendss.epri.com/RegisterValues1.html

Reset()#

Resets registers of active meter.

Original COM help: https://opendss.epri.com/Reset2.html

ResetAll()#

Resets registers of all meter objects.

Original COM help: https://opendss.epri.com/ResetAll.html

SAIDI()#

SAIDI for this meter’s zone. Execute DoReliabilityCalc first.

Original COM help: https://opendss.epri.com/SAIDI.html

SAIFI()#

Returns SAIFI for this meter’s Zone. Execute Reliability Calc method first.

Original COM help: https://opendss.epri.com/SAIFI.html

SAIFIkW()#

SAIFI based on kW rather than number of customers. Get after reliability calcs.

Original COM help: https://opendss.epri.com/SAIFIKW.html

Sample()#

Forces active Meter to take a sample.

Original COM help: https://opendss.epri.com/Sample1.html

SampleAll()#

Causes all EnergyMeter objects to take a sample at the present time.

Original COM help: https://opendss.epri.com/SampleAll.html

Save()#

Saves meter register values.

Original COM help: https://opendss.epri.com/Save.html

SaveAll()#

Save All EnergyMeter objects

Original COM help: https://opendss.epri.com/SaveAll.html

SectSeqidx()#

SequenceIndex of the branch at the head of this section

Original COM help: https://opendss.epri.com/SectSeqIdx.html

SectTotalCust()#

Total Customers downline from this section

Original COM help: https://opendss.epri.com/SectTotalCust.html

SeqListSize()#

Size of the Sequence List

Original COM help: https://opendss.epri.com/SeqListSize.html

SequenceList(*args)#

Get/set Index into Meter’s SequenceList that contains branch pointers in lexical order. Earlier index guaranteed to be upline from later index. Sets PDelement active.

Original COM help: https://opendss.epri.com/SequenceIndex.html

SetActiveSection(SectIdx)#
SumBranchFltRates()#

Sum of the branch fault rates in this section of the meter’s zone

Original COM help: https://opendss.epri.com/SumBranchFltRates.html

TotalCustomers()#

Total Number of customers in this zone (downline from the EnergyMeter)

Original COM help: https://opendss.epri.com/TotalCustomers.html

Totals()#

Totals of all registers of all meters

Original COM help: https://opendss.epri.com/Totals.html

ZonePCE()#

Returns the list of all PCE within the area covered by the energy meter

Original COM help: https://opendss.epri.com/ZonePCE.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Meters’

opendssdirect.Monitors#

class IMonitors(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

AsMatrix()#

Matrix of the active monitor, containing the hour vector, seconds vector, and all channels (index 2 = channel 1). If you need multiple channels, prefer using this function as it processes the monitor byte-stream once.

(API Extension)

ByteStream()#

Byte Array containing monitor stream values. Make sure a “save” is done first (standard solution modes do this automatically)

Original COM help: https://opendss.epri.com/ByteStream.html

Channel(Index)#

(read-only) Array of float32 for the specified channel (usage: MyArray = DSSMonitor.Channel(i)). A Save or SaveAll should be executed first. Done automatically by most standard solution modes. Channels start at index 1.

Original COM help: https://opendss.epri.com/Channel.html

Count()#

Number of objects of this type

Element(*args)#

Full object name of element being monitored.

Original COM help: https://opendss.epri.com/Element.html

FileName()#

Name of CSV file associated with active Monitor.

Original COM help: https://opendss.epri.com/FileName.html

FileVersion()#

Monitor File Version (integer)

Original COM help: https://opendss.epri.com/FileVersion.html

First()#

Sets the first object of this type active. Returns 0 if none.

Header()#

Header string; Array of strings containing Channel names

Original COM help: https://opendss.epri.com/Header.html

Idx(*args)#

Gets the current index or sets the active object of this type by index

Mode(*args)#

Set Monitor mode (bitmask integer - see DSS Help)

Original COM help: https://opendss.epri.com/Mode1.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NumChannels()#

Number of Channels in the active Monitor

Original COM help: https://opendss.epri.com/NumChannels.html

Process()#

Post-process monitor samples taken so far, e.g., Pst for mode=4.

Original COM help: https://opendss.epri.com/Process.html

ProcessAll()#

Post-process all monitor samples taken so far, e.g., Pst for mode=4.

Original COM help: https://opendss.epri.com/ProcessAll.html

RecordSize()#

Size of each record in ByteStream (Integer). Same as NumChannels.

Original COM help: https://opendss.epri.com/RecordSize.html

Reset()#

Reset active Monitor object.

Original COM help: https://opendss.epri.com/Reset3.html

ResetAll()#

Reset all Monitor objects.

Original COM help: https://opendss.epri.com/ResetAll1.html

Sample()#

Instruct the active Monitor to take a sample of the present state.

Original COM help: https://opendss.epri.com/Sample2.html

SampleAll()#

Instruct all Monitor objects to take a sample of the present state.

Original COM help: https://opendss.epri.com/SampleAll1.html

SampleCount()#

Number of Samples in Monitor at Present

Original COM help: https://opendss.epri.com/SampleCount.html

Save()#

Instructs the active monitor to save its current sample buffer to its monitor stream.

After the data is on the stream, you can access the ByteStream or channel data.

Most standard solution modes do this automatically.

Original COM help: https://opendss.epri.com/Save1.html

SaveAll()#

Instructs the all monitor objects to save their current sample buffers to the respective monitor streams.

Most standard solution modes do this automatically.

Original COM help: https://opendss.epri.com/SaveAll1.html

Show()#

Convert the monitor data to text and displays it with the text editor.

Original COM help: https://opendss.epri.com/Show3.html

Terminal(*args)#

Terminal number of element being monitored.

Original COM help: https://opendss.epri.com/Terminal.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Monitors’

dblFreq()#

Array of doubles containing frequency values for harmonics mode solutions; Empty for time mode solutions (use dblHour)

Original COM help: https://opendss.epri.com/dblFreq.html

dblHour()#

Array of doubles containing time value in hours for time-sampled monitor values; Empty if frequency-sampled values for harmonics solution (see dblFreq)

Original COM help: https://opendss.epri.com/dblHour.html

opendssdirect.Parallel#

class IParallel(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

Parallel machine interface

On DSS-Extensions, prefer using DSSContexts and native threading capabilities of your programming language, if available.

ActiveActor(*args)#

Gets/sets the ID of the Active Actor

Original COM help: https://opendss.epri.com/ActiveActor.html

ActiveParallel(*args)#

(read) Sets ON/OFF (1/0) Parallel features of the Engine (write) Delivers if the Parallel features of the Engine are Active

Original COM help: https://opendss.epri.com/ActiveParallel.html

ActorCPU(*args)#

Gets/sets the CPU of the Active Actor

Original COM help: https://opendss.epri.com/ActorCPU.html

ActorProgress()#

Gets the progress of all existing actors in pct

Original COM help: https://opendss.epri.com/ActorProgress.html

ActorStatus()#

Gets the status of each actor

Original COM help: https://opendss.epri.com/ActorStatus.html

ConcatenateReports(*args)#

(read) Reads the values of the ConcatenateReports option (1=enabled, 0=disabled) (write) Enable/Disable (1/0) the ConcatenateReports option for extracting monitors data

Original COM help: https://opendss.epri.com/ConcatenateReports.html

CreateActor()#

Create a new actor, if there are still cores available.

NumCPUs()#

Delivers the number of CPUs on the current PC

Original COM help: https://opendss.epri.com/NumCPUs.html

NumCores()#

Delivers the number of Cores of the local PC

Original COM help: https://opendss.epri.com/NumCores.html

NumOfActors()#

Gets the number of Actors created

Original COM help: https://opendss.epri.com/NumOfActors.html

Wait()#

Suspends the host’s thread until all the OpenDSS running jobs finish.

Original COM help: https://opendss.epri.com/Wait.html

__init__(api_util, prefer_lists=None)#
__name__#

‘Parallel’

opendssdirect.PDElements#

class IPDElements(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

AccumulatedL()#

Accumulated failure rate for this branch on downline

Original COM help: https://opendss.epri.com/AccumulatedL.html

AllCplxSeqCurrents()#

Complex double array of Sequence Currents for all conductors of all terminals, for each PD elements.

(API Extension)

AllCurrents()#

Complex array of currents for all conductors, all terminals, for each PD element.

(API Extension)

AllCurrentsMagAng()#

Complex array (magnitude and angle format) of currents for all conductors, all terminals, for each PD element.

(API Extension)

AllMaxCurrents(AllNodes=False)#

Array of doubles with the maximum current across the conductors, for each PD element.

By default, only the first terminal is used for the maximum current, matching the behavior of the “export capacity” command. Pass AllNodes=True to force the analysis to all terminals.

See also: https://sourceforge.net/p/electricdss/discussion/beginners/thread/da5b93ca/

(API Extension)

AllNames()#

Array of strings consisting of all PD element names.

(API Extension)

AllNumConductors()#

Integer array listing the number of conductors of all PD elements

(API Extension)

AllNumPhases()#

Integer array listing the number of phases of all PD elements

(API Extension)

AllNumTerminals()#

Integer array listing the number of terminals of all PD elements

(API Extension)

AllPctEmerg(AllNodes=False)#

Array of doubles with the maximum current across the conductors as a percentage of the Emergency Ampere Rating, for each PD element.

By default, only the first terminal is used for the maximum current, matching the behavior of the “export capacity” command. Pass AllNodes=True to force the analysis to all terminals.

See also: https://sourceforge.net/p/electricdss/discussion/beginners/thread/da5b93ca/

(API Extension)

AllPctNorm(AllNodes=False)#

Array of doubles with the maximum current across the conductors as a percentage of the Normal Ampere Rating, for each PD element.

By default, only the first terminal is used for the maximum current, matching the behavior of the “export capacity” command. Pass AllNodes=True to force the analysis to all terminals.

See also: https://sourceforge.net/p/electricdss/discussion/beginners/thread/da5b93ca/

(API Extension)

AllPowers()#

Complex array of powers into each conductor of each terminal, for each PD element.

(API Extension)

AllSeqCurrents()#

Double array of the symmetrical component currents (magnitudes only) into each 3-phase terminal, for each PD element.

(API Extension)

AllSeqPowers()#

Complex array of sequence powers into each 3-phase terminal, for each PD element

(API Extension)

Count()#

Number of PD elements (including disabled elements)

Original COM help: https://opendss.epri.com/Count12.html

FaultRate(*args)#

Get/Set Number of failures per year. For LINE elements: Number of failures per unit length per year.

First()#

(read-only) Set the first enabled PD element to be the active element. Returns 0 if none found.

FromTerminal()#

(read-only) Number of the terminal of active PD element that is on the “from” side. This is set after the meter zone is determined.

IsShunt()#

(read-only) Boolean indicating of PD element should be treated as a shunt element rather than a series element. Applies to Capacitor and Reactor elements in particular.

Lambda()#

Failure rate for this branch. Faults per year including length of line.

Original COM help: https://opendss.epri.com/Lambda1.html

Name(*args)#

Get/Set name of active PD Element. Returns null string if active element is not PDElement type.

Next()#

(read-only) Advance to the next PD element in the circuit. Enabled elements only. Returns 0 when no more elements.

NumCustomers()#

Number of customers, this branch

Original COM help: https://opendss.epri.com/Numcustomers.html

ParentPDElement()#

(read-only) Sets the parent PD element to be the active circuit element. Returns 0 if no more elements upline.

PctPermanent(*args)#

Get/Set percent of faults that are permanent (require repair). Otherwise, fault is assumed to be transient/temporary.

Original COM help: https://opendss.epri.com/pctPermanent.html

RepairTime(*args)#

Average repair time for this element in hours

Original COM help: https://opendss.epri.com/RepairTime.html

SectionID()#

Integer ID of the feeder section that this PDElement branch is part of

Original COM help: https://opendss.epri.com/SectionID1.html

TotalCustomers()#

Total number of customers from this branch to the end of the zone

Original COM help: https://opendss.epri.com/TotalCustomers1.html

TotalMiles()#

Total miles of line from this element to the end of the zone. For recloser siting algorithm.

Original COM help: https://opendss.epri.com/TotalMiles1.html

__init__(api_util, prefer_lists=None)#
__name__#

‘PDElements’

opendssdirect.PVsystems#

class IPVsystems(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

Irradiance(*args)#

Get/set the present value of the Irradiance property in kW/m²

Original COM help: https://opendss.epri.com/Irradiance.html

IrradianceNow()#

Returns the current irradiance value for the active PVSystem. Use it to know what’s the current irradiance value for the PV during a simulation.

Original COM help: https://opendss.epri.com/IrradianceNow.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

Pmpp(*args)#

Gets/sets the rated max power of the PV array for 1.0 kW/m² irradiance and a user-selected array temperature of the active PVSystem.

Original COM help: https://opendss.epri.com/Pmpp.html

RegisterNames()#

Array of PVSystem energy meter register names

See also the enum GeneratorRegisters.

Original COM help: https://opendss.epri.com/RegisterNames2.html

RegisterValues()#

Array of doubles containing values in PVSystem registers.

Original COM help: https://opendss.epri.com/RegisterValues2.html

Sensor()#

Name of the sensor monitoring this element.

Original COM help: https://opendss.epri.com/Sensor1.html

Tdaily(*args)#

Temperature shape to use for daily simulations. Must be previously defined as a TShape object of 24 hrs, typically. The PVSystem element uses this TShape to determine the Pmpp from the Pmpp vs T curve. Units must agree with the Pmpp vs T curve.

(API Extension)

Tduty(*args)#

Temperature shape to use for duty cycle dispatch simulations such as for solar ramp rate studies. Must be previously defined as a TShape object. Typically would have time intervals of 1-5 seconds. Designate the number of points to solve using the Set Number=xxxx command. If there are fewer points in the actual shape, the shape is assumed to repeat. The PVSystem model uses this TShape to determine the Pmpp from the Pmpp vs T curve. Units must agree with the Pmpp vs T curve.

(API Extension)

Tyearly(*args)#

Temperature shape to use for yearly simulations. Must be previously defined as a TShape object. If this is not specified, the Daily dispatch shape, if any, is repeated during Yearly solution modes. The PVSystem element uses this TShape to determine the Pmpp from the Pmpp vs T curve. Units must agree with the Pmpp vs T curve.

(API Extension)

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘PVsystems’

daily(*args)#

Name of the dispatch shape to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. In the default dispatch mode, the PVSystem element uses this loadshape to trigger State changes.

(API Extension)

duty(*args)#

Name of the load shape to use for duty cycle dispatch simulations such as for solar ramp rate studies. Must be previously defined as a Loadshape object. Typically would have time intervals of 1-5 seconds.

(API Extension)

kVARated(*args)#

Get/set Rated kVA of the PVSystem

Original COM help: https://opendss.epri.com/kVArated1.html

kW()#

Get kW output

Original COM help: https://opendss.epri.com/kW2.html

kvar(*args)#

Get/set kvar output value

Original COM help: https://opendss.epri.com/kvar2.html

pf(*args)#

Get/set the power factor for the active PVSystem

Original COM help: https://opendss.epri.com/PF2.html

yearly(*args)#

Dispatch shape to use for yearly simulations. Must be previously defined as a Loadshape object. If this is not specified, the Daily dispatch shape, if any, is repeated during Yearly solution modes. In the default dispatch mode, the PVSystem element uses this loadshape to trigger State changes.

(API Extension)

opendssdirect.Parser#

class IParser(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

AutoIncrement(*args)#

Default is FALSE. If TRUE, the parser automatically advances to next token after DblValue, IntValue, or StrValue. Simpler when you don’t need to check for parameter names.

Original COM help: https://opendss.epri.com/AutoIncrement.html

BeginQuote(*args)#

Get/Set String containing the the characters for Quoting in OpenDSS scripts. Matching pairs defined in EndQuote. Default is “’([{.

Original COM help: https://opendss.epri.com/BeginQuote.html

CmdString(*args)#

String to be parsed. Loading this string resets the Parser to the beginning of the line. Then parse off the tokens in sequence.

Original COM help: https://opendss.epri.com/CmdString.html

DblValue()#

Return next parameter as a double.

Original COM help: https://opendss.epri.com/DblValue.html

Delimiters(*args)#

String defining hard delimiters used to separate token on the command string. Default is , and =. The = separates token name from token value. These override whitespace to separate tokens.

Original COM help: https://opendss.epri.com/Delimiters.html

EndQuote(*args)#

String containing characters, in order, that match the beginning quote characters in BeginQuote. Default is “’)]}

Original COM help: https://opendss.epri.com/EndQuote.html

IntValue()#

Return next parameter as a long integer.

Original COM help: https://opendss.epri.com/IntValue.html

Matrix(ExpectedOrder)#

Use this property to parse a Matrix token in OpenDSS format. Returns square matrix of order specified. Order same as default Fortran order: column by column.

NextParam()#

Get next token and return tag name (before = sign) if any. See AutoIncrement.

Original COM help: https://opendss.epri.com/NextParam.html

ResetDelimiters()#

Reset the delimiters to their default values.

Original COM help: https://opendss.epri.com/ResetDelimiters.html

StrValue()#

Return next parameter as a string

Original COM help: https://opendss.epri.com/StrValue.html

SymMatrix(ExpectedOrder)#

Use this property to parse a matrix token specified in lower triangle form. Symmetry is forced.

Vector(ExpectedSize)#

Returns token as array of doubles. For parsing quoted array syntax.

WhiteSpace(*args)#

Get/set the characters used for White space in the command string. Default is blank and Tab.

Original COM help: https://opendss.epri.com/WhiteSpace.html

__init__(api_util, prefer_lists=None)#
__name__#

‘Parser’

opendssdirect.Progress#

class IProgress(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

Caption(Value)#

(write-only) Caption to appear on the bottom of the DSS Progress form.

Original COM help: https://opendss.epri.com/Caption.html

Close()#
PctProgress(Value)#

(write-only) Percent progress to indicate [0..100]

Original COM help: https://opendss.epri.com/PctProgress.html

Show()#
__init__(api_util, prefer_lists=None)#
__name__#

‘Progress’

opendssdirect.Properties#

class IProperties(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

Description()#

(read-only) Description of the property.

Name()#

(read-only) Name of Property

Value(*args)#
__init__(api_util, prefer_lists=None)#
__name__#

‘Properties’

opendssdirect.RegControls#

class IRegControls(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

CTPrimary(*args)#

CT primary ampere rating (secondary is 0.2 amperes)

Original COM help: https://opendss.epri.com/CTPrimary.html

Count()#

Number of objects of this type

Delay(*args)#

Time delay [s] after arming before the first tap change. Control may reset before actually changing taps.

Original COM help: https://opendss.epri.com/Delay2.html

First()#

Sets the first object of this type active. Returns 0 if none.

ForwardBand(*args)#

Regulation bandwidth in forward direction, centered on Vreg

Original COM help: https://opendss.epri.com/ForwardBand.html

ForwardR(*args)#

LDC R setting in Volts

Original COM help: https://opendss.epri.com/ForwardR.html

ForwardVreg(*args)#

Target voltage in the forward direction, on PT secondary base.

Original COM help: https://opendss.epri.com/ForwardVreg.html

ForwardX(*args)#

LDC X setting in Volts

Original COM help: https://opendss.epri.com/ForwardX.html

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsInverseTime(*args)#

Time delay is inversely adjusted, proportional to the amount of voltage outside the regulating band.

Original COM help: https://opendss.epri.com/IsInverseTime.html

IsReversible(*args)#

Regulator can use different settings in the reverse direction. Usually not applicable to substation transformers.

Original COM help: https://opendss.epri.com/IsReversible.html

MaxTapChange(*args)#

Maximum tap change per iteration in STATIC solution mode. 1 is more realistic, 16 is the default for a faster solution.

Original COM help: https://opendss.epri.com/MaxTapChange.html

MonitoredBus(*args)#

Name of a remote regulated bus, in lieu of LDC settings

Original COM help: https://opendss.epri.com/MonitoredBus.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

PTRatio(*args)#

PT ratio for voltage control settings

Original COM help: https://opendss.epri.com/PTratio1.html

Reset()#
ReverseBand(*args)#

Bandwidth in reverse direction, centered on reverse Vreg.

Original COM help: https://opendss.epri.com/ReverseBand.html

ReverseR(*args)#

Reverse LDC R setting in Volts.

Original COM help: https://opendss.epri.com/ReverseR.html

ReverseVreg(*args)#

Target voltage in the revese direction, on PT secondary base.

Original COM help: https://opendss.epri.com/ReverseVreg.html

ReverseX(*args)#

Reverse LDC X setting in volts.

Original COM help: https://opendss.epri.com/ReverseX.html

TapDelay(*args)#

Time delay [s] for subsequent tap changes in a set. Control may reset before actually changing taps.

Original COM help: https://opendss.epri.com/TapDelay.html

TapNumber(*args)#

Integer number of the tap that the controlled transformer winding is currently on.

Original COM help: https://opendss.epri.com/TapNumber.html

TapWinding(*args)#

Tapped winding number

Original COM help: https://opendss.epri.com/TapWinding.html

Transformer(*args)#

Name of the transformer this regulator controls

Original COM help: https://opendss.epri.com/Transformer.html

VoltageLimit(*args)#

First house voltage limit on PT secondary base. Setting to 0 disables this function.

Original COM help: https://opendss.epri.com/VoltageLimit.html

Winding(*args)#

Winding number for PT and CT connections

Original COM help: https://opendss.epri.com/Winding.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘RegControls’

opendssdirect.Relays#

class IRelays(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Close()#

Close the switched object controlled by the relay. Resets relay to first operation.

Original COM help: https://opendss.epri.com/Close5.html

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

MonitoredObj(*args)#

Full name of object this Relay is monitoring.

Original COM help: https://opendss.epri.com/MonitoredObj3.html

MonitoredTerm(*args)#

Number of terminal of monitored element that this Relay is monitoring.

Original COM help: https://opendss.epri.com/MonitoredTerm3.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NormalState(*args)#

Normal state of relay.

Original COM help: https://opendss.epri.com/NormalState3.html

Open()#

Open relay’s controlled element and lock out the relay.

Original COM help: https://opendss.epri.com/Open4.html

Reset()#

Reset relay to normal state. If open, lock out the relay. If closed, resets relay to first operation.

State(*args)#

Get/Set present state of relay. If set to open, open relay’s controlled element and lock out the relay. If set to close, close relay’s controlled element and resets relay to first operation.

SwitchedObj(*args)#

Full name of element that will be switched when relay trips.

Original COM help: https://opendss.epri.com/SwitchedObj2.html

SwitchedTerm(*args)#

Terminal number of the switched object that will be opened when the relay trips.

Original COM help: https://opendss.epri.com/SwitchedTerm2.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Relays’

opendssdirect.Reactors#

class IReactors(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Reactor objects

(API Extension)

AllNames()#

Array of all names of this object type

Bus1(*args)#

Name of first bus. Bus2 property will default to this bus, node 0, unless previously specified. Only Bus1 need be specified for a Yg shunt reactor.

Bus2(*args)#

Name of 2nd bus. Defaults to all phases connected to first bus, node 0, (Shunt Wye Connection) except when Bus2 is specifically defined. Not necessary to specify for delta (LL) connection

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsDelta(*args)#

Delta connection or wye?

LCurve(*args)#

Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs. frequency. Applies to reactance specified by X, LmH, Z, or kvar property. L generally decreases somewhat with frequency above the base frequency, approaching a limit at a few kHz.

LmH(*args)#

Inductance, mH. Alternate way to define the reactance, X, property.

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

Parallel(*args)#

Indicates whether Rmatrix and Xmatrix are to be considered in parallel.

Phases(*args)#

Number of phases.

R(*args)#

Resistance (in series with reactance), each phase, ohms. This property applies to REACTOR specified by either kvar or X. See also help on Z.

RCurve(*args)#

Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs. frequency. Applies to resistance specified by R or Z property. If actual values are not known, R often increases by approximately the square root of frequency.

Rmatrix(*args)#

Resistance matrix, ohms at base frequency. Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X.

Rp(*args)#

Resistance in parallel with R and X (the entire branch). Assumed infinite if not specified.

SpecType()#

How the reactor data was provided: 1=kvar, 2=R+jX, 3=R and X matrices, 4=sym components. Depending on this value, only some properties are filled or make sense in the context.

X(*args)#

Reactance, each phase, ohms at base frequency. See also help on Z and LmH properties.

Xmatrix(*args)#

Reactance matrix, ohms at base frequency. Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X.

Z(*args)#

Alternative way of defining R and X properties. Enter a 2-element array representing R +jX in ohms.

Z0(*args)#

Zero-sequence impedance, ohms, as a 2-element array representing a complex number.

Used to define the impedance matrix of the REACTOR if Z1 is also specified.

Note: Z0 defaults to Z1 if it is not specifically defined.

Z1(*args)#

Positive-sequence impedance, ohms, as a 2-element array representing a complex number.

If defined, Z1, Z2, and Z0 are used to define the impedance matrix of the REACTOR.

Z1 MUST BE DEFINED TO USE THIS OPTION FOR DEFINING THE MATRIX.

Side Effect: Sets Z2 and Z0 to same values unless they were previously defined.

Z2(*args)#

Negative-sequence impedance, ohms, as a 2-element array representing a complex number.

Used to define the impedance matrix of the REACTOR if Z1 is also specified.

Note: Z2 defaults to Z1 if it is not specifically defined. If Z2 is not equal to Z1, the impedance matrix is asymmetrical.

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Reactors’

kV(*args)#

For 2, 3-phase, kV phase-phase. Otherwise specify actual coil rating.

kvar(*args)#

Total kvar, all phases. Evenly divided among phases. Only determines X. Specify R separately

opendssdirect.Reclosers#

class IReclosers(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Close()#
Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

GroundInst(*args)#

Ground (3I0) instantaneous trip setting - curve multiplier or actual amps.

Original COM help: https://opendss.epri.com/GroundInst.html

GroundTrip(*args)#

Ground (3I0) trip multiplier or actual amps

Original COM help: https://opendss.epri.com/GroundTrip.html

Idx(*args)#

Gets the current index or sets the active object of this type by index

MonitoredObj(*args)#

Full name of object this Recloser to be monitored.

Original COM help: https://opendss.epri.com/MonitoredObj2.html

MonitoredTerm(*args)#

Terminal number of Monitored object for the Recloser

Original COM help: https://opendss.epri.com/MonitoredTerm2.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NormalState(*args)#

Get/set normal state (ActionCodes.Open=1, ActionCodes.Close=2) of the recloser.

Original COM help: https://opendss.epri.com/NormalState1.html

NumFast(*args)#

Number of fast shots

Original COM help: https://opendss.epri.com/NumFast.html

Open()#
PhaseInst(*args)#

Phase instantaneous curve multiplier or actual amps

Original COM help: https://opendss.epri.com/PhaseInst.html

PhaseTrip(*args)#

Phase trip curve multiplier or actual amps

Original COM help: https://opendss.epri.com/PhaseTrip.html

RecloseIntervals()#

Array of Doubles: reclose intervals, s, between shots.

Original COM help: https://opendss.epri.com/RecloseIntervals.html

Reset()#

Reset recloser to normal state. If open, lock out the recloser. If closed, resets recloser to first operation.

Shots(*args)#

Number of shots to lockout (fast + delayed)

Original COM help: https://opendss.epri.com/Shots.html

State(*args)#

Get/Set present state of recloser. If set to open (ActionCodes.Open=1), open recloser’s controlled element and lock out the recloser. If set to close (ActionCodes.Close=2), close recloser’s controlled element and resets recloser to first operation.

SwitchedObj(*args)#

Full name of the circuit element that is being switched by the Recloser.

Original COM help: https://opendss.epri.com/SwitchedObj1.html

SwitchedTerm(*args)#

Terminal number of the controlled device being switched by the Recloser

Original COM help: https://opendss.epri.com/SwitchedTerm1.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Reclosers’

opendssdirect.ReduceCkt#

class IReduceCkt(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

Circuit Reduction interface

Do1phLaterals()#

Remove all 1-phase laterals in the active EnergyMeter’s zone.

Loads and other shunt elements are moved to the parent 3-phase bus.

DoBranchRemove()#

Remove (disable) all branches down-line from the active PDElement.

Circuit must have an EnergyMeter on this branch. If KeepLoad=Y (default), a new Load element is defined and kW, kvar are set to present power flow solution for the first element eliminated. The EditString is applied to each new Load element defined.

DoDangling()#

Reduce Dangling Algorithm; branches with nothing connected

Original COM help: https://opendss.epri.com/DoDangling.html

DoDefault()#

Do Default Reduction algorithm

Original COM help: https://opendss.epri.com/DoDefault.html

DoLoopBreak()#

Break (disable) all the loops found in the active circuit.

Disables one of the Line objects at the head of a loop to force the circuit to be radial.

DoParallelLines()#

Merge all parallel lines found in the circuit to facilitate its reduction.

DoShortLines()#

Do ShortLines algorithm: Set Zmag first if you don’t want the default

Original COM help: https://opendss.epri.com/DoShortLines.html

DoSwitches()#

Merge Line objects in which the IsSwitch property is true with the down-line Line object.

EditString(*args)#

Edit String for RemoveBranches functions

Original COM help: https://opendss.epri.com/EditString.html

EnergyMeter(*args)#

Name of EnergyMeter to use for reduction

Original COM help: https://opendss.epri.com/EnergyMeter1.html

KeepLoad(*args)#

Keep load flag for Reduction options that remove branches

Original COM help: https://opendss.epri.com/KeepLoad.html

SaveCircuit(CktName)#

Save present (reduced) circuit Filename is listed in the Text Result interface

StartPDElement(*args)#

Start element for Remove Branch function

Original COM help: https://opendss.epri.com/StartPDElement.html

Zmag(*args)#

Zmag (ohms) for Reduce Option for Z of short lines

Original COM help: https://opendss.epri.com/Zmag.html

__init__(api_util, prefer_lists=None)#
__name__#

‘ReduceCkt’

opendssdirect.Sensors#

class ISensors(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

AllocationFactor()#

Array of doubles for the allocation factors for each phase.

Original COM help: https://opendss.epri.com/AllocationFactor1.html

Count()#

Number of objects of this type

Currents(*args)#

Array of doubles for the line current measurements; don’t use with kWS and kVARS.

Original COM help: https://opendss.epri.com/Currents2.html

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsDelta(*args)#

True if measured voltages are line-line. Currents are always line currents.

Original COM help: https://opendss.epri.com/IsDelta2.html

MeteredElement(*args)#

Full Name of the measured element

Original COM help: https://opendss.epri.com/MeteredElement1.html

MeteredTerminal(*args)#

Number of the measured terminal in the measured element.

Original COM help: https://opendss.epri.com/MeteredTerminal1.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

PctError(*args)#

Assumed percent error in the Sensor measurement. Default is 1.

Original COM help: https://opendss.epri.com/PctError.html

Reset()#
ResetAll()#
ReverseDelta(*args)#

True if voltage measurements are 1-3, 3-2, 2-1.

Original COM help: https://opendss.epri.com/ReverseDelta.html

Weight(*args)#

Weighting factor for this Sensor measurement with respect to other Sensors. Default is 1.

Original COM help: https://opendss.epri.com/Weight.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Sensors’

kVBase(*args)#

Voltage base for the sensor measurements. LL for 2 and 3-phase sensors, LN for 1-phase sensors.

Original COM help: https://opendss.epri.com/kVBase1.html

kVS(*args)#

Array of doubles for the LL or LN (depending on Delta connection) voltage measurements.

Original COM help: https://opendss.epri.com/kVS.html

kW(*args)#

Array of doubles for P measurements. Overwrites Currents with a new estimate using kVARS.

Original COM help: https://opendss.epri.com/kWS.html

kvar(*args)#

Array of doubles for Q measurements. Overwrites Currents with a new estimate using kWS.

Original COM help: https://opendss.epri.com/kVARS.html

opendssdirect.Settings#

class ISettings(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

AllocationFactors(Value)#

(write-only) Sets all load allocation factors for all loads defined by XFKVA property to this value.

AllowDuplicates(*args)#

{True | False*} Designates whether to allow duplicate names of objects

NOTE: for DSS-Extensions, we are considering removing this option in a future release since it has performance impacts even when not used.

AutoBusList(*args)#

List of Buses or (File=xxxx) syntax for the AutoAdd solution mode.

Original COM help: https://opendss.epri.com/AutoBusList.html

CktModel(*args)#

Indicate if the circuit model is positive sequence.

Original COM help: https://opendss.epri.com/CktModel.html

ControlTrace(*args)#

Denotes whether to trace the control actions to a file.

Original COM help: https://opendss.epri.com/ControlTrace.html

EmergVmaxpu(*args)#

Per Unit maximum voltage for Emergency conditions.

Original COM help: https://opendss.epri.com/EmergVmaxpu.html

EmergVminpu(*args)#

Per Unit minimum voltage for Emergency conditions.

Original COM help: https://opendss.epri.com/EmergVminpu.html

IterateDisabled(*args)#

Controls whether First/Next iteration includes or skips disabled circuit elements. The default behavior from OpenDSS is to skip those. The user can still activate the element by name or index.

The default value for IterateDisabled is 0, keeping the original behavior. Set it to 1 (or True) to include disabled elements. Other numeric values are reserved for other potential behaviors.

(API Extension)

LoadsTerminalCheck(*args)#

Controls whether the terminals are checked when updating the currents in Load component. Defaults to True. If the loads are guaranteed to have their terminals closed throughout the simulation, this can be set to False to save some time.

(API Extension)

LossRegs(*args)#

Integer array defining which energy meter registers to use for computing losses

Original COM help: https://opendss.epri.com/LossRegs.html

LossWeight(*args)#

Weighting factor applied to Loss register values.

Original COM help: https://opendss.epri.com/LossWeight.html

NormVmaxpu(*args)#

Per Unit maximum voltage for Normal conditions.

Original COM help: https://opendss.epri.com/NormVmaxpu.html

NormVminpu(*args)#

Per Unit minimum voltage for Normal conditions.

Original COM help: https://opendss.epri.com/NormVminpu.html

PriceCurve(*args)#

Name of LoadShape object that serves as the source of price signal data for yearly simulations, etc.

Original COM help: https://opendss.epri.com/PriceCurve.html

PriceSignal(*args)#

Price Signal for the Circuit

Original COM help: https://opendss.epri.com/PriceSignal.html

SetPropertyNameStyle(value)#

Switch the property names according

Trapezoidal(*args)#

Gets value of trapezoidal integration flag in energy meters. Defaults to False.

Original COM help: https://opendss.epri.com/Trapezoidal.html

UERegs(*args)#

Array of Integers defining energy meter registers to use for computing UE

Original COM help: https://opendss.epri.com/UEregs.html

UEWeight(*args)#

Weighting factor applied to UE register values.

Original COM help: https://opendss.epri.com/UEweight.html

VoltageBases(*args)#

Array of doubles defining the legal voltage bases in kV L-L

Original COM help: https://opendss.epri.com/VoltageBases.html

ZoneLock(*args)#

Locks Zones on energy meters to prevent rebuilding if a circuit change occurs.

Original COM help: https://opendss.epri.com/ZoneLock.html

__init__(api_util, prefer_lists=None)#
__name__#

‘Settings’

opendssdirect.Solution#

class ISolution(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

AddType(*args)#

Type of device to add in AutoAdd Mode: {dssGen (Default) | dssCap}

Original COM help: https://opendss.epri.com/AddType.html

Algorithm(*args)#

Base Solution algorithm

Original COM help: https://opendss.epri.com/Algorithm.html

BuildYMatrix(BuildOption, AllocateVI)#
BusLevels()#

Bus levels for all the buses in the model.

The bus levels are calculated after calculating the incidence branch-to-node (B2N) matrix and they represent the distance from the buses to a reference that goes from the feeder head to the farthest bus in the model. The bus level index matches with the bus list obtained with the circuit interface.

Original COM help: https://opendss.epri.com/BusLevels.html

Capkvar(*args)#

Capacitor kvar for adding capacitors in AutoAdd mode

Original COM help: https://opendss.epri.com/Capkvar.html

CheckControls()#
CheckFaultStatus()#
Cleanup()#
ControlActionsDone(*args)#

Flag indicating the control actions are done.

Original COM help: https://opendss.epri.com/ControlActionsDone.html

ControlIterations(*args)#

Value of the control iteration counter

Original COM help: https://opendss.epri.com/ControlIterations.html

ControlMode(*args)#

Modes for control devices

Original COM help: https://opendss.epri.com/ControlMode.html

Converged(*args)#

Flag to indicate whether the circuit solution converged

Original COM help: https://opendss.epri.com/Converged.html

Convergence(*args)#

Solution convergence tolerance.

Original COM help: https://opendss.epri.com/Tolerance.html

DblHour(*args)#

Hour as a double, including fractional part

Original COM help: https://opendss.epri.com/dblHour1.html

DefaultDaily(*args)#

Default daily load shape (defaults to “Default”)

Original COM help: https://opendss.epri.com/DefaultDaily.html

DefaultYearly(*args)#

Default Yearly load shape (defaults to “Default”)

Original COM help: https://opendss.epri.com/DefaultYearly.html

DoControlActions()#
EventLog()#

Array of strings containing the Event Log

Original COM help: https://opendss.epri.com/EventLog.html

FinishTimeStep()#
Frequency(*args)#

Set the Frequency for next solution

Original COM help: https://opendss.epri.com/Frequency1.html

GenMult(*args)#

Default Multiplier applied to generators (like LoadMult)

Original COM help: https://opendss.epri.com/GenMult.html

GenPF(*args)#

PF for generators in AutoAdd mode

Original COM help: https://opendss.epri.com/GenPF.html

GenkW(*args)#

Generator kW for AutoAdd mode

Original COM help: https://opendss.epri.com/GenkW.html

Hour(*args)#

Set Hour for time series solutions.

Original COM help: https://opendss.epri.com/Hour.html

IncMatrix()#

Incidence branch-to-node (B2N) matrix calculated for the model as a vector of integers.

The vector represents a sparse matrix (non-zero values are the only ones delivered) and can be interpreted as follows: The first element is the row number, the second one is the column and the third is the value, this way, by dividing the number of elements in the array by 3 the user can obtain the number of rows in case of wanting to sort the vector values within a matrix.

Original COM help: https://opendss.epri.com/IncMatrix.html

IncMatrixCols()#

Names of the columns of the branch-to-node (B2N) matrix.

Original COM help: https://opendss.epri.com/IncMatrixCols.html

IncMatrixRows()#

Names of the rows of the branch-to-node (B2N) matrix.

Original COM help: https://opendss.epri.com/IncMatrixRows.html

InitSnap()#
IntervalHrs(*args)#

Get/Set the Solution.IntervalHrs variable used for devices that integrate / custom solution algorithms

Iterations()#

Number of iterations taken for last solution. (Same as Totaliterations)

Original COM help: https://opendss.epri.com/Iterations.html

LDCurve(*args)#

Load-Duration Curve name for LD modes

Original COM help: https://opendss.epri.com/LDCurve.html

Laplacian()#

Laplacian matrix calculated in OpenDSS based on the latest branch-to-node (B2N) matrix.

The vector represents a sparse matrix (non-zero values are the only ones delivered) and can be interpreted as follows: The first element is the row number, the second one is the column and the third is the value, this way, by dividing the number of elements in the array by 3 the user can obtain the number of rows in case of wanting to sort the vector values within a matrix. The tables for the columns and rows are the same as the columns for the B2N columns (square matrix).

Original COM help: https://opendss.epri.com/Laplacian.html

LoadModel(*args)#

Load Model: {dssPowerFlow (default) | dssAdmittance}

Original COM help: https://opendss.epri.com/LoadModel.html

LoadMult(*args)#

Default load multiplier applied to all non-fixed loads

Original COM help: https://opendss.epri.com/LoadMult.html

MaxControlIterations(*args)#

Maximum allowable control iterations

Original COM help: https://opendss.epri.com/MaxControlIterations.html

MaxIterations(*args)#

Max allowable iterations.

Original COM help: https://opendss.epri.com/MaxIterations.html

MinIterations(*args)#

Minimum number of iterations required for a power flow solution.

Original COM help: https://opendss.epri.com/MinIterations.html

Mode(*args)#

Set present solution mode

Original COM help: https://opendss.epri.com/Mode2.html

ModeID()#

ID (text) of the present solution mode

Original COM help: https://opendss.epri.com/ModeID.html

MostIterationsDone()#

Max number of iterations required to converge at any control iteration of the most recent solution.

Original COM help: https://opendss.epri.com/MostIterationsDone.html

Number(*args)#

Number of solutions to perform for Monte Carlo and time series simulations

Original COM help: https://opendss.epri.com/Number1.html

PctGrowth(*args)#

Percent default annual load growth rate

Original COM help: https://opendss.epri.com/pctGrowth.html

ProcessTime()#

Gets the time required to perform the latest solution (Read only)

Original COM help: https://opendss.epri.com/Process_Time.html

Random(*args)#

Randomization mode for random variables “Gaussian” or “Uniform”

Original COM help: https://opendss.epri.com/Random.html

SampleControlDevices()#
SampleDoControlActions()#
Seconds(*args)#

Seconds from top of the hour.

Original COM help: https://opendss.epri.com/Seconds.html

Solve()#
SolveDirect()#
SolveNoControl()#
SolvePFlow()#
SolvePlusControl()#
SolveSnap()#
StepSize(*args)#

Time step size in sec

Original COM help: https://opendss.epri.com/StepSize.html

StepSizeHr(Value)#

(write-only) Set Stepsize in Hr

StepSizeMin(Value)#

(write-only) Set Stepsize in minutes

SystemYChanged()#

Flag that indicates if elements of the System Y have been changed by recent activity.

Original COM help: https://opendss.epri.com/SystemYChanged.html

TimeTimeStep()#

Get the solution process time + sample time for time step

Original COM help: https://opendss.epri.com/Time_of_Step.html

TotalIterations()#

Total iterations including control iterations for most recent solution.

Original COM help: https://opendss.epri.com/Totaliterations.html

TotalTime(*args)#

Gets/sets the accumulated time of the simulation

This accumulator has to be reset manually.

Original COM help: https://opendss.epri.com/Total_Time.html

Year(*args)#

Set year for planning studies

Original COM help: https://opendss.epri.com/Year.html

__init__(api_util, prefer_lists=None)#
__name__#

‘Solution’

opendssdirect.Storages#

class IStorages(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Storage objects

AllNames()#

Array of all names of this object type

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

RegisterNames()#

Array of Storage energy meter register names

See also the enum GeneratorRegisters.

RegisterValues()#

Array of values in Storage registers.

State(*args)#

Get/set state: 0=Idling; 1=Discharging; -1=Charging;

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Storages’

puSOC(*args)#

Per unit state of charge

opendssdirect.SwtControls#

class ISwtControls(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

Action(*args)#

Open or Close the switch. No effect if switch is locked. However, Reset removes any lock and then closes the switch (shelf state).

Original COM help: https://opendss.epri.com/Action1.html

AllNames()#

Array of all names of this object type

Count()#

Number of objects of this type

Delay(*args)#

Time delay [s] between arming and opening or closing the switch. Control may reset before actually operating the switch.

Original COM help: https://opendss.epri.com/Delay3.html

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsLocked(*args)#

The lock prevents both manual and automatic switch operation.

Original COM help: https://opendss.epri.com/IsLocked.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NormalState(*args)#

Get/set Normal state of switch (see ActionCodes) dssActionOpen or dssActionClose

Reset()#
State(*args)#

Set it to force the switch to a specified state, otherwise read its present state.

Original COM help: https://opendss.epri.com/State.html

SwitchedObj(*args)#

Full name of the switched element.

Original COM help: https://opendss.epri.com/SwitchedObj3.html

SwitchedTerm(*args)#

Terminal number where the switch is located on the SwitchedObj

Original COM help: https://opendss.epri.com/SwitchedTerm3.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘SwtControls’

opendssdirect.Text#

class IText(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

Command(*args)#

Input command string for the DSS.

Original COM help: https://opendss.epri.com/Command1.html

Commands(Value)#

Runs a list of strings or a large string as commands directly in the DSS engine. Intermediate results (from Text.Result) are ignored.

Value can be a list of strings, or a single large string (usually faster).

(API Extension)

Result()#

Result string for the last command.

Original COM help: https://opendss.epri.com/Result.html

__init__(api_util, prefer_lists=None)#
__name__#

‘Text’

opendssdirect.Topology#

class ITopology(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

ActiveBranch()#

Returns index of the active branch

Original COM help: https://opendss.epri.com/ActiveBranch.html

ActiveLevel()#

Topological depth of the active branch

Original COM help: https://opendss.epri.com/ActiveLevel.html

AllIsolatedBranches()#

Array of all isolated branch names.

Original COM help: https://opendss.epri.com/AllIsolatedBranches.html

AllIsolatedLoads()#

Array of all isolated load names.

Original COM help: https://opendss.epri.com/AllIsolatedLoads.html

AllLoopedPairs()#

Array of all looped element names, by pairs.

Original COM help: https://opendss.epri.com/AllLoopedPairs.html

BackwardBranch()#

Move back toward the source, return index of new active branch, or 0 if no more.

Original COM help: https://opendss.epri.com/BackwardBranch.html

BranchName(*args)#

Name of the active branch.

Original COM help: https://opendss.epri.com/BranchName.html

BusName(*args)#

Set the active branch to one containing this bus, return index or 0 if not found

Original COM help: https://opendss.epri.com/BusName.html

First()#

Sets the first branch active, returns 0 if none.

Original COM help: https://opendss.epri.com/First19.html

FirstLoad()#

First load at the active branch, return index or 0 if none.

Original COM help: https://opendss.epri.com/FirstLoad.html

ForwardBranch()#

Move forward in the tree, return index of new active branch or 0 if no more

Original COM help: https://opendss.epri.com/ForwardBranch.html

LoopedBranch()#

Move to looped branch, return index or 0 if none.

Original COM help: https://opendss.epri.com/LoopedBranch.html

Next()#

Sets the next branch active, returns 0 if no more.

Original COM help: https://opendss.epri.com/Next18.html

NextLoad()#

Next load at the active branch, return index or 0 if no more.

Original COM help: https://opendss.epri.com/NextLoad.html

NumIsolatedBranches()#

Number of isolated branches (PD elements and capacitors).

Original COM help: https://opendss.epri.com/NumIsolatedBranches.html

NumIsolatedLoads()#

Number of isolated loads

Original COM help: https://opendss.epri.com/NumIsolatedLoads.html

NumLoops()#

Number of loops

Original COM help: https://opendss.epri.com/NumLoops.html

ParallelBranch()#

Move to directly parallel branch, return index or 0 if none.

Original COM help: https://opendss.epri.com/ParallelBranch.html

__init__(api_util, prefer_lists=None)#
__name__#

‘Topology’

opendssdirect.Transformers#

class ITransformers(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllLossesByType()#

Complex array with the losses by type (total losses, load losses, no-load losses), in VA, concatenated for ALL transformers

(API Extension)

AllNames()#

Array of all names of this object type

CoreType(*args)#

Transformer Core Type: 0=Shell; 1=1ph; 3-3leg; 4=4-Leg; 5=5-leg; 9=Core-1-phase

Original COM help: https://opendss.epri.com/CoreType.html

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

IsDelta(*args)#

Active Winding delta or wye connection?

Original COM help: https://opendss.epri.com/IsDelta3.html

LossesByType()#

Complex array with the losses by type (total losses, load losses, no-load losses), in VA

(API Extension)

MaxTap(*args)#

Active Winding maximum tap in per-unit.

Original COM help: https://opendss.epri.com/MaxTap.html

MinTap(*args)#

Active Winding minimum tap in per-unit.

Original COM help: https://opendss.epri.com/MinTap.html

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NumTaps(*args)#

Active Winding number of tap steps between MinTap and MaxTap.

Original COM help: https://opendss.epri.com/NumTaps.html

NumWindings(*args)#

Number of windings on this transformer. Allocates memory; set or change this property first.

Original COM help: https://opendss.epri.com/NumWindings.html

R(*args)#

Active Winding resistance in %

Original COM help: https://opendss.epri.com/R.html

RdcOhms(*args)#

dc Resistance of active winding in ohms for GIC analysis

Original COM help: https://opendss.epri.com/RdcOhms.html

Rneut(*args)#

Active Winding neutral resistance [ohms] for wye connections. Set less than zero for ungrounded wye.

Original COM help: https://opendss.epri.com/Rneut1.html

Tap(*args)#

Active Winding tap in per-unit.

Original COM help: https://opendss.epri.com/Tap.html

Wdg(*args)#

Active Winding Number from 1..NumWindings. Update this before reading or setting a sequence of winding properties (R, Tap, kV, kVA, etc.)

Original COM help: https://opendss.epri.com/Wdg.html

WdgCurrents()#

All Winding currents (ph1, wdg1, wdg2,… ph2, wdg1, wdg2 …)

WARNING: If the transformer has open terminal(s), results may be wrong, i.e. avoid using this in those situations. For more information, see dss-extensions/dss-extensions#24

Original COM help: https://opendss.epri.com/WdgCurrents.html

WdgVoltages()#

Complex array of voltages for active winding

WARNING: If the transformer has open terminal(s), results may be wrong, i.e. avoid using this in those situations. For more information, see dss-extensions/dss-extensions#24

Original COM help: https://opendss.epri.com/WdgVoltages.html

XfmrCode(*args)#

Name of an XfrmCode that supplies electrical parameters for this Transformer.

Original COM help: https://opendss.epri.com/XfmrCode1.html

Xhl(*args)#

Percent reactance between windings 1 and 2, on winding 1 kVA base. Use for 2-winding or 3-winding transformers.

Original COM help: https://opendss.epri.com/Xhl.html

Xht(*args)#

Percent reactance between windings 1 and 3, on winding 1 kVA base. Use for 3-winding transformers only.

Original COM help: https://opendss.epri.com/Xht.html

Xlt(*args)#

Percent reactance between windings 2 and 3, on winding 1 kVA base. Use for 3-winding transformers only.

Original COM help: https://opendss.epri.com/Xlt.html

Xneut(*args)#

Active Winding neutral reactance [ohms] for wye connections.

Original COM help: https://opendss.epri.com/Xneut1.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Transformers’

kV(*args)#

Active Winding kV rating. Phase-phase for 2 or 3 phases, actual winding kV for 1 phase transformer.

Original COM help: https://opendss.epri.com/kV3.html

kVA(*args)#

Active Winding kVA rating. On winding 1, this also determines normal and emergency current ratings for all windings.

Original COM help: https://opendss.epri.com/kva1.html

strWdgCurrents()#

All winding currents in CSV string form like the WdgCurrents property

WARNING: If the transformer has open terminal(s), results may be wrong, i.e. avoid using this in those situations. For more information, see dss-extensions/dss-extensions#24

opendssdirect.TSData#

class ITSData(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

TSData objects

(API Extension)

AllNames()#

Array of all names of this object type

Count()#

Number of objects of this type

DiaCable(*args)#
DiaIns(*args)#
DiaShield(*args)#
Diameter(*args)#
EmergAmps(*args)#

Emergency ampere rating

EpsR(*args)#
First()#

Sets the first object of this type active. Returns 0 if none.

GMRUnits(*args)#
GMRac(*args)#
Idx(*args)#

Gets the current index or sets the active object of this type by index

InsLayer(*args)#
Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NormAmps(*args)#

Normal Ampere rating

Rac(*args)#
Radius(*args)#
RadiusUnits(*args)#
Rdc(*args)#
ResistanceUnits(*args)#
TapeLap(*args)#
TapeLayer(*args)#
__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘TSData’

opendssdirect.Vsources#

class IVsources(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

AngleDeg(*args)#

Phase angle of first phase in degrees

Original COM help: https://opendss.epri.com/AngleDeg1.html

BasekV(*args)#

Source voltage in kV

Original COM help: https://opendss.epri.com/BasekV.html

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Frequency(*args)#

Source frequency in Hz

Original COM help: https://opendss.epri.com/Frequency2.html

Idx(*args)#

Gets the current index or sets the active object of this type by index

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

PU(*args)#

Per-unit value of source voltage

Original COM help: https://opendss.epri.com/pu.html

Phases(*args)#

Number of phases

Original COM help: https://opendss.epri.com/Phases3.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘Vsources’

opendssdirect.XYCurves#

class IXYCurves(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

Provides iteration methods

Based on DSS-Python’s Iterable class.

AllNames()#

Array of all names of this object type

Count()#

Number of objects of this type

First()#

Sets the first object of this type active. Returns 0 if none.

Idx(*args)#

Gets the current index or sets the active object of this type by index

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

Npts(*args)#

Get/Set Number of points in X-Y curve

Original COM help: https://opendss.epri.com/Npts1.html

X(*args)#

Set X value or get interpolated value after setting Y

Original COM help: https://opendss.epri.com/x4.html

XArray(*args)#

Get/set X values as a Array of doubles. Set Npts to max number expected if setting

Original COM help: https://opendss.epri.com/Xarray.html

XScale(*args)#

Factor to scale X values from original curve

Original COM help: https://opendss.epri.com/Xscale.html

XShift(*args)#

Amount to shift X value from original curve

Original COM help: https://opendss.epri.com/Xshift.html

Y(*args)#

Set Y value or get interpolated Y value after setting X

Original COM help: https://opendss.epri.com/y1.html

YArray(*args)#

Get/Set Y values in curve; Set Npts to max number expected if setting

Original COM help: https://opendss.epri.com/Yarray.html

YScale(*args)#

Factor to scale Y values from original curve

Original COM help: https://opendss.epri.com/Yscale.html

YShift(*args)#

Amount to shift Y value from original curve

Original COM help: https://opendss.epri.com/Yshift.html

__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘XYCurves’

opendssdirect.YMatrix#

class IYMatrix(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

AddInAuxCurrents(SType)#
BuildYMatrixD(BuildOps, AllocateVI)#
CheckConvergence()#
GetPCInjCurr()#
GetSourceInjCurrents()#
IVector()#

Get access to the internal Current pointer

Iteration(*args)#
LoadsNeedUpdating(*args)#
SetGeneratordQdV()#
SolutionInitialized(*args)#
SolveSystem(NodeV=None)#
SolverOptions(*args)#

Sparse solver options. See the enumeration SparseSolverOptions

SystemYChanged(*args)#
UseAuxCurrents(*args)#
VVector()#

Get access to the internal Voltage pointer

ZeroInjCurr()#
__init__(api_util, prefer_lists=None)#
__name__#

‘YMatrix’

getI()#

Get the data from the internal Current pointer

getV()#

Get the data from the internal Voltage pointer

getYsparse(factor=True)#

Return as (data, indices, indptr) that can fed into scipy.sparse.csc_matrix

opendssdirect.WireData#

class IWireData(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Iterable

WireData objects

(API Extension)

AllNames()#

Array of all names of this object type

CapRadius(*args)#

Equivalent conductor radius for capacitance calcs. Specify this for bundled conductors. Defaults to same value as radius.

Count()#

Number of objects of this type

Diameter(*args)#
EmergAmps(*args)#

Emergency ampere rating

First()#

Sets the first object of this type active. Returns 0 if none.

GMRUnits(*args)#
GMRac(*args)#
Idx(*args)#

Gets the current index or sets the active object of this type by index

Name(*args)#

Gets the current name or sets the active object of this type by name

Next()#

Sets next object of this type active. Returns 0 if no more.

NormAmps(*args)#

Normal Ampere rating

Rac(*args)#
Radius(*args)#
RadiusUnits(*args)#
Rdc(*args)#
ResistanceUnits(*args)#
__init__(api_util, prefer_lists=None)#
__iter__()#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__()#

Number of objects of this type

(API Extension)

__name__#

‘WireData’

opendssdirect.ZIP#

class IZIP(api_util, prefer_lists=None)#

Bases: opendssdirect.Bases.Base

Close()#

Closes the current open ZIP file

(API Extension)

Contains(Name)#

Check if the given path name is present in the current ZIP file.

(API Extension)

Extract(FileName)#

Extracts the contents of the file “FileName” from the current (open) ZIP file. Returns a byte-string.

(API Extension)

List(regexp=None)#

List of strings consisting of all names match the regular expression provided in regexp. If no expression is provided, all names in the current open ZIP are returned.

See https://regex.sorokin.engineer/en/latest/regular_expressions.html for information on the expression syntax and options.

(API Extension)

Open(FileName)#

Opens and prepares a ZIP file to be used by the DSS text parser. Currently, the ZIP format support is limited by what is provided in the Free Pascal distribution. Besides that, the full filenames inside the ZIP must be shorter than 256 characters. The limitations should be removed in a future revision.

(API Extension)

Redirect(FileInZip)#

Runs a “Redirect” command inside the current (open) ZIP file. In the current implementation, all files required by the script must be present inside the ZIP, using relative paths. The only exceptions are memory-mapped files.

(API Extension)

__init__(api_util, prefer_lists=None)#
__name__#

‘ZIP’