opendssdirect package

Submodules

opendssdirect.ActiveClass module

opendssdirect.ActiveClass.ActiveClassName()

(read-only) Returns name of active class.

opendssdirect.ActiveClass.ActiveClassParent()

Get the name of the parent class of the active class

opendssdirect.ActiveClass.AllNames()

(read-only) Array of strings consisting of all element names in the active class.

opendssdirect.ActiveClass.Count()

(read-only) Number of elements in Active Class. Same as NumElements Property.

opendssdirect.ActiveClass.First()

(read-only) Sets first element in the active class to be the active DSS object. If object is a CktElement, ActiveCktELment also points to this element. Returns 0 if none.

opendssdirect.ActiveClass.Name(*args)

Name of the Active Element of the Active Class

opendssdirect.ActiveClass.Next()

(read-only) Sets next element in active class to be the active DSS object. If object is a CktElement, ActiveCktElement also points to this element. Returns 0 if no more.

opendssdirect.ActiveClass.NumElements()

(read-only) Number of elements in this class. Same as Count property.

opendssdirect.ActiveClass.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.

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

(API Extension)

opendssdirect.Basic module

opendssdirect.Basic.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)

opendssdirect.Basic.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.

opendssdirect.Basic.AllowForms(*args)

Gets/sets whether text output is allowed

opendssdirect.Basic.Classes()

(read-only) List of DSS intrinsic classes (names of the classes)

opendssdirect.Basic.ClearAll()
opendssdirect.Basic.DataPath(*args)

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

opendssdirect.Basic.DefaultEditor()

(read-only) Returns the path name for the default text editor.

opendssdirect.Basic.LegacyModels(*args)

If enabled, the legacy/deprecated models for PVSystem, InvControl, Storage and StorageControl are used. In the official OpenDSS version 9.0, the old models where removed. They are temporarily present here but may be removed in the near future. If they are important to you, please open an issue on GitHub or contact the authors from DSS Extensions: https://github.com/dss-extensions/

After toggling LegacyModels, run a “clear” command and the models will be loaded accordingly. Defaults to False.

This can also be enabled by setting the environment variable DSS_CAPI_LEGACY_MODELS to 1.

NOTE: this option will be removed in a future release.

(API Extension)

opendssdirect.Basic.NewCircuit(name)
opendssdirect.Basic.NumCircuits()

(read-only) Number of Circuits currently defined

opendssdirect.Basic.NumClasses()

(read-only) Number of DSS intrinsic classes

opendssdirect.Basic.NumUserClasses()

(read-only) Number of user-defined classes

opendssdirect.Basic.Reset()
opendssdirect.Basic.SetActiveClass(ClassName)
opendssdirect.Basic.ShowPanel()
opendssdirect.Basic.Start(code)
opendssdirect.Basic.UserClasses()

(read-only) List of user-defined classes

opendssdirect.Basic.Version()

(read-only) Get version string for the DSS.

opendssdirect.Bus module

opendssdirect.Bus.AllPCEatBus()

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

opendssdirect.Bus.AllPDEatBus()

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

opendssdirect.Bus.Coorddefined()

(read-only) False=0 else True. Indicates whether a coordinate has been defined for this bus

opendssdirect.Bus.CplxSeqVoltages()

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

opendssdirect.Bus.Cust_Duration()

(read-only) Accumulated customer outage durations

opendssdirect.Bus.Cust_Interrupts()

(read-only) Annual number of customer-interruptions from this bus

opendssdirect.Bus.Distance()

(read-only) Distance from energymeter (if non-zero)

opendssdirect.Bus.GetUniqueNodeNumber(StartNumber)
opendssdirect.Bus.Int_Duration()

(read-only) Average interruption duration, hr.

opendssdirect.Bus.Isc()

(read-only) Short circuit currents at bus; Complex Array.

opendssdirect.Bus.Lambda()

(read-only) Accumulated failure rate downstream from this bus; faults per year

opendssdirect.Bus.LineList()

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

opendssdirect.Bus.LoadList()

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

opendssdirect.Bus.N_Customers()

(read-only) Total numbers of customers served downline from this bus

opendssdirect.Bus.N_interrupts()

(read-only) Number of interruptions this bus per year

opendssdirect.Bus.Name()

(read-only) Name of Bus

opendssdirect.Bus.Nodes()

(read-only) Integer Array of Node Numbers defined at the bus in same order as the voltages.

opendssdirect.Bus.NumNodes()

(read-only) Number of Nodes this bus.

opendssdirect.Bus.PuVoltage()

(read-only) Complex Array of pu voltages at the bus.

opendssdirect.Bus.SectionID()

(read-only) Integer ID of the feeder section in which this bus is located.

opendssdirect.Bus.SeqVoltages()

(read-only) Double Array of sequence voltages at this bus.

opendssdirect.Bus.TotalMiles()

(read-only) Total length of line downline from this bus, in miles. For recloser siting algorithm.

opendssdirect.Bus.VLL()

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

opendssdirect.Bus.VMagAngle()

(read-only) Array of doubles containing voltages in Magnitude (VLN), angle (deg)

opendssdirect.Bus.Voc()

(read-only) Open circuit voltage; Complex array.

opendssdirect.Bus.Voltages()

(read-only) Complex array of voltages at this bus.

opendssdirect.Bus.X(*args)

X Coordinate for bus (double)

opendssdirect.Bus.Y(*args)

Y coordinate for bus(double)

opendssdirect.Bus.YscMatrix()

(read-only) Complex array of Ysc matrix at bus. Column by column.

opendssdirect.Bus.Zsc0()

(read-only) Complex Zero-Sequence short circuit impedance at bus.

opendssdirect.Bus.Zsc1()

(read-only) Complex Positive-Sequence short circuit impedance at bus..

opendssdirect.Bus.ZscMatrix()

(read-only) Complex array of Zsc matrix at bus. Column by column.

opendssdirect.Bus.ZscRefresh()
opendssdirect.Bus.kVBase()

(read-only) Base voltage at bus in kV

opendssdirect.Bus.puVLL()

(read-only) 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.

opendssdirect.Bus.puVmagAngle()

(read-only) Array of doubles containig voltage magnitude, angle pairs in per unit

opendssdirect.CapControls module

opendssdirect.CapControls.AllNames()

(read-only) List of strings with all CapControl names

opendssdirect.CapControls.CTRatio(*args)

Transducer ratio from pirmary current to control current.

opendssdirect.CapControls.Capacitor(*args)

Name of the Capacitor that is controlled.

opendssdirect.CapControls.Count()

(read-only) Number of CapControls

opendssdirect.CapControls.DeadTime(*args)
opendssdirect.CapControls.Delay(*args)

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

opendssdirect.CapControls.DelayOff(*args)

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

opendssdirect.CapControls.First()

Set first CapControl active; returns 0 if none.

opendssdirect.CapControls.Idx(*args)

Get/set active CapControl by index; 1..Count

opendssdirect.CapControls.Mode(*args)

Type of automatic controller.

opendssdirect.CapControls.MonitoredObj(*args)

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

opendssdirect.CapControls.MonitoredTerm(*args)

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

opendssdirect.CapControls.Name(*args)

Get/set the name of the active CapControl

opendssdirect.CapControls.Next()

Sets next CapControl active; returns 0 if no more.

opendssdirect.CapControls.OFFSetting(*args)

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

opendssdirect.CapControls.ONSetting(*args)

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

opendssdirect.CapControls.PTRatio(*args)

Transducer ratio from primary feeder to control voltage.

opendssdirect.CapControls.Reset()
opendssdirect.CapControls.UseVoltOverride(*args)

Enables Vmin and Vmax to override the control Mode

opendssdirect.CapControls.Vmax(*args)

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

opendssdirect.CapControls.Vmin(*args)

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

opendssdirect.Capacitors module

opendssdirect.Capacitors.AddStep()
opendssdirect.Capacitors.AllNames()

(read-only) List of strings with all Capacitor names

opendssdirect.Capacitors.AvailableSteps()

(read-only) Number of Steps available in cap bank to be switched ON.

opendssdirect.Capacitors.Close()
opendssdirect.Capacitors.Count()

(read-only) Number of Capacitors

opendssdirect.Capacitors.First()

Set first Capacitor active; returns 0 if none.

opendssdirect.Capacitors.Idx(*args)

Get/set active Capacitor by index; 1..Count

opendssdirect.Capacitors.IsDelta(*args)

Delta connection or wye?

opendssdirect.Capacitors.Name(*args)

Get/set the name of the active Capacitor

opendssdirect.Capacitors.Next()

Sets next Capacitor active; returns 0 if no more.

opendssdirect.Capacitors.NumSteps(*args)

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

opendssdirect.Capacitors.Open()
opendssdirect.Capacitors.States(*args)

A array of integer [0..numsteps-1] indicating state of each step. If the read value is -1 an error has occurred.

opendssdirect.Capacitors.SubtractStep()
opendssdirect.Capacitors.kV(*args)

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

opendssdirect.Capacitors.kvar(*args)

Total bank KVAR, distributed equally among phases and steps.

opendssdirect.Circuit module

opendssdirect.Circuit.AllBusDistances()

(read-only) Returns distance from each bus to parent EnergyMeter. Corresponds to sequence in AllBusNames.

opendssdirect.Circuit.AllBusMagPu()

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

opendssdirect.Circuit.AllBusNames()

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

opendssdirect.Circuit.AllBusVMag()

(read-only) Array of magnitudes (doubles) of voltages at all buses

opendssdirect.Circuit.AllBusVolts()

(read-only) Complex array of all bus, node voltages from most recent solution

opendssdirect.Circuit.AllElementLosses()

(read-only) Array of total losses (complex) in each circuit element

opendssdirect.Circuit.AllElementNames()

(read-only) Array of strings containing Full Name of all elements.

opendssdirect.Circuit.AllNodeDistances()

(read-only) Returns an array of distances from parent EnergyMeter for each Node. Corresponds to AllBusVMag sequence.

opendssdirect.Circuit.AllNodeDistancesByPhase(Phase)

(read-only) Returns an array of doubles representing the distances to parent EnergyMeter. Sequence of array corresponds to other node ByPhase properties.

opendssdirect.Circuit.AllNodeNames()

(read-only) Array of strings containing full name of each node in system in same order as returned by AllBusVolts, etc.

opendssdirect.Circuit.AllNodeNamesByPhase(Phase)

(read-only) Return array of strings of the node names for the By Phase criteria. Sequence corresponds to other ByPhase properties.

opendssdirect.Circuit.AllNodeVmagByPhase(Phase)

(read-only) Returns Array of doubles represent voltage magnitudes for nodes on the specified phase.

opendssdirect.Circuit.AllNodeVmagPUByPhase(Phase)

(read-only) Returns array of per unit voltage magnitudes for each node by phase

opendssdirect.Circuit.Capacity(Start, Increment)
opendssdirect.Circuit.Disable(Name)
opendssdirect.Circuit.Enable(Name)
opendssdirect.Circuit.EndOfTimeStepUpdate()
opendssdirect.Circuit.FirstElement()
opendssdirect.Circuit.FirstPCElement()
opendssdirect.Circuit.FirstPDElement()
opendssdirect.Circuit.LineLosses()

(read-only) Complex total line losses in the circuit

opendssdirect.Circuit.Losses()

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

opendssdirect.Circuit.Name()

(read-only) Name of the active circuit.

opendssdirect.Circuit.NextElement()
opendssdirect.Circuit.NextPCElement()
opendssdirect.Circuit.NextPDElement()
opendssdirect.Circuit.NumBuses()

(read-only) Total number of Buses in the circuit.

opendssdirect.Circuit.NumCktElements()

(read-only) Number of CktElements in the circuit.

opendssdirect.Circuit.NumNodes()

(read-only) Total number of nodes in the circuit.

opendssdirect.Circuit.ParentPDElement()

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

opendssdirect.Circuit.Sample()
opendssdirect.Circuit.SaveSample()
opendssdirect.Circuit.SetActiveBus(BusName)
opendssdirect.Circuit.SetActiveBusi(BusIndex)
opendssdirect.Circuit.SetActiveClass(ClassName)
opendssdirect.Circuit.SetActiveElement(FullName)
opendssdirect.Circuit.SubstationLosses()

(read-only) Complex losses in all transformers designated to substations.

opendssdirect.Circuit.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.

opendssdirect.Circuit.TotalPower()

(read-only) Total power, kW delivered to the circuit

opendssdirect.Circuit.UpdateStorage()
opendssdirect.Circuit.YCurrents()

(read-only) Array of doubles containing complex injection currents for the present solution. Is is the “I” vector of I=YV

opendssdirect.Circuit.YNodeOrder()

(read-only) Array of strings containing the names of the nodes in the same order as the Y matrix

opendssdirect.Circuit.YNodeVArray()

(read-only) Complex array of actual node voltages in same order as SystemY matrix.

opendssdirect.CktElement module

opendssdirect.CktElement.AllPropertyNames()

(read-only) Array containing all property names of the active device.

opendssdirect.CktElement.AllVariableNames()

(read-only) Array of strings listing all the published variable names, if a PCElement. Otherwise, null string.

opendssdirect.CktElement.AllVariableValues()

(read-only) Array of doubles. Values of state variables of active element if PC element.

opendssdirect.CktElement.BusNames(*args)

Array of strings. Get Bus definitions to which each terminal is connected. 0-based array.

opendssdirect.CktElement.Close(Term, Phs)
opendssdirect.CktElement.Controller(idx)

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

opendssdirect.CktElement.CplxSeqCurrents()

(read-only) Complex double array of Sequence Currents for all conductors of all terminals of active circuit element.

opendssdirect.CktElement.CplxSeqVoltages()

(read-only) Complex double array of Sequence Voltage for all terminals of active circuit element.

opendssdirect.CktElement.Currents()

(read-only) Complex array of currents into each conductor of each terminal

opendssdirect.CktElement.CurrentsMagAng()

(read-only) Currents in magnitude, angle format as a array of doubles.

opendssdirect.CktElement.DisplayName(*args)

Display name of the object (not necessarily unique)

opendssdirect.CktElement.EmergAmps(*args)

Emergency Ampere Rating for PD elements

opendssdirect.CktElement.Enabled(*args)

Boolean indicating that element is currently in the circuit.

opendssdirect.CktElement.EnergyMeter()

(read-only) Name of the Energy Meter this element is assigned to.

opendssdirect.CktElement.GUID()

(read-only) globally unique identifier for this object

opendssdirect.CktElement.Handle()

(read-only) Pointer to this object

opendssdirect.CktElement.HasOCPDevice()

(read-only) True if a recloser, relay, or fuse controlling this ckt element. OCP = Overcurrent Protection

opendssdirect.CktElement.HasSwitchControl()

(read-only) This element has a SwtControl attached.

opendssdirect.CktElement.HasVoltControl()

(read-only) This element has a CapControl or RegControl attached.

opendssdirect.CktElement.IsIsolated()

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

opendssdirect.CktElement.IsOpen(Term, Phs)
opendssdirect.CktElement.Losses()

(read-only) Total losses in the element: two-element complex array

opendssdirect.CktElement.Name()

(read-only) Full Name of Active Circuit Element

opendssdirect.CktElement.NodeOrder()

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

opendssdirect.CktElement.NodeRef()

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

opendssdirect.CktElement.NormalAmps(*args)

Normal ampere rating for PD Elements

opendssdirect.CktElement.NumConductors()

(read-only) Number of Conductors per Terminal

opendssdirect.CktElement.NumControls()

(read-only) Number of controls connected to this device. Use to determine valid range for index into Controller array.

opendssdirect.CktElement.NumPhases()

(read-only) Number of Phases

opendssdirect.CktElement.NumProperties()

(read-only) Number of Properties this Circuit Element.

opendssdirect.CktElement.NumTerminals()

(read-only) Number of Terminals this Circuit Element

opendssdirect.CktElement.OCPDevIndex()

(read-only) Index into Controller list of OCP Device controlling this CktElement

opendssdirect.CktElement.OCPDevType()

(read-only) 0=None; 1=Fuse; 2=Recloser; 3=Relay; Type of OCP controller device

opendssdirect.CktElement.Open(Term, Phs)
opendssdirect.CktElement.PhaseLosses()

(read-only) Complex array of losses by phase

opendssdirect.CktElement.Powers()

(read-only) Complex array of powers into each conductor of each terminal

opendssdirect.CktElement.Residuals()

(read-only) Residual currents for each terminal: (mag, angle)

opendssdirect.CktElement.SeqCurrents()

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

opendssdirect.CktElement.SeqPowers()

(read-only) Double array of sequence powers into each 3-phase teminal

opendssdirect.CktElement.SeqVoltages()

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

opendssdirect.CktElement.TotalPowers()

Returns the total powers (complex) at ALL terminals of the active circuit element.

opendssdirect.CktElement.Variable(MyVarName, Code=None)

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

opendssdirect.CktElement.Variablei(Idx, Code=None)

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

opendssdirect.CktElement.Voltages()

(read-only) Complex array of voltages at terminals

opendssdirect.CktElement.VoltagesMagAng()

(read-only) Voltages at each conductor in magnitude, angle form as array of doubles.

opendssdirect.CktElement.YPrim()

(read-only) YPrim matrix, column order, complex numbers (paired)

opendssdirect.CktElement.setVariableByIndex(Idx, Value)
opendssdirect.CktElement.setVariableByName(Idx, Value)

opendssdirect.CmathLib module

opendssdirect.CmathLib.cabs(realpart, imagpart)

(read-only) Return abs value of complex number given in real and imag doubles

opendssdirect.CmathLib.cdang(RealPart, ImagPart)

(read-only) Returns the angle, in degrees, of a complex number specified as two doubles: Realpart and imagpart.

opendssdirect.CmathLib.cdiv(a1, b1, a2, b2)

(read-only) Divide two complex number: (a1, b1)/(a2, b2). Returns array of two doubles representing complex result.

opendssdirect.CmathLib.cmplx(RealPart, ImagPart)

(read-only) Convert real and imaginary doubles to Array of doubles

opendssdirect.CmathLib.cmul(a1, b1, a2, b2)

(read-only) Multiply two complex numbers: (a1, b1) * (a2, b2). Returns result as a array of two doubles.

opendssdirect.CmathLib.ctopolardeg(RealPart, ImagPart)

(read-only) Convert complex number to magnitude and angle, degrees. Returns array of two doubles.

opendssdirect.CmathLib.pdegtocomplex(magnitude, angle)

(read-only) Convert magnitude, angle in degrees to a complex number. Returns Array of two doubles.

opendssdirect.CtrlQueue module

opendssdirect.CtrlQueue.Action(Param1)

(write-only) Set the active action by index

opendssdirect.CtrlQueue.ActionCode()

(read-only) Code for the active action. Long integer code to tell the control device what to do

opendssdirect.CtrlQueue.ClearActions()
opendssdirect.CtrlQueue.ClearQueue()
opendssdirect.CtrlQueue.Delete(ActionHandle)
opendssdirect.CtrlQueue.DeviceHandle()

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

opendssdirect.CtrlQueue.DoAllQueue()
opendssdirect.CtrlQueue.NumActions()

(read-only) Number of Actions on the current actionlist (that have been popped off the control queue by CheckControlActions)

opendssdirect.CtrlQueue.PopAction()

(read-only) Pops next action off the action list and makes it the active action. Returns zero if none.

opendssdirect.CtrlQueue.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.

opendssdirect.CtrlQueue.Queue()

(read-only) Array of strings containing the entire queue in CSV format

opendssdirect.CtrlQueue.QueueSize()

(read-only) Number of items on the OpenDSS control Queue

opendssdirect.CtrlQueue.Show()

opendssdirect.DSSCore module

opendssdirect.DSSEvents module

opendssdirect.DSSimComs module

opendssdirect.DSSimComs.BusVoltage(Index)
opendssdirect.DSSimComs.BusVoltagepu(Index)

opendssdirect.Element module

opendssdirect.Element.AllPropertyNames()

(read-only) Array of strings containing the names of all properties for the active DSS object.

opendssdirect.Element.Name()

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

opendssdirect.Element.NumProperties()

(read-only) Number of Properties for the active DSS object.

opendssdirect.Element.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.

(API Extension)

opendssdirect.Error module

opendssdirect.Error.Description()

(read-only) Description of error for last operation

opendssdirect.Error.EarlyAbort(*args)

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

(API Extension)

opendssdirect.Error.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)

opendssdirect.Error.Number()

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

opendssdirect.Executive module

opendssdirect.Executive.Command(i)

(read-only) Get i-th command

opendssdirect.Executive.CommandHelp(i)

(read-only) Get help string for i-th command

opendssdirect.Executive.NumCommands()

(read-only) Number of DSS Executive Commands

opendssdirect.Executive.NumOptions()

(read-only) Number of DSS Executive Options

opendssdirect.Executive.Option(i)

(read-only) Get i-th option

opendssdirect.Executive.OptionHelp(i)

(read-only) Get help string for i-th option

opendssdirect.Executive.OptionValue(i)

(read-only) Get present value of i-th option

opendssdirect.Fuses module

opendssdirect.Fuses.AllNames()

(read-only) List of strings with all Fuse names

opendssdirect.Fuses.Close()
opendssdirect.Fuses.Count()

(read-only) Number of Fuses

opendssdirect.Fuses.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.

opendssdirect.Fuses.First()

Set first Fuse active; returns 0 if none.

opendssdirect.Fuses.Idx(*args)

Get/set active Fuse by index; 1..Count

opendssdirect.Fuses.IsBlown()
opendssdirect.Fuses.MonitoredObj(*args)

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

opendssdirect.Fuses.MonitoredTerm(*args)

Terminal number to which the fuse is connected.

opendssdirect.Fuses.Name(*args)

Get/set the name of the active Fuse

opendssdirect.Fuses.Next()

Sets next Fuse active; returns 0 if no more.

opendssdirect.Fuses.NumPhases()

(read-only) Number of phases, this fuse.

opendssdirect.Fuses.Open()
opendssdirect.Fuses.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.

opendssdirect.Fuses.SwitchedObj(*args)

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

opendssdirect.Fuses.SwitchedTerm(*args)

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

opendssdirect.Fuses.TCCCurve(*args)

Name of the TCCcurve object that determines fuse blowing.

opendssdirect.Generators module

opendssdirect.Generators.AllNames()

(read-only) List of strings with all Generator names

opendssdirect.Generators.Bus1(*args)

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

(API Extension)

opendssdirect.Generators.Class(*args)

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

(API Extension)

opendssdirect.Generators.Count()

(read-only) Number of Generators

opendssdirect.Generators.First()

Set first Generator active; returns 0 if none.

opendssdirect.Generators.ForcedON(*args)

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

opendssdirect.Generators.Idx(*args)

Get/set active Generator by index; 1..Count

opendssdirect.Generators.IsDelta(*args)

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

(API Extension)

opendssdirect.Generators.Model(*args)

Generator Model

opendssdirect.Generators.Name(*args)

Get/set the name of the active Generator

opendssdirect.Generators.Next()

Sets next Generator active; returns 0 if no more.

opendssdirect.Generators.PF(*args)

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

opendssdirect.Generators.Phases(*args)

Number of phases

opendssdirect.Generators.RegisterNames()

(read-only) Array of Names of all generator energy meter registers

opendssdirect.Generators.RegisterValues()

(read-only) Array of valus in generator energy meter registers.

opendssdirect.Generators.Status(*args)

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

Related enumeration: GeneratorStatus

(API Extension)

opendssdirect.Generators.Vmaxpu(*args)

Vmaxpu for generator model

opendssdirect.Generators.Vminpu(*args)

Vminpu for Generator model

opendssdirect.Generators.Yearly(*args)

Name of yearly loadshape

(API Extension)

opendssdirect.Generators.daily(*args)

Name of the loadshape for a daily generation profile.

(API Extension)

opendssdirect.Generators.duty(*args)

Name of the loadshape for a duty cycle simulation.

(API Extension)

opendssdirect.Generators.kV(*args)

Voltage base for the active generator, kV

opendssdirect.Generators.kVARated(*args)

kVA rating of the generator

opendssdirect.Generators.kW(*args)

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

opendssdirect.Generators.kva(*args)

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

(API Extension)

opendssdirect.Generators.kvar(*args)

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

opendssdirect.Isource module

opendssdirect.Isource.AllNames()

(read-only) List of strings with all ISource names

opendssdirect.Isource.Amps(*args)

Magnitude of the ISource in amps

opendssdirect.Isource.AngleDeg(*args)

Phase angle for ISource, degrees

opendssdirect.Isource.Count()

(read-only) Number of ISources

opendssdirect.Isource.First()

Set first ISource active; returns 0 if none.

opendssdirect.Isource.Frequency(*args)

The present frequency of the ISource, Hz

opendssdirect.Isource.Idx(*args)

Get/set active ISource by index; 1..Count

opendssdirect.Isource.Name(*args)

Get/set the name of the active ISource

opendssdirect.Isource.Next()

Sets next ISource active; returns 0 if no more.

opendssdirect.LineCodes module

opendssdirect.LineCodes.AllNames()

(read-only) List of strings with all LineCode names

opendssdirect.LineCodes.C0(*args)

Zero-sequence capacitance, nF per unit length

opendssdirect.LineCodes.C1(*args)

Positive-sequence capacitance, nF per unit length

opendssdirect.LineCodes.Cmatrix(*args)

Capacitance matrix, nF per unit length

opendssdirect.LineCodes.Count()

(read-only) Number of LineCodes

opendssdirect.LineCodes.EmergAmps(*args)

Emergency ampere rating

opendssdirect.LineCodes.First()

Set first LineCode active; returns 0 if none.

opendssdirect.LineCodes.Idx(*args)

Get/set active LineCode by index; 1..Count

opendssdirect.LineCodes.IsZ1Z0()

(read-only) Flag denoting whether impedance data were entered in symmetrical components

opendssdirect.LineCodes.Name(*args)

Get/set the name of the active LineCode

opendssdirect.LineCodes.Next()

Sets next LineCode active; returns 0 if no more.

opendssdirect.LineCodes.NormAmps(*args)

Normal Ampere rating

opendssdirect.LineCodes.Phases(*args)

Number of Phases

opendssdirect.LineCodes.R0(*args)

Zero-Sequence Resistance, ohms per unit length

opendssdirect.LineCodes.R1(*args)

Positive-sequence resistance ohms per unit length

opendssdirect.LineCodes.Rmatrix(*args)

Resistance matrix, ohms per unit length

opendssdirect.LineCodes.Units(*args)
opendssdirect.LineCodes.X0(*args)

Zero Sequence Reactance, Ohms per unit length

opendssdirect.LineCodes.X1(*args)

Posiive-sequence reactance, ohms per unit length

opendssdirect.LineCodes.Xmatrix(*args)

Reactance matrix, ohms per unit length

opendssdirect.Lines module

opendssdirect.Lines.AllNames()

(read-only) List of strings with all Line names

opendssdirect.Lines.Bus1(*args)

Name of bus for terminal 1.

opendssdirect.Lines.Bus2(*args)

Name of bus for terminal 2.

opendssdirect.Lines.C0(*args)

Zero Sequence capacitance, nanofarads per unit length.

opendssdirect.Lines.C1(*args)

Positive Sequence capacitance, nanofarads per unit length.

opendssdirect.Lines.CMatrix(*args)
opendssdirect.Lines.Count()

(read-only) Number of Lines

opendssdirect.Lines.EmergAmps(*args)

Emergency (maximum) ampere rating of Line.

opendssdirect.Lines.First()

Set first Line active; returns 0 if none.

opendssdirect.Lines.Geometry(*args)

Line geometry code

opendssdirect.Lines.Idx(*args)

Get/set active Line by index; 1..Count

opendssdirect.Lines.IsSwitch(*args)

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

opendssdirect.Lines.Length(*args)

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

opendssdirect.Lines.LineCode(*args)

Name of LineCode object that defines the impedances.

opendssdirect.Lines.Name(*args)

Get/set the name of the active Line

opendssdirect.Lines.New(Name)
opendssdirect.Lines.Next()

Sets next Line active; returns 0 if no more.

opendssdirect.Lines.NormAmps(*args)

Normal ampere rating of Line.

opendssdirect.Lines.NumCust()

(read-only) Number of customers on this line section.

opendssdirect.Lines.Parent()

(read-only) Sets Parent of the active Line to be the active line. Returns 0 if no parent or action fails.

opendssdirect.Lines.Phases(*args)

Number of Phases, this Line element.

opendssdirect.Lines.R0(*args)

Zero Sequence resistance, ohms per unit length.

opendssdirect.Lines.R1(*args)

Positive Sequence resistance, ohms per unit length.

opendssdirect.Lines.RMatrix(*args)

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

opendssdirect.Lines.Rg(*args)

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

opendssdirect.Lines.Rho(*args)

Earth Resistivity, m-ohms

opendssdirect.Lines.SeasonRating()

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

opendssdirect.Lines.Spacing(*args)

Line spacing code

opendssdirect.Lines.TotalCust()

(read-only) Total Number of customers served from this line section.

opendssdirect.Lines.Units(*args)
opendssdirect.Lines.X0(*args)

Zero Sequence reactance ohms per unit length.

opendssdirect.Lines.X1(*args)

Positive Sequence reactance, ohms per unit length.

opendssdirect.Lines.XMatrix(*args)
opendssdirect.Lines.Xg(*args)

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

opendssdirect.Lines.Yprim(*args)

Yprimitive: Does Nothing at present on Put; Dangerous

opendssdirect.LoadShape module

opendssdirect.LoadShape.AllNames()

(read-only) List of strings with all LoadShape names

opendssdirect.LoadShape.Count()

(read-only) Number of LoadShapes

opendssdirect.LoadShape.First()

Set first LoadShape active; returns 0 if none.

opendssdirect.LoadShape.HrInterval(*args)

Fixed interval time value, hours.

opendssdirect.LoadShape.Idx(*args)

Get/set active LoadShape by index; 1..Count

opendssdirect.LoadShape.MinInterval(*args)

Fixed Interval time value, in minutes

opendssdirect.LoadShape.Name(*args)

Get/set the name of the active LoadShape

opendssdirect.LoadShape.New(Name)
opendssdirect.LoadShape.Next()

Sets next LoadShape active; returns 0 if no more.

opendssdirect.LoadShape.Normalize()
opendssdirect.LoadShape.Npts(*args)

Get/set Number of points in active Loadshape.

opendssdirect.LoadShape.PBase(*args)
opendssdirect.LoadShape.PMult(*args)

Array of doubles for the P multiplier in the Loadshape.

opendssdirect.LoadShape.QBase(*args)

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

opendssdirect.LoadShape.QMult(*args)

Array of doubles containing the Q multipliers.

opendssdirect.LoadShape.SInterval(*args)
opendssdirect.LoadShape.TimeArray(*args)

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

opendssdirect.LoadShape.UseActual(*args)

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

opendssdirect.Loads module

opendssdirect.Loads.AllNames()

(read-only) List of strings with all Load names

opendssdirect.Loads.AllocationFactor(*args)

Factor for allocating loads by connected xfkva

opendssdirect.Loads.CFactor(*args)

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

opendssdirect.Loads.CVRCurve(*args)

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

opendssdirect.Loads.CVRvars(*args)

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

opendssdirect.Loads.CVRwatts(*args)

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

opendssdirect.Loads.Class(*args)
opendssdirect.Loads.Count()

(read-only) Number of Loads

opendssdirect.Loads.Daily(*args)

Name of the loadshape for a daily load profile.

opendssdirect.Loads.Duty(*args)

Name of the loadshape for a duty cycle simulation.

opendssdirect.Loads.First()

Set first Load active; returns 0 if none.

opendssdirect.Loads.Growth(*args)

Name of the growthshape curve for yearly load growth factors.

opendssdirect.Loads.Idx(*args)

Get/set active Load by index; 1..Count

opendssdirect.Loads.IsDelta(*args)

Delta loads are connected line-to-line.

opendssdirect.Loads.Model(*args)

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

opendssdirect.Loads.Name(*args)

Get/set the name of the active Load

opendssdirect.Loads.Next()

Sets next Load active; returns 0 if no more.

opendssdirect.Loads.NumCust(*args)

Number of customers in this load, defaults to one.

opendssdirect.Loads.PF(*args)

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

opendssdirect.Loads.PctMean(*args)

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

opendssdirect.Loads.PctStdDev(*args)

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

opendssdirect.Loads.Phases(*args)

Number of phases

opendssdirect.Loads.RelWeighting(*args)

Relative Weighting factor for the active LOAD

opendssdirect.Loads.Rneut(*args)

Neutral resistance for wye-connected loads.

opendssdirect.Loads.Spectrum(*args)

Name of harmonic current spectrrum shape.

opendssdirect.Loads.Status(*args)

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

opendssdirect.Loads.Vmaxpu(*args)

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

opendssdirect.Loads.VminEmerg(*args)

Minimum voltage for unserved energy (UE) evaluation.

opendssdirect.Loads.VminNorm(*args)

Minimum voltage for energy exceeding normal (EEN) evaluations.

opendssdirect.Loads.Vminpu(*args)

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

opendssdirect.Loads.XfkVA(*args)

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

opendssdirect.Loads.Xneut(*args)

Neutral reactance for wye-connected loads.

opendssdirect.Loads.Yearly(*args)

Name of yearly duration loadshape

opendssdirect.Loads.ZipV(*args)

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

opendssdirect.Loads.kV(*args)

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

opendssdirect.Loads.kVABase(*args)

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

opendssdirect.Loads.kW(*args)

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

opendssdirect.Loads.kWh(*args)

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

opendssdirect.Loads.kWhDays(*args)

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

opendssdirect.Loads.kvar(*args)

Get/set kvar for active Load. If set, updates PF based on present kW.

opendssdirect.Loads.puSeriesRL(*args)

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

opendssdirect.Meters module

opendssdirect.Meters.AllBranchesInZone()

(read-only) Wide string list of all branches in zone of the active energymeter object.

opendssdirect.Meters.AllEndElements()

(read-only) Array of names of all zone end elements.

opendssdirect.Meters.AllNames()

(read-only) List of strings with all Meter names

opendssdirect.Meters.AllocFactors(*args)

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

opendssdirect.Meters.AvgRepairTime()

(read-only) Average Repair time in this section of the meter zone

opendssdirect.Meters.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

opendssdirect.Meters.CloseAllDIFiles()
opendssdirect.Meters.Count()

(read-only) Number of Meters

opendssdirect.Meters.CountBranches()

(read-only) Number of branches in Active energymeter zone. (Same as sequencelist size)

opendssdirect.Meters.CountEndElements()

(read-only) Number of zone end elements in the active meter zone.

opendssdirect.Meters.CustInterrupts()

(read-only) Total customer interruptions for this Meter zone based on reliability calcs.

opendssdirect.Meters.DIFilesAreOpen()

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

opendssdirect.Meters.DoReliabilityCalc(AssumeRestoration)
opendssdirect.Meters.FaultRateXRepairHrs()

(read-only) Sum of Fault Rate time Repair Hrs in this section of the meter zone

opendssdirect.Meters.First()

Set first Meter active; returns 0 if none.

opendssdirect.Meters.Idx(*args)

Get/set active Meter by index; 1..Count

opendssdirect.Meters.MeteredElement(*args)

Set Name of metered element

opendssdirect.Meters.MeteredTerminal(*args)

set Number of Metered Terminal

opendssdirect.Meters.Name(*args)

Get/set the name of the active Meter

opendssdirect.Meters.Next()

Sets next Meter active; returns 0 if no more.

opendssdirect.Meters.NumSectionBranches()

(read-only) Number of branches (lines) in this section

opendssdirect.Meters.NumSectionCustomers()

(read-only) Number of Customers in the active section.

opendssdirect.Meters.NumSections()

(read-only) Number of feeder sections in this meter’s zone

opendssdirect.Meters.OCPDeviceType()

(read-only) Type of OCP device. 1=Fuse; 2=Recloser; 3=Relay

opendssdirect.Meters.OpenAllDIFiles()
opendssdirect.Meters.PeakCurrent(*args)

Array of doubles to set values of Peak Current property

opendssdirect.Meters.RegisterNames()

(read-only) Array of strings containing the names of the registers.

opendssdirect.Meters.RegisterValues()

(read-only) Array of all the values contained in the Meter registers for the active Meter.

opendssdirect.Meters.Reset()
opendssdirect.Meters.ResetAll()
opendssdirect.Meters.SAIDI()

(read-only) SAIDI for this meter’s zone. Execute DoReliabilityCalc first.

opendssdirect.Meters.SAIFI()

(read-only) Returns SAIFI for this meter’s Zone. Execute Reliability Calc method first.

opendssdirect.Meters.SAIFIkW()

(read-only) SAIFI based on kW rather than number of customers. Get after reliability calcs.

opendssdirect.Meters.Sample()
opendssdirect.Meters.SampleAll()
opendssdirect.Meters.Save()
opendssdirect.Meters.SaveAll()
opendssdirect.Meters.SectSeqidx()

(read-only) SequenceIndex of the branch at the head of this section

opendssdirect.Meters.SectTotalCust()

(read-only) Total Customers downline from this section

opendssdirect.Meters.SeqListSize()

(read-only) Size of Sequence List

opendssdirect.Meters.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.

opendssdirect.Meters.SetActiveSection(SectIdx)
opendssdirect.Meters.SumBranchFltRates()

(read-only) Sum of the branch fault rates in this section of the meter’s zone

opendssdirect.Meters.TotalCustomers()

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

opendssdirect.Meters.Totals()

(read-only) Totals of all registers of all meters

opendssdirect.Meters.ZonePCE()

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

opendssdirect.Monitors module

opendssdirect.Monitors.AllNames()

(read-only) List of strings with all Monitor names

opendssdirect.Monitors.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.

opendssdirect.Monitors.ByteStream()

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

opendssdirect.Monitors.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.

opendssdirect.Monitors.Count()

(read-only) Number of Monitors

opendssdirect.Monitors.Element(*args)

Full object name of element being monitored.

opendssdirect.Monitors.FileName()

(read-only) Name of CSV file associated with active Monitor.

opendssdirect.Monitors.FileVersion()

(read-only) Monitor File Version (integer)

opendssdirect.Monitors.First()

Set first Monitor active; returns 0 if none.

opendssdirect.Monitors.Header()

(read-only) Header string; Array of strings containing Channel names

opendssdirect.Monitors.Idx(*args)

Get/set active Monitor by index; 1..Count

opendssdirect.Monitors.Mode(*args)

Set Monitor mode (bitmask integer - see DSS Help)

opendssdirect.Monitors.Name(*args)

Get/set the name of the active Monitor

opendssdirect.Monitors.Next()

Sets next Monitor active; returns 0 if no more.

opendssdirect.Monitors.NumChannels()

(read-only) Number of Channels in the active Monitor

opendssdirect.Monitors.Process()
opendssdirect.Monitors.ProcessAll()
opendssdirect.Monitors.RecordSize()

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

opendssdirect.Monitors.Reset()
opendssdirect.Monitors.ResetAll()
opendssdirect.Monitors.Sample()
opendssdirect.Monitors.SampleAll()
opendssdirect.Monitors.SampleCount()

(read-only) Number of Samples in Monitor at Present

opendssdirect.Monitors.Save()
opendssdirect.Monitors.SaveAll()
opendssdirect.Monitors.Show()
opendssdirect.Monitors.Terminal(*args)

Terminal number of element being monitored.

opendssdirect.Monitors.dblFreq()

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

opendssdirect.Monitors.dblHour()

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

opendssdirect.PDElements module

opendssdirect.PDElements.AccumulatedL()

(read-only) accummulated failure rate for this branch on downline

opendssdirect.PDElements.AllCplxSeqCurrents()

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

(API Extension)

opendssdirect.PDElements.AllCurrents()

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

(API Extension)

opendssdirect.PDElements.AllCurrentsMagAng()

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

(API Extension)

opendssdirect.PDElements.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)

opendssdirect.PDElements.AllNames()

Array of strings consisting of all PD element names.

(API Extension)

opendssdirect.PDElements.AllNumConductors()

Integer array listing the number of conductors of all PD elements

(API Extension)

opendssdirect.PDElements.AllNumPhases()

Integer array listing the number of phases of all PD elements

(API Extension)

opendssdirect.PDElements.AllNumTerminals()

Integer array listing the number of terminals of all PD elements

(API Extension)

opendssdirect.PDElements.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)

opendssdirect.PDElements.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)

opendssdirect.PDElements.AllPowers()

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

(API Extension)

opendssdirect.PDElements.AllSeqCurrents()

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

(API Extension)

opendssdirect.PDElements.AllSeqPowers()

Double array of sequence powers into each 3-phase teminal, for each PD element

(API Extension)

opendssdirect.PDElements.Count()

(read-only) Number of PD elements (including disabled elements)

opendssdirect.PDElements.FaultRate(*args)

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

opendssdirect.PDElements.First()

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

opendssdirect.PDElements.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.

opendssdirect.PDElements.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.

opendssdirect.PDElements.Lambda()

(read-only) Failure rate for this branch. Faults per year including length of line.

opendssdirect.PDElements.Name(*args)

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

opendssdirect.PDElements.Next()

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

opendssdirect.PDElements.NumCustomers()

(read-only) Number of customers, this branch

opendssdirect.PDElements.ParentPDElement()

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

opendssdirect.PDElements.PctPermanent(*args)

Get/Set percent of faults that are permanent (require repair). Otherwise, fault is assumed to be transient/temporary.

opendssdirect.PDElements.RepairTime(*args)

Average repair time for this element in hours

opendssdirect.PDElements.SectionID()

(read-only) Integer ID of the feeder section that this PDElement branch is part of

opendssdirect.PDElements.TotalCustomers()

(read-only) Total number of customers from this branch to the end of the zone

opendssdirect.PDElements.TotalMiles()

(read-only) Total miles of line from this element to the end of the zone. For recloser siting algorithm.

opendssdirect.PVsystems module

opendssdirect.PVsystems.AllNames()

(read-only) List of strings with all PVSystem names

opendssdirect.PVsystems.Count()

(read-only) Number of PVSystems

opendssdirect.PVsystems.First()

Set first PVSystem active; returns 0 if none.

opendssdirect.PVsystems.Idx(*args)

Get/set active PVSystem by index; 1..Count

opendssdirect.PVsystems.Irradiance(*args)

Get/set the present value of the Irradiance property in kW/m²

opendssdirect.PVsystems.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.

opendssdirect.PVsystems.Name(*args)

Get/set the name of the active PVSystem

opendssdirect.PVsystems.Next()

Sets next PVSystem active; returns 0 if no more.

opendssdirect.PVsystems.Pmpp(*args)

Gets/sets the rated max power of the PV array for 1.0 kW/sq-m irradiance and a user-selected array temperature of the active PVSystem.

opendssdirect.PVsystems.RegisterNames()

(read-only) Array of PVSYSTEM energy meter register names

opendssdirect.PVsystems.RegisterValues()

(read-only) Array of doubles containing values in PVSystem registers.

opendssdirect.PVsystems.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.

opendssdirect.PVsystems.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.

opendssdirect.PVsystems.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.

opendssdirect.PVsystems.daily(*args)

Name of the loadshape for a daily PVSystem profile.

opendssdirect.PVsystems.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.

opendssdirect.PVsystems.kVARated(*args)

Get/set Rated kVA of the PVSystem

opendssdirect.PVsystems.kW()

(read-only) get kW output

opendssdirect.PVsystems.kvar(*args)

Get/set kvar output value

opendssdirect.PVsystems.pf(*args)

Get/set the power factor for the active PVSystem

opendssdirect.PVsystems.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.

opendssdirect.Parser module

opendssdirect.Parser.AutoIncrement(*args)

Default is FALSE. If TRUE parser automatically advances to next token after DblValue, IntValue, or StrValue. Simpler when you don’t need to check for parameter names.

opendssdirect.Parser.BeginQuote(*args)

Get/Set String containing the the characters for Quoting in OpenDSS scripts. Matching pairs defined in EndQuote. Default is “’([{.

opendssdirect.Parser.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.

opendssdirect.Parser.DblValue()

(read-only) Return next parameter as a double.

opendssdirect.Parser.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 whitesspace to separate tokens.

opendssdirect.Parser.EndQuote(*args)

String containing characters, in order, that match the beginning quote characters in BeginQuote. Default is “’)]}

opendssdirect.Parser.IntValue()

(read-only) Return next parameter as a long integer.

opendssdirect.Parser.Matrix(ExpectedOrder)

(read-only) 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.

opendssdirect.Parser.NextParam()

(read-only) Get next token and return tag name (before = sign) if any. See AutoIncrement.

opendssdirect.Parser.ResetDelimiters()
opendssdirect.Parser.StrValue()

(read-only) Return next parameter as a string

opendssdirect.Parser.SymMatrix(ExpectedOrder)

(read-only) Use this property to parse a matrix token specified in lower triangle form. Symmetry is forced.

opendssdirect.Parser.Vector(ExpectedSize)

(read-only) Returns token as array of doubles. For parsing quoted array syntax.

opendssdirect.Parser.WhiteSpace(*args)

(read) Get the characters used for White space in the command string. Default is blank and Tab. (write) Set the characters used for White space in the command string. Default is blank and Tab.

opendssdirect.Progress module

opendssdirect.Progress.Caption(Value)

(write-only) Caption to appear on the bottom of the DSS Progress form.

opendssdirect.Progress.Close()
opendssdirect.Progress.PctProgress(Value)

(write-only) Percent progress to indicate [0..100]

opendssdirect.Progress.Show()

opendssdirect.Properties module

opendssdirect.Properties.Description()

(read-only) Description of the property.

opendssdirect.Properties.Name()

(read-only) Name of Property

opendssdirect.Properties.Value(*args)

opendssdirect.Reclosers module

opendssdirect.Reclosers.AllNames()

(read-only) List of strings with all Recloser names

opendssdirect.Reclosers.Close()
opendssdirect.Reclosers.Count()

(read-only) Number of Reclosers

opendssdirect.Reclosers.First()

Set first Recloser active; returns 0 if none.

opendssdirect.Reclosers.GroundInst(*args)

Ground (3I0) instantaneous trip setting - curve multipler or actual amps.

opendssdirect.Reclosers.GroundTrip(*args)

Ground (3I0) trip multiplier or actual amps

opendssdirect.Reclosers.Idx(*args)

Get/set active Recloser by index; 1..Count

opendssdirect.Reclosers.MonitoredObj(*args)

Full name of object this Recloser to be monitored.

opendssdirect.Reclosers.MonitoredTerm(*args)

Terminal number of Monitored object for the Recloser

opendssdirect.Reclosers.Name(*args)

Get/set the name of the active Recloser

opendssdirect.Reclosers.Next()

Sets next Recloser active; returns 0 if no more.

opendssdirect.Reclosers.NumFast(*args)

Number of fast shots

opendssdirect.Reclosers.Open()
opendssdirect.Reclosers.PhaseInst(*args)

Phase instantaneous curve multipler or actual amps

opendssdirect.Reclosers.PhaseTrip(*args)

Phase trip curve multiplier or actual amps

opendssdirect.Reclosers.RecloseIntervals()

(read-only) Array of Doubles: reclose intervals, s, between shots.

opendssdirect.Reclosers.Shots(*args)

Number of shots to lockout (fast + delayed)

opendssdirect.Reclosers.SwitchedObj(*args)

Full name of the circuit element that is being switched by the Recloser.

opendssdirect.Reclosers.SwitchedTerm(*args)

Terminal number of the controlled device being switched by the Recloser

opendssdirect.RegControls module

opendssdirect.RegControls.AllNames()

(read-only) List of strings with all RegControl names

opendssdirect.RegControls.CTPrimary(*args)

CT primary ampere rating (secondary is 0.2 amperes)

opendssdirect.RegControls.Count()

(read-only) Number of RegControls

opendssdirect.RegControls.Delay(*args)

Time delay [s] after arming before the first tap change. Control may reset before actually changing taps.

opendssdirect.RegControls.First()

Set first RegControl active; returns 0 if none.

opendssdirect.RegControls.ForwardBand(*args)

Regulation bandwidth in forward direciton, centered on Vreg

opendssdirect.RegControls.ForwardR(*args)

LDC R setting in Volts

opendssdirect.RegControls.ForwardVreg(*args)

Target voltage in the forward direction, on PT secondary base.

opendssdirect.RegControls.ForwardX(*args)

LDC X setting in Volts

opendssdirect.RegControls.Idx(*args)

Get/set active RegControl by index; 1..Count

opendssdirect.RegControls.IsInverseTime(*args)

Time delay is inversely adjsuted, proportinal to the amount of voltage outside the regulating band.

opendssdirect.RegControls.IsReversible(*args)

Regulator can use different settings in the reverse direction. Usually not applicable to substation transformers.

opendssdirect.RegControls.MaxTapChange(*args)

Maximum tap change per iteration in STATIC solution mode. 1 is more realistic, 16 is the default for a faster soluiton.

opendssdirect.RegControls.MonitoredBus(*args)

Name of a remote regulated bus, in lieu of LDC settings

opendssdirect.RegControls.Name(*args)

Get/set the name of the active RegControl

opendssdirect.RegControls.Next()

Sets next RegControl active; returns 0 if no more.

opendssdirect.RegControls.PTRatio(*args)

PT ratio for voltage control settings

opendssdirect.RegControls.Reset()
opendssdirect.RegControls.ReverseBand(*args)

Bandwidth in reverse direction, centered on reverse Vreg.

opendssdirect.RegControls.ReverseR(*args)

Reverse LDC R setting in Volts.

opendssdirect.RegControls.ReverseVreg(*args)

Target voltage in the revese direction, on PT secondary base.

opendssdirect.RegControls.ReverseX(*args)

Reverse LDC X setting in volts.

opendssdirect.RegControls.TapDelay(*args)

Time delay [s] for subsequent tap changes in a set. Control may reset before actually changing taps.

opendssdirect.RegControls.TapNumber(*args)

Integer number of the tap that the controlled transformer winding is currentliy on.

opendssdirect.RegControls.TapWinding(*args)

Tapped winding number

opendssdirect.RegControls.Transformer(*args)

Name of the transformer this regulator controls

opendssdirect.RegControls.VoltageLimit(*args)

First house voltage limit on PT secondary base. Setting to 0 disables this function.

opendssdirect.RegControls.Winding(*args)

Winding number for PT and CT connections

opendssdirect.Relays module

opendssdirect.Relays.AllNames()

(read-only) List of strings with all Relay names

opendssdirect.Relays.Count()

(read-only) Number of Relays

opendssdirect.Relays.First()

Set first Relay active; returns 0 if none.

opendssdirect.Relays.Idx(*args)

Get/set active Relay by index; 1..Count

opendssdirect.Relays.MonitoredObj(*args)

Full name of object this Relay is monitoring.

opendssdirect.Relays.MonitoredTerm(*args)

Number of terminal of monitored element that this Relay is monitoring.

opendssdirect.Relays.Name(*args)

Get/set the name of the active Relay

opendssdirect.Relays.Next()

Sets next Relay active; returns 0 if no more.

opendssdirect.Relays.SwitchedObj(*args)

Full name of element that will be switched when relay trips.

opendssdirect.Relays.SwitchedTerm(*args)

Terminal number of the switched object that will be opened when the relay trips.

opendssdirect.Sensors module

opendssdirect.Sensors.AllNames()

(read-only) List of strings with all Sensor names

opendssdirect.Sensors.Count()

(read-only) Number of Sensors

opendssdirect.Sensors.Currents(*args)

Array of doubles for the line current measurements; don’t use with kWS and kVARS.

opendssdirect.Sensors.First()

Set first Sensor active; returns 0 if none.

opendssdirect.Sensors.Idx(*args)

Get/set active Sensor by index; 1..Count

opendssdirect.Sensors.IsDelta(*args)

True if measured voltages are line-line. Currents are always line currents.

opendssdirect.Sensors.MeteredElement(*args)

Full Name of the measured element

opendssdirect.Sensors.MeteredTerminal(*args)

Number of the measured terminal in the measured element.

opendssdirect.Sensors.Name(*args)

Get/set the name of the active Sensor

opendssdirect.Sensors.Next()

Sets next Sensor active; returns 0 if no more.

opendssdirect.Sensors.PctError(*args)

Assumed percent error in the Sensor measurement. Default is 1.

opendssdirect.Sensors.Reset()
opendssdirect.Sensors.ResetAll()
opendssdirect.Sensors.ReverseDelta(*args)

True if voltage measurements are 1-3, 3-2, 2-1.

opendssdirect.Sensors.Weight(*args)

Weighting factor for this Sensor measurement with respect to other Sensors. Default is 1.

opendssdirect.Sensors.kVBase(*args)

Voltage base for the sensor measurements. LL for 2 and 3-phase sensors, LN for 1-phase sensors.

opendssdirect.Sensors.kVS(*args)

Array of doubles for the LL or LN (depending on Delta connection) voltage measurements.

opendssdirect.Sensors.kW(*args)

Array of doubles for P measurements. Overwrites Currents with a new estimate using kVARS.

opendssdirect.Sensors.kvar(*args)

Array of doubles for Q measurements. Overwrites Currents with a new estimate using kWS.

opendssdirect.Settings module

opendssdirect.Settings.AllocationFactors(Value)

(write-only) Sets all load allocation factors for all loads defined by XFKVA property to this value.

opendssdirect.Settings.AllowDuplicates(*args)

{True | False*} Designates whether to allow duplicate names of objects

opendssdirect.Settings.AutoBusList(*args)

List of Buses or (File=xxxx) syntax for the AutoAdd solution mode.

opendssdirect.Settings.CktModel(*args)

{dssMultiphase (0) * | dssPositiveSeq (1) } IIndicate if the circuit model is positive sequence.

opendssdirect.Settings.ControlTrace(*args)

{True | False*} Denotes whether to trace the control actions to a file.

opendssdirect.Settings.EmergVmaxpu(*args)

Per Unit maximum voltage for Emergency conditions.

opendssdirect.Settings.EmergVminpu(*args)

Per Unit minimum voltage for Emergency conditions.

opendssdirect.Settings.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)

opendssdirect.Settings.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)

opendssdirect.Settings.LossRegs(*args)

Integer array defining which energy meter registers to use for computing losses

opendssdirect.Settings.LossWeight(*args)

Weighting factor applied to Loss register values.

opendssdirect.Settings.NormVmaxpu(*args)

Per Unit maximum voltage for Normal conditions.

opendssdirect.Settings.NormVminpu(*args)

Per Unit minimum voltage for Normal conditions.

opendssdirect.Settings.PriceCurve(*args)

Name of LoadShape object that serves as the source of price signal data for yearly simulations, etc.

opendssdirect.Settings.PriceSignal(*args)

Price Signal for the Circuit

opendssdirect.Settings.Trapezoidal(*args)

{True | False *} Gets value of trapezoidal integration flag in energy meters.

opendssdirect.Settings.UERegs(*args)

Array of Integers defining energy meter registers to use for computing UE

opendssdirect.Settings.UEWeight(*args)

Weighting factor applied to UE register values.

opendssdirect.Settings.VoltageBases(*args)

Array of doubles defining the legal voltage bases in kV L-L

opendssdirect.Settings.ZoneLock(*args)

{True | False*} Locks Zones on energy meters to prevent rebuilding if a circuit change occurs.

opendssdirect.Solution module

opendssdirect.Solution.AddType(*args)

Type of device to add in AutoAdd Mode: {dssGen (Default) | dssCap}

opendssdirect.Solution.Algorithm(*args)

Base Solution algorithm: {dssNormalSolve | dssNewtonSolve}

opendssdirect.Solution.BuildYMatrix(BuildOption, AllocateVI)
opendssdirect.Solution.BusLevels()
opendssdirect.Solution.Capkvar(*args)

Capacitor kvar for adding capacitors in AutoAdd mode

opendssdirect.Solution.CheckControls()
opendssdirect.Solution.CheckFaultStatus()
opendssdirect.Solution.Cleanup()
opendssdirect.Solution.ControlActionsDone(*args)

Flag indicating the control actions are done.

opendssdirect.Solution.ControlIterations(*args)

Value of the control iteration counter

opendssdirect.Solution.ControlMode(*args)

{dssStatic* | dssEvent | dssTime} Modes for control devices

opendssdirect.Solution.Converged(*args)

Flag to indicate whether the circuit solution converged

opendssdirect.Solution.Convergence(*args)

Solution convergence tolerance.

opendssdirect.Solution.DblHour(*args)

Hour as a double, including fractional part

opendssdirect.Solution.DefaultDaily(*args)

Default daily load shape (defaults to “Default”)

opendssdirect.Solution.DefaultYearly(*args)

Default Yearly load shape (defaults to “Default”)

opendssdirect.Solution.DoControlActions()
opendssdirect.Solution.EventLog()

(read-only) Array of strings containing the Event Log

opendssdirect.Solution.FinishTimeStep()
opendssdirect.Solution.Frequency(*args)

Set the Frequency for next solution

opendssdirect.Solution.GenMult(*args)

Default Multiplier applied to generators (like LoadMult)

opendssdirect.Solution.GenPF(*args)

PF for generators in AutoAdd mode

opendssdirect.Solution.GenkW(*args)

Generator kW for AutoAdd mode

opendssdirect.Solution.Hour(*args)

Set Hour for time series solutions.

opendssdirect.Solution.IncMatrix()
opendssdirect.Solution.IncMatrixCols()
opendssdirect.Solution.IncMatrixRows()
opendssdirect.Solution.InitSnap()
opendssdirect.Solution.IntervalHrs(*args)

Get/Set the Solution.IntervalHrs variable used for devices that integrate / custom solution algorithms

opendssdirect.Solution.Iterations()

(read-only) Number of iterations taken for last solution. (Same as TotalIterations)

opendssdirect.Solution.LDCurve(*args)

Load-Duration Curve name for LD modes

opendssdirect.Solution.Laplacian()
opendssdirect.Solution.LoadModel(*args)

Load Model: {dssPowerFlow (default) | dssAdmittance}

opendssdirect.Solution.LoadMult(*args)

Default load multiplier applied to all non-fixed loads

opendssdirect.Solution.MaxControlIterations(*args)

Maximum allowable control iterations

opendssdirect.Solution.MaxIterations(*args)

Max allowable iterations.

opendssdirect.Solution.MinIterations(*args)

Minimum number of iterations required for a power flow solution.

opendssdirect.Solution.Mode(*args)

Set present solution mode (by a text code - see DSS Help)

opendssdirect.Solution.ModeID()

(read-only) ID (text) of the present solution mode

opendssdirect.Solution.MostIterationsDone()

(read-only) Max number of iterations required to converge at any control iteration of the most recent solution.

opendssdirect.Solution.Number(*args)

Number of solutions to perform for Monte Carlo and time series simulations

opendssdirect.Solution.PctGrowth(*args)

Percent default annual load growth rate

opendssdirect.Solution.ProcessTime()

(read-only) Gets the time required to perform the latest solution (Read only)

opendssdirect.Solution.Random(*args)

Randomization mode for random variables “Gaussian” or “Uniform”

opendssdirect.Solution.SampleControlDevices()
opendssdirect.Solution.SampleDoControlActions()
opendssdirect.Solution.Seconds(*args)

Seconds from top of the hour.

opendssdirect.Solution.Solve()
opendssdirect.Solution.SolveDirect()
opendssdirect.Solution.SolveNoControl()
opendssdirect.Solution.SolvePFlow()
opendssdirect.Solution.SolvePlusControl()
opendssdirect.Solution.SolveSnap()
opendssdirect.Solution.StepSize(*args)

Time step size in sec

opendssdirect.Solution.StepSizeHr(Value)

(write-only) Set Stepsize in Hr

opendssdirect.Solution.StepSizeMin(Value)

(write-only) Set Stepsize in minutes

opendssdirect.Solution.SystemYChanged()

(read-only) Flag that indicates if elements of the System Y have been changed by recent activity.

opendssdirect.Solution.TimeTimeStep()

(read-only) Get the solution process time + sample time for time step

opendssdirect.Solution.TotalIterations()

(read-only) Total iterations including control iterations for most recent solution.

opendssdirect.Solution.TotalTime(*args)

Gets/sets the accumulated time of the simulation

opendssdirect.Solution.Year(*args)

Set year for planning studies

opendssdirect.SwtControls module

opendssdirect.SwtControls.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).

opendssdirect.SwtControls.AllNames()

(read-only) List of strings with all SwtControl names

opendssdirect.SwtControls.Count()

(read-only) Number of SwtControls

opendssdirect.SwtControls.Delay(*args)

Time delay [s] betwen arming and opening or closing the switch. Control may reset before actually operating the switch.

opendssdirect.SwtControls.First()

Set first SwtControl active; returns 0 if none.

opendssdirect.SwtControls.Idx(*args)

Get/set active SwtControl by index; 1..Count

opendssdirect.SwtControls.IsLocked(*args)

The lock prevents both manual and automatic switch operation.

opendssdirect.SwtControls.Name(*args)

Get/set the name of the active SwtControl

opendssdirect.SwtControls.Next()

Sets next SwtControl active; returns 0 if no more.

opendssdirect.SwtControls.NormalState(*args)

Get/set Normal state of switch (see actioncodes) dssActionOpen or dssActionClose

opendssdirect.SwtControls.Reset()
opendssdirect.SwtControls.State(*args)

Set it to force the switch to a specified state, otherwise read its present state.

opendssdirect.SwtControls.SwitchedObj(*args)

Full name of the switched element.

opendssdirect.SwtControls.SwitchedTerm(*args)

Terminal number where the switch is located on the SwitchedObj

opendssdirect.Text module

opendssdirect.Text.Command(*args)

Input command string for the DSS.

opendssdirect.Text.Result()

(read-only) Result string for the last command.

opendssdirect.Topology module

opendssdirect.Topology.ActiveBranch()

(read-only) Returns index of the active branch

opendssdirect.Topology.ActiveLevel()

(read-only) Topological depth of the active branch

opendssdirect.Topology.AllIsolatedBranches()

(read-only) Array of all isolated branch names.

opendssdirect.Topology.AllIsolatedLoads()

(read-only) Array of all isolated load names.

opendssdirect.Topology.AllLoopedPairs()

(read-only) Array of all looped element names, by pairs.

opendssdirect.Topology.BackwardBranch()

(read-only) MOve back toward the source, return index of new active branch, or 0 if no more.

opendssdirect.Topology.BranchName(*args)

Name of the active branch.

opendssdirect.Topology.BusName(*args)

Set the active branch to one containing this bus, return index or 0 if not found

opendssdirect.Topology.First()

(read-only) Sets the first branch active, returns 0 if none.

opendssdirect.Topology.FirstLoad()

(read-only) First load at the active branch, return index or 0 if none.

opendssdirect.Topology.ForwardBranch()

(read-only) Move forward in the tree, return index of new active branch or 0 if no more

opendssdirect.Topology.LoopedBranch()

(read-only) Move to looped branch, return index or 0 if none.

opendssdirect.Topology.Next()

(read-only) Sets the next branch active, returns 0 if no more.

opendssdirect.Topology.NextLoad()

(read-only) Next load at the active branch, return index or 0 if no more.

opendssdirect.Topology.NumIsolatedBranches()

(read-only) Number of isolated branches (PD elements and capacitors).

opendssdirect.Topology.NumIsolatedLoads()

(read-only) Number of isolated loads

opendssdirect.Topology.NumLoops()

(read-only) Number of loops

opendssdirect.Topology.ParallelBranch()

(read-only) Move to directly parallel branch, return index or 0 if none.

opendssdirect.Transformers module

opendssdirect.Transformers.AllLossesByType()

Complex array with the losses by type (total losses, load losses, no-load losses), in VA, concatenated for ALL transformers

opendssdirect.Transformers.AllNames()

(read-only) List of strings with all Transformer names

opendssdirect.Transformers.CoreType(*args)

Transformer Core Type: 0=shell;1 = 1-phase; 3= 3-leg; 5= 5-leg

opendssdirect.Transformers.Count()

(read-only) Number of Transformers

opendssdirect.Transformers.First()

Set first Transformer active; returns 0 if none.

opendssdirect.Transformers.Idx(*args)

Get/set active Transformer by index; 1..Count

opendssdirect.Transformers.IsDelta(*args)

Active Winding delta or wye connection?

opendssdirect.Transformers.LossesByType()

Complex array with the losses by type (total losses, load losses, no-load losses), in VA

opendssdirect.Transformers.MaxTap(*args)

Active Winding maximum tap in per-unit.

opendssdirect.Transformers.MinTap(*args)

Active Winding minimum tap in per-unit.

opendssdirect.Transformers.Name(*args)

Get/set the name of the active Transformer

opendssdirect.Transformers.Next()

Sets next Transformer active; returns 0 if no more.

opendssdirect.Transformers.NumTaps(*args)

Active Winding number of tap steps betwein MinTap and MaxTap.

opendssdirect.Transformers.NumWindings(*args)

Number of windings on this transformer. Allocates memory; set or change this property first.

opendssdirect.Transformers.R(*args)

Active Winding resistance in %

opendssdirect.Transformers.RdcOhms(*args)

dc Resistance of active winding in ohms for GIC analysis

opendssdirect.Transformers.Rneut(*args)

Active Winding neutral resistance [ohms] for wye connections. Set less than zero for ungrounded wye.

opendssdirect.Transformers.Tap(*args)

Active Winding tap in per-unit.

opendssdirect.Transformers.Wdg(*args)

Active Winding Number from 1..NumWindings. Update this before reading or setting a sequence of winding properties (R, Tap, kV, kVA, etc.)

opendssdirect.Transformers.WdgCurrents()

(read-only) All Winding currents (ph1, wdg1, wdg2,… ph2, wdg1, wdg2 …)

opendssdirect.Transformers.WdgVoltages()

(read-only) Complex array of voltages for active winding

opendssdirect.Transformers.XfmrCode(*args)

Name of an XfrmCode that supplies electircal parameters for this Transformer.

opendssdirect.Transformers.Xhl(*args)

Percent reactance between windings 1 and 2, on winding 1 kVA base. Use for 2-winding or 3-winding transformers.

opendssdirect.Transformers.Xht(*args)

Percent reactance between windigns 1 and 3, on winding 1 kVA base. Use for 3-winding transformers only.

opendssdirect.Transformers.Xlt(*args)

Percent reactance between windings 2 and 3, on winding 1 kVA base. Use for 3-winding transformers only.

opendssdirect.Transformers.Xneut(*args)

Active Winding neutral reactance [ohms] for wye connections.

opendssdirect.Transformers.kV(*args)

Active Winding kV rating. Phase-phase for 2 or 3 phases, actual winding kV for 1 phase transformer.

opendssdirect.Transformers.kVA(*args)

Active Winding kVA rating. On winding 1, this also determines normal and emergency current ratings for all windings.

opendssdirect.Transformers.strWdgCurrents()

(read-only) All winding currents in CSV string form like the WdgCurrents property

opendssdirect.Vsources module

opendssdirect.Vsources.AllNames()

(read-only) List of strings with all Vsource names

opendssdirect.Vsources.AngleDeg(*args)

Phase angle of first phase in degrees

opendssdirect.Vsources.BasekV(*args)

Source voltage in kV

opendssdirect.Vsources.Count()

(read-only) Number of Vsources

opendssdirect.Vsources.First()

Set first Vsource active; returns 0 if none.

opendssdirect.Vsources.Frequency(*args)

Source frequency in Hz

opendssdirect.Vsources.Idx(*args)

Get/set active Vsource by index; 1..Count

opendssdirect.Vsources.Name(*args)

Get/set the name of the active Vsource

opendssdirect.Vsources.Next()

Sets next Vsource active; returns 0 if no more.

opendssdirect.Vsources.PU(*args)

Per-unit value of source voltage

opendssdirect.Vsources.Phases(*args)

Number of phases

opendssdirect.XYCurves module

opendssdirect.XYCurves.AllNames()

(read-only) List of strings with all XYCurve names

opendssdirect.XYCurves.Count()

(read-only) Number of XYCurves

opendssdirect.XYCurves.First()

Set first XYCurve active; returns 0 if none.

opendssdirect.XYCurves.Idx(*args)

Get/set active XYCurve by index; 1..Count

opendssdirect.XYCurves.Name(*args)

Get/set the name of the active XYCurve

opendssdirect.XYCurves.Next()

Sets next XYCurve active; returns 0 if no more.

opendssdirect.XYCurves.Npts(*args)

Get/Set Number of points in X-Y curve

opendssdirect.XYCurves.X(*args)

Set X value or get interpolated value after setting Y

opendssdirect.XYCurves.XArray(*args)

Get/set X values as a Array of doubles. Set Npts to max number expected if setting

opendssdirect.XYCurves.XScale(*args)

Factor to scale X values from original curve

opendssdirect.XYCurves.XShift(*args)

Amount to shift X value from original curve

opendssdirect.XYCurves.Y(*args)

Set Y value or get interpolated Y value after setting X

opendssdirect.XYCurves.YArray(*args)

Get/Set Y values in curve; Set Npts to max number expected if setting

opendssdirect.XYCurves.YScale(*args)

Factor to scale Y values from original curve

opendssdirect.XYCurves.YShift(*args)

Amount to shift Y valiue from original curve

opendssdirect.YMatrix module

opendssdirect.YMatrix.AddInAuxCurrents(SType)
opendssdirect.YMatrix.BuildYMatrixD(BuildOps, AllocateVI)
opendssdirect.YMatrix.GetPCInjCurr()
opendssdirect.YMatrix.GetSourceInjCurrents()
opendssdirect.YMatrix.IVector()

Get access to the internal Current pointer

opendssdirect.YMatrix.SolveSystem(NodeV)
opendssdirect.YMatrix.SystemYChanged(*args)
opendssdirect.YMatrix.UseAuxCurrents(*args)
opendssdirect.YMatrix.VVector()

Get access to the internal Voltage pointer

opendssdirect.YMatrix.ZeroInjCurr()
opendssdirect.YMatrix.getI()

Get the data from the internal Current pointer

opendssdirect.YMatrix.getV()

Get the data from the internal Voltage pointer

opendssdirect.YMatrix.getYsparse(factor=True)

Return as (data, indices, indptr) that can fed into scipy.sparse.csc_matrix

opendssdirect.utils module

class opendssdirect.utils.Iterator(module, function)

Bases: object

opendssdirect.utils.capacitors_to_dataframe(dss=None)
opendssdirect.utils.class_to_dataframe(class_name, dss=None, transform_string=None, clean_data=None)
opendssdirect.utils.fuses_to_dataframe(dss=None)
opendssdirect.utils.generators_to_dataframe(dss=None)
opendssdirect.utils.getmembers(module)
opendssdirect.utils.isource_to_dataframe(dss=None)
opendssdirect.utils.lines_to_dataframe(dss=None)
opendssdirect.utils.loads_to_dataframe(dss=None)
opendssdirect.utils.loadshape_to_dataframe(dss=None)
opendssdirect.utils.meters_to_dataframe(dss=None)
opendssdirect.utils.monitor_to_dataframe(dss=None)

Return the data from current active monitor as a Pandas DataFrame

opendssdirect.utils.monitors_to_dataframe(dss=None)
opendssdirect.utils.pvsystems_to_dataframe(dss=None)
opendssdirect.utils.reclosers_to_dataframe(dss=None)
opendssdirect.utils.regcontrols_to_dataframe(dss=None)
opendssdirect.utils.relays_to_dataframe(dss=None)
opendssdirect.utils.run_command(text, dss=None)

Use Text interface of OpenDSS

opendssdirect.utils.sensors_to_dataframe(dss=None)
opendssdirect.utils.to_dataframe(module)
opendssdirect.utils.transformers_to_dataframe(dss=None)
opendssdirect.utils.vsources_to_dataframe(dss=None)
opendssdirect.utils.xycurves_to_dataframe(dss=None)

Module contents

This package implements the OpenDSSDirect.py API using DSS C-API instead of the official OpenDSS Direct DLL.