Bases: IntEnum
An enumeration.
Bases: IntEnum
An enumeration.
Bases: IntEnum
An enumeration.
Bases: IntFlag
An enumeration.
Bases: IntFlag
An enumeration.
Bases: IntEnum
An enumeration.
Bases: IntEnum
An enumeration.
Bases: IntEnum
An enumeration.
Bases: IntEnum
An enumeration.
Bases: IntEnum
An enumeration.
Bases: IntEnum
Deprecated. Please use instead: - AutoAddTypes - CktModels - ControlModes - SolutionLoadModels - SolutionAlgorithms - RandomModes
Bases: IntEnum
An enumeration.
Bases: IntEnum
An enumeration.
Bases: IntEnum
An enumeration.
Bases: IntEnum
An enumeration.
This module provides a work-in-progress implementation of the original OpenDSS plots using the new features from DSS C-API v0.12+ and common Python modules such as matplotlib.
This is not a complete implementation and there are known limitations, but should suffice for many use-cases. We’d like to add another backend later.
Enables the plotting subsystem from DSS-Extensions.
Set plot3d to True to try to reproduce some of the plots from the alternative OpenDSS Visualization Tool / OpenDSS Viewer addition to OpenDSS.
Use show to control whether this backend should call pyplot.show() or leave that to the system or the user. If the user plans to customize the figure, it is better to set show=False in order to preserve the figures, since pyplot.show() discards them.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Base
Main OpenDSS interface. Organizes the subclasses trying to mimic the OpenDSSengine.DSS object as seen from win32com.client or comtypes.client.
This main class also includes some global settings. See more settings in ActiveCircuit.Settings.
Creates a new DSS engine context. 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)
Self
int
bool
IActiveClass
¶General information about the current active DSS class.
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, DSS.ActiveCircuit.ActiveCktElement.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)
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)
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)
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)
Gets/sets whether text output is allowed
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)
List of DSS intrinsic classes (names of the classes)
Controls some compatibility flags introduced to toggle some behavior from the official OpenDSS.
THESE FLAGS ARE GLOBAL, affecting all DSS engines in the process.
The current bit flags are:
This flag is useful for legacy applications that don’t handle OpenDSS API errors properly. Through the development of DSS-Extensions, we noticed this is actually a quite common issue.
(As2p) and sequence-to-phase (Ap2s) transform matrices. On DSS C-API, we fill the matrix explicitly using higher precision, while numerical inversion of an initially worse precision matrix is used in the official OpenDSS. We will introduce better precision for other aspects of the engine in the future, so this flag can be used to toggle the old/bad values where feasible.
but needs further investigation, so we added this flag in the time being.
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.
Related enumeration: DSSCompatFlags
(API Extension)
IDSSProgress
¶Kept for compatibility. Controls the progress dialog/output, if avaiable.
IDSSimComs
¶Kept for compatibility. Apparently was used for DSSim-PC (now OpenDSS-G), a closed-source software developed by EPRI using LabView.
DSS Data File Path. Default path for reports, etc. from DSS
Returns the path name for the default text editor.
IError
¶The Error interface provides the current error state and messages. In DSS-Python, this is already mapped to Python exceptions, so the user typpically does not need to worry about this.
IDSSEvents
¶Kept for compatibility.
IDSS_Executive
¶Access to the list of available commands and options, including help text.
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)
Number of Circuits currently defined
Number of DSS intrinsic classes
Number of user-defined classes
IObj
¶An experimental API that exposes all data classes of the DSS engine in a new and pythonic API.
(API Extension)
Shortcut for the plotting module. This property is equivalent to:
`
from dss import plot
return plot
`
Gives access to the enable() and disable() functions. Requires matplotlib and SciPy to be installed, hence it is an optional feature.
(API Extension)
List of user-defined classes
Get version string for the DSS.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Base
Get i-th command
str
Get help string for i-th command
str
Get i-th option
str
Get help string for i-th option
str
Get present value of i-th option
str
Number of DSS Executive Commands
Number of DSS Executive Options
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Base
Description of error for last operation
EarlyAbort controls whether all errors halts the DSS script processing (Compile/Redirect), defaults to True.
(API Extension)
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)
Error Number (returns current value and then resets to zero)
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 and OpenDSSDirect.py.
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Base
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)
Input command string for the DSS.
Result string for the last command.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2021-2022 Paulo Meira
Bases: Base
Closes the current open ZIP file
(API Extension)
Check if the given path name is present in the current ZIP file.
(API Extension)
bool
Extracts the contents of the file “FileName” from the current (open) ZIP file. Returns a byte-string.
(API Extension)
bytes
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)
List
[str
]
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)
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)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Base
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)
str
Returns name of active class.
Get the name of the parent class of the active class
Array of strings consisting of all element names in the active class.
Number of elements in Active Class. Same as NumElements Property.
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.
Name of the Active Element of the Active Class
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.
Number of elements in this class. Same as Count property.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Base
int
bool
Returns an array with the names of all PCE connected to the active bus
Returns an array with the names of all PDE connected to the active bus
Indicates whether a coordinate has been defined for this bus
Complex Double array of Sequence Voltages (0, 1, 2) at this Bus.
Accumulated customer outage durations
Annual number of customer-interruptions from this bus
Distance from energymeter (if non-zero)
Average interruption duration, hr.
Short circuit currents at bus; Complex Array.
Accumulated failure rate downstream from this bus; faults per year
List of strings: Full Names of LINE elements connected to the active bus.
List of strings: Full Names of LOAD elements connected to the active bus.
Total numbers of customers served downline from this bus
Number of interruptions this bus per year
Name of Bus
Integer Array of Node Numbers defined at the bus in same order as the voltages.
Number of Nodes this bus.
Integer ID of the feeder section in which this bus is located.
Double Array of sequence voltages at this bus. Magnitudes only.
Total length of line downline from this bus, in miles. For recloser siting algorithm.
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.
Array of doubles containing voltages in Magnitude (VLN), angle (degrees)
Open circuit voltage; Complex array.
Complex array of voltages at this bus.
Complex array of Ysc matrix at bus. Column by column.
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.
Complex Zero-Sequence short circuit impedance at bus.
Complex Positive-Sequence short circuit impedance at bus.
Complex array of Zsc matrix at bus. Column by column.
Base voltage at bus in kV
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.
Array of doubles containing voltage magnitude, angle (degrees) pairs in per unit
Complex Array of pu voltages at the bus.
X Coordinate for bus (double)
Y coordinate for bus(double)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
CNData objects
(API Extension)
Array of all names of this object type
Number of objects of this type
Emergency ampere rating
Sets the first object of this type active. Returns 0 if none.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Normal Ampere rating
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
Transducer ratio from pirmary current to control current.
Name of the Capacitor that is controlled.
Number of objects of this type
Time delay [s] to switch on after arming. Control may reset before actually switching.
Time delay [s] before switching off a step. Control may reset before actually switching.
Sets the first object of this type active. Returns 0 if none.
Type of automatic controller.
Full name of the element that PT and CT are connected to.
Terminal number on the element that PT and CT are connected to.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Threshold to switch off a step. See Mode for units.
Threshold to arm or switch on a step. See Mode for units.
Transducer ratio from primary feeder to control voltage.
Enables Vmin and Vmax to override the control Mode
With VoltOverride, swtich off whenever PT voltage exceeds this level.
With VoltOverride, switch ON whenever PT voltage drops below this level.
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
bool
bool
Array of all names of this object type
Number of Steps available in cap bank to be switched ON.
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Delta connection or wye?
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Number of steps (default 1) for distributing and switching the total bank kVAR.
A array of integer [0..numsteps-1] indicating state of each step. If the read value is -1 an error has occurred.
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
Bank kV rating. Use LL for 2 or 3 phases, or actual can rating for 1 phase.
Total bank KVAR, distributed equally among phases and steps.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Base
Returns an array of doubles representing the distances to parent EnergyMeter. Sequence of array corresponds to other node ByPhase properties.
ndarray
[Any
, dtype
[float64
]]
Return array of strings of the node names for the By Phase criteria. Sequence corresponds to other ByPhase properties.
List
[str
]
Returns Array of doubles represent voltage magnitudes for nodes on the specified phase.
ndarray
[Any
, dtype
[float64
]]
Returns array of per unit voltage magnitudes for each node by phase
ndarray
[Any
, dtype
[float64
]]
float
Array of total losses (complex) in a selection of elements. Use the element indices (starting at 1) as parameter.
(API Extension)
Union
[ndarray
[Any
, dtype
[float64
]], ndarray
[Any
, dtype
[complex128
]]]
int
int
int
int
int
int
int
int
int
int
ICktElement
¶IActiveClass
¶IDSSElement
¶ICktElement
¶Returns distance from each bus to parent EnergyMeter. Corresponds to sequence in AllBusNames.
Array of strings containing names of all buses in circuit (see AllNodeNames).
Array of magnitudes (doubles) of voltages at all buses
Double Array of all bus voltages (each node) magnitudes in Per unit
Complex array of all bus, node voltages from most recent solution
Array of total losses (complex) in each circuit element
Array of strings containing Full Name of all elements.
Returns an array of distances from parent EnergyMeter for each Node. Corresponds to AllBusVMag sequence.
Array of strings containing full name of each node in system in same order as returned by AllBusVolts, etc.
ICapControls
¶ICapacitors
¶ICktElement
¶ICtrlQueue
¶IDSSimComs
¶IGICSources
¶IGenerators
¶ILineCodes
¶ILineGeometries
¶Complex total line losses in the circuit
ILineSpacings
¶ILoadShapes
¶Total losses in active circuit, complex number (two-element array of double).
Name of the active circuit.
Total number of Buses in the circuit.
Number of CktElements in the circuit.
Total number of nodes in the circuit.
IPDElements
¶IPVSystems
¶Sets Parent PD element, if any, to be the active circuit element and returns index>0; Returns 0 if it fails or not applicable.
IReclosers
¶IReduceCkt
¶Circuit Reduction Interface
IRegControls
¶Complex losses in all transformers designated to substations.
ISwtControls
¶(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.
Total power (complex), kVA delivered to the circuit
ITransformers
¶Array of doubles containing complex injection currents for the present solution. Is is the “I” vector of I=YV
Array of strings containing the names of the nodes in the same order as the Y matrix
Complex array of actual node voltages in same order as SystemY matrix.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Base
Full name of the i-th controller attached to this element. Ex: str = Controller(2). See NumControls to determine valid index range
str
bool
Returns (value, Code). For PCElement, get the value of a variable by name. If Code>0 Then no variable by this name or not a PCelement.
Tuple
[float
, int
]
Returns (value, Code). For PCElement, get the value of a variable by integer index. If Code>0 Then no variable by this index or not a PCelement.
Tuple
[float
, int
]
Returns (value, Code). For PCElement, get the value of a variable by name. If Code>0 Then no variable by this name or not a PCelement.
Tuple
[float
, int
]
Returns (value, Code). For PCElement, get the value of a variable by integer index. If Code>0 Then no variable by this index or not a PCelement.
Tuple
[float
, int
]
int
int
Array containing all property names of the active device.
Array of strings listing all the published state variable names. Valid only for PCElements.
Array of doubles. Values of state variables of active element if PC element. Valid only for PCElements.
Array of strings. Get Bus definitions to which each terminal is connected.
Complex double array of Sequence Currents for all conductors of all terminals of active circuit element.
Complex double array of Sequence Voltage for all terminals of active circuit element.
Complex array of currents into each conductor of each terminal
Currents in magnitude, angle (degrees) format as a array of doubles.
Display name of the object (not necessarily unique)
Emergency Ampere Rating for PD elements
Boolean indicating that element is currently in the circuit.
Name of the Energy Meter this element is assigned to.
globally unique identifier for this object
Pointer to this object
True if a recloser, relay, or fuse controlling this ckt element. OCP = Overcurrent Protection
This element has a SwtControl attached.
This element has a CapControl or RegControl attached.
Returns true if the current active element is isolated. Note that this only fetches the current value. See also the Topology interface.
(API Extension)
Total losses in the element: two-element double array (complex), in VA (watts, vars)
Full Name of Active Circuit Element
Array of integer containing the node numbers (representing phases, for example) for each conductor of each terminal.
Array of integers, a copy of the internal NodeRef of the CktElement.
Normal ampere rating for PD Elements
Number of Conductors per Terminal
(read-only) Number of controls connected to this device. Use to determine valid range for index into Controller array.
Number of Phases
Number of Properties this Circuit Element.
Number of Terminals this Circuit Element
Index into Controller list of OCP Device controlling this CktElement
0=None; 1=Fuse; 2=Recloser; 3=Relay; Type of OCP controller device
Complex array of losses (kVA) by phase
Complex array of powers (kVA) into each conductor of each terminal
IDSSProperty
¶Residual currents for each terminal: (magnitude, angle in degrees)
Double array of symmetrical component currents (magnitudes only) into each 3-phase terminal
Complex array of sequence powers (kW, kvar) into each 3-phase teminal
Double array of symmetrical component voltages (magnitudes only) at each 3-phase terminal
Returns an array with the total powers (complex, kVA) at ALL terminals of the active circuit element.
Complex array of voltages at terminals
Voltages at each conductor in magnitude, angle form as array of doubles.
YPrim matrix, column order, complex numbers
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Base
Push a control action onto the DSS control queue by time, action code, and device handle (user defined). Returns Control Queue handle.
(write-only) Set the active action by index
Code for the active action. Long integer code to tell the control device what to do
Handle (User defined) to device that must act on the pending action.
Number of Actions on the current actionlist (that have been popped off the control queue by CheckControlActions)
Pops next action off the action list and makes it the active action. Returns zero if none.
Array of strings containing the entire queue in CSV format
Number of items on the OpenDSS control Queue
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Base
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)
str
Array of strings containing the names of all properties for the active DSS object.
Full Name of Active DSS Object (general element or circuit element).
Number of Properties for the active DSS object.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2019 Paulo Meira
Bases: object
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Close all phases of the fuse.
Current state of the fuses. TRUE if any fuse on any phase is blown. Else FALSE.
bool
Manual opening of all phases of the fuse.
Reset fuse to normal state.
Array of all names of this object type
Number of objects of this type
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.
Sets the first object of this type active. Returns 0 if none.
Full name of the circuit element to which the fuse is connected.
Terminal number to which the fuse is connected.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Array of strings indicating the normal state of each phase of the fuse.
Number of phases, this fuse.
Multiplier or actual amps for the TCCcurve object. Defaults to 1.0. Multiply current values of TCC curve by this to get actual amps.
Array of strings indicating the state of each phase of the fuse.
Full name of the circuit element switch that the fuse controls. Defaults to the MonitoredObj.
Number of the terminal of the controlled element containing the switch controlled by the fuse.
Name of the TCCcurve object that determines fuse blowing.
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2023 Paulo Meira Copyright (c) 2023 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
First bus name of GICSource (Created name)
Second bus name
Number of objects of this type
Eastward E Field, V/km
Northward E Field V/km
Sets the first object of this type active. Returns 0 if none.
Latitude of Bus1 (degrees)
Latitude of Bus2 (degrees)
Longitude of Bus1 (Degrees)
Longitude of Bus2 (Degrees)
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Number of Phases, this GICSource element.
Specify dc voltage directly
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
Bus to which the Generator is connected. May include specific node specification.
(API Extension)
An arbitrary integer number representing the class of Generator so that Generator values may be segregated by class.
(API Extension)
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Indicates whether the generator is forced ON regardles of other dispatch criteria.
Generator connection. True/1 if delta connection, False/0 if wye.
(API Extension)
Generator Model
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Power factor (pos. = producing vars). Updates kvar based on present kW value.
Number of phases
Array of Names of all generator energy meter registers
Array of valus in generator energy meter registers.
Response to dispatch multipliers: Fixed=1 (dispatch multipliers do not apply), Variable=0 (follows curves).
Related enumeration: GeneratorStatus
(API Extension)
Vmaxpu for generator model
Vminpu for Generator model
Name of yearly loadshape
(API Extension)
Name of the loadshape for a daily generation profile.
(API Extension)
Name of the loadshape for a duty cycle simulation.
(API Extension)
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
Voltage base for the active generator, kV
kVA rating of the generator
kW output for the active generator. kvar is updated for current power factor.
kVA rating of electrical machine. Applied to machine or inverter definition for Dynamics mode solutions.
(API Extension)
kvar output for the active generator. Updates power factor based on present kW value.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
Magnitude of the ISource in amps
Phase angle for ISource, degrees
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
The present frequency of the ISource, Hz
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
Zero-sequence capacitance, nF per unit length
Positive-sequence capacitance, nF per unit length
Capacitance matrix, nF per unit length
Number of objects of this type
Emergency ampere rating
Sets the first object of this type active. Returns 0 if none.
Flag denoting whether impedance data were entered in symmetrical components
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Normal Ampere rating
Number of Phases
Zero-Sequence Resistance, ohms per unit length
Positive-sequence resistance ohms per unit length
Resistance matrix, ohms per unit length
Zero Sequence Reactance, Ohms per unit length
Posiive-sequence reactance, ohms per unit length
Reactance matrix, ohms per unit length
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
LineGeometry objects
(API Extension)
Capacitance matrix, nF
ndarray
[Any
, dtype
[float64
]]
Resistance matrix, ohms
ndarray
[Any
, dtype
[float64
]]
Reactance matrix, ohms
ndarray
[Any
, dtype
[float64
]]
Complex impedance matrix, ohms
Union
[ndarray
[Any
, dtype
[float64
]], ndarray
[Any
, dtype
[complex128
]]]
Array of all names of this object type
Array of strings with names of all conductors in the active LineGeometry object
Number of objects of this type
Emergency ampere rating
Sets the first object of this type active. Returns 0 if none.
Gets the current name or sets the active object of this type by name
Number of conductors in this geometry. Default is 3. Triggers memory allocations. Define first!
Sets next object of this type active. Returns 0 if no more.
Normal ampere rating
Number of Phases
Get/Set the X (horizontal) coordinates of the conductors
Get/Set the Y (vertical/height) coordinates of the conductors
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
LineSpacing objects
(API Extension)
Array of all names of this object type
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Number of Phases
Get/Set the X (horizontal) coordinates of the conductors
Get/Set the Y (vertical/height) coordinates of the conductors
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
Name of bus for terminal 1.
Name of bus for terminal 2.
Zero Sequence capacitance, nanofarads per unit length.
Positive Sequence capacitance, nanofarads per unit length.
Number of objects of this type
Emergency (maximum) ampere rating of Line.
Sets the first object of this type active. Returns 0 if none.
Line geometry code
Sets/gets the Line element switch status. Setting it has side-effects to the line parameters.
(API Extension)
Length of line section in units compatible with the LineCode definition.
Name of LineCode object that defines the impedances.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Normal ampere rating of Line.
Number of customers on this line section.
Sets Parent of the active Line to be the active line. Returns 0 if no parent or action fails.
Number of Phases, this Line element.
Zero Sequence resistance, ohms per unit length.
Positive Sequence resistance, ohms per unit length.
Earth return resistance value used to compute line impedances at power frequency
Earth Resistivity, m-ohms
Resistance matrix (full), ohms per unit length. Array of doubles.
Delivers the rating for the current season (in Amps) if the “SeasonalRatings” option is active
Line spacing code
Total Number of customers served from this line section.
Zero Sequence reactance ohms per unit length.
Positive Sequence reactance, ohms per unit length.
Earth return reactance value used to compute line impedances at power frequency
Reactance matrix (full), ohms per unit length. Array of doubles.
Yprimitive for the active line object (complex array).
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Iterable
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)
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)
Array of all names of this object type
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Fixed interval time value, hours.
Fixed Interval time value, in minutes
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Get/set Number of points in active Loadshape.
Array of doubles for the P multiplier in the Loadshape.
Base for normalizing Q curve. If left at zero, the peak value is used.
Base for normalizing Q curve. If left at zero, the peak value is used.
Array of doubles containing the Q multipliers.
Time array in hours correscponding to P and Q multipliers when the Interval=0.
Boolean flag to let Loads know to use the actual value in the curve rather than use the value as a multiplier.
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
Factor for allocating loads by connected xfkva
Name of a loadshape with both Mult and Qmult, for CVR factors as a function of time.
Percent reduction in Q for percent reduction in V. Must be used with dssLoadModelCVR.
Percent reduction in P for percent reduction in V. Must be used with dssLoadModelCVR.
Factor relates average to peak kw. Used for allocation with kwh and kwhdays
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Name of the growthshape curve for yearly load growth factors.
Delta loads are connected line-to-line.
The Load Model defines variation of P and Q with voltage.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Number of customers in this load, defaults to one.
Get or set Power Factor for Active Load. Specify leading PF as negative. Updates kvar based on present value of kW
Average percent of nominal load in Monte Carlo studies; only if no loadshape defined for this load.
Percent standard deviation for Monte Carlo load studies; if there is no loadshape assigned to this load.
Number of phases
(API Extension)
Relative Weighting factor for the active LOAD
Neutral resistance for wye-connected loads.
Name of the sensor monitoring this load.
Name of harmonic current spectrrum shape.
Response to load multipliers: Fixed (growth only), Exempt (no LD curve), Variable (all).
Maximum per-unit voltage to use the load model. Above this, constant Z applies.
Minimum voltage for unserved energy (UE) evaluation.
Minimum voltage for energy exceeding normal (EEN) evaluations.
Minimum voltage to apply the load model. Below this, constant Z is used.
Neutral reactance for wye-connected loads.
Name of yearly duration loadshape
Array of 7 doubles with values for ZIPV property of the load object
Name of the loadshape for a daily load profile.
Name of the loadshape for a duty cycle simulation.
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
Set kV rating for active Load. For 2 or more phases set Line-Line kV. Else actual kV across terminals.
Set kW for active Load. Updates kvar based on present PF.
Base load kva. Also defined kw and kvar or pf input, or load allocation by kwh or xfkva.
Get/set kvar for active Load. If set, updates PF based on present kW.
kwh billed for this period. Can be used with Cfactor for load allocation.
Length of kwh billing period for average demand calculation. Default 30.
Percent of Load that is modeled as series R-L for harmonics studies
Rated service transformer kVA for load allocation, using AllocationFactor. Affects kW, kvar, and pf.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Wide string list of all branches in zone of the active energymeter object.
Array of names of all zone end elements.
Array of all names of this object type
Array of doubles: set the phase allocation factors for the active meter.
Average Repair time in this section of the meter zone
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
Number of objects of this type
Number of branches in Active energymeter zone. (Same as sequencelist size)
Number of zone end elements in the active meter zone.
Total customer interruptions for this Meter zone based on reliability calcs.
Global Flag in the DSS to indicate if Demand Interval (DI) files have been properly opened.
Sum of Fault Rate time Repair Hrs in this section of the meter zone
Sets the first object of this type active. Returns 0 if none.
Set Name of metered element
set Number of Metered Terminal
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Number of branches (lines) in this section
Number of Customers in the active section.
Number of feeder sections in this meter’s zone
Type of OCP device. 1=Fuse; 2=Recloser; 3=Relay
Array of doubles to set values of Peak Current property
Array of strings containing the names of the registers.
Array of all the values contained in the Meter registers for the active Meter.
SAIDI for this meter’s zone. Execute DoReliabilityCalc first.
Returns SAIFI for this meter’s Zone. Execute Reliability Calc method first.
SAIFI based on kW rather than number of customers. Get after reliability calcs.
SequenceIndex of the branch at the head of this section
Total Customers downline from this section
Size of Sequence List
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.
Sum of the branch fault rates in this section of the meter’s zone
Total Number of customers in this zone (downline from the EnergyMeter)
Totals of all registers of all meters
Returns the list of all PCE within the area covered by the energy meter
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
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.
ndarray
[Any
, dtype
[float64
]]
(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.
ndarray
[Any
, dtype
[float64
]]
Array of all names of this object type
Byte Array containing monitor stream values. Make sure a “save” is done first (standard solution modes do this automatically)
Number of objects of this type
Full object name of element being monitored.
Name of CSV file associated with active Monitor.
Monitor File Version (integer)
Sets the first object of this type active. Returns 0 if none.
Header string; Array of strings containing Channel names
Set Monitor mode (bitmask integer - see DSS Help)
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Number of Channels in the active Monitor
Size of each record in ByteStream (Integer). Same as NumChannels.
Number of Samples in Monitor at Present
Terminal number of element being monitored.
Array of doubles containing frequency values for harmonics mode solutions; Empty for time mode solutions (use dblHour)
Array of doubles containing time value in hours for time-sampled monitor values; Empty if frequency-sampled values for harmonics solution (see dblFreq)
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Base
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)
ndarray
[Any
, dtype
[float64
]]
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)
ndarray
[Any
, dtype
[float64
]]
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)
ndarray
[Any
, dtype
[float64
]]
accummulated failure rate for this branch on downline
Complex double array of Sequence Currents for all conductors of all terminals, for each PD elements.
(API Extension)
Complex array of currents for all conductors, all terminals, for each PD element.
(API Extension)
Complex array (magnitude and angle format) of currents for all conductors, all terminals, for each PD element.
(API Extension)
Array of strings consisting of all PD element names.
(API Extension)
Integer array listing the number of conductors of all PD elements
(API Extension)
Integer array listing the number of phases of all PD elements
(API Extension)
Integer array listing the number of terminals of all PD elements
(API Extension)
Complex array of powers into each conductor of each terminal, for each PD element.
(API Extension)
Double array of the symmetrical component currents (magnitudes only) into each 3-phase terminal, for each PD element.
(API Extension)
Complex array of sequence powers into each 3-phase teminal, for each PD element
(API Extension)
Number of PD elements (including disabled elements)
Get/Set Number of failures per year. For LINE elements: Number of failures per unit length per year.
(read-only) Set the first enabled PD element to be the active element. Returns 0 if none found.
(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.
(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.
Failure rate for this branch. Faults per year including length of line.
Get/Set name of active PD Element. Returns null string if active element is not PDElement type.
(read-only) Advance to the next PD element in the circuit. Enabled elements only. Returns 0 when no more elements.
Number of customers, this branch
(read-only) Sets the parent PD element to be the active circuit element. Returns 0 if no more elements upline.
Average repair time for this element in hours
Integer ID of the feeder section that this PDElement branch is part of
Total miles of line from this element to the end of the zone. For recloser siting algorithm.
Total number of customers from this branch to the end of the zone
Get/Set percent of faults that are permanent (require repair). Otherwise, fault is assumed to be transient/temporary.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Get/set the present value of the Irradiance property in kW/m²
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.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Get/set the power factor for the active PVSystem
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.
Array of PVSYSTEM energy meter register names
Array of doubles containing values in PVSystem registers.
Name of the sensor monitoring this element.
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)
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)
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)
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)
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)
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
Get/set Rated kVA of the PVSystem
Get kW output
Get/set kvar output value
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)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Base
Parallel machine interface
Gets/sets the ID of the Active Actor
(read) Sets ON/OFF (1/0) Parallel features of the Engine (write) Delivers if the Parallel features of the Engine are Active
Gets/sets the CPU of the Active Actor
Gets the progress of all existing actors in pct
Gets the status of each actor
(read) Reads the values of the ConcatenateReports option (1=enabled, 0=disabled) (write) Enable/Disable (1/0) the ConcatenateReports option for extracting monitors data
Delivers the number of CPUs on the current PC
Delivers the number of Cores of the local PC
Gets the number of Actors created
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Base
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.
ndarray
[Any
, dtype
[float64
]]
Use this property to parse a matrix token specified in lower triangle form. Symmetry is forced.
ndarray
[Any
, dtype
[float64
]]
Returns token as array of doubles. For parsing quoted array syntax.
ndarray
[Any
, dtype
[float64
]]
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.
Get/Set String containing the the characters for Quoting in OpenDSS scripts. Matching pairs defined in EndQuote. Default is “’([{.
String to be parsed. Loading this string resets the Parser to the beginning of the line. Then parse off the tokens in sequence.
Return next parameter as a double.
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.
String containing characters, in order, that match the beginning quote characters in BeginQuote. Default is “’)]}
Return next parameter as a long integer.
Get next token and return tag name (before = sign) if any. See AutoIncrement.
Return next parameter as a string
Get/set the characters used for White space in the command string. Default is blank and Tab.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Reactor objects
(API Extension)
Array of all names of this object type
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.
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
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Delta connection or wye?
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.
Inductance, mH. Alternate way to define the reactance, X, property.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Indicates whether Rmatrix and Xmatrix are to be considered in parallel.
Number of phases.
Resistance (in series with reactance), each phase, ohms. This property applies to REACTOR specified by either kvar or X. See also help on Z.
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.
Resistance matrix, ohms at base frequency. Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X.
Resistance in parallel with R and X (the entire branch). Assumed infinite if not specified.
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.
Reactance, each phase, ohms at base frequency. See also help on Z and LmH properties.
Reactance matrix, ohms at base frequency. Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X.
Alternative way of defining R and X properties. Enter a 2-element array representing R +jX in ohms.
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.
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.
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.
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
For 2, 3-phase, kV phase-phase. Otherwise specify actual coil rating.
Total kvar, all phases. Evenly divided among phases. Only determines X. Specify R separately
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Reset recloser to normal state. If open, lock out the recloser. If closed, resets recloser to first operation.
Array of all names of this object type
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Ground (3I0) instantaneous trip setting - curve multipler or actual amps.
Ground (3I0) trip multiplier or actual amps
Full name of object this Recloser to be monitored.
Terminal number of Monitored object for the Recloser
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Get/set normal state (ActionCodes.Open=1, ActionCodes.Close=2) of the recloser.
Number of fast shots
Phase instantaneous curve multipler or actual amps
Phase trip curve multiplier or actual amps
Array of Doubles: reclose intervals, s, between shots.
Number of shots to lockout (fast + delayed)
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.
Full name of the circuit element that is being switched by the Recloser.
Terminal number of the controlled device being switched by the Recloser
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2019-2020 Paulo Meira
Bases: Base
Circuit Reduction interface
Reduce Dangling Algorithm; branches with nothing connected
Do Default Reduction algorithm
Do ShortLines algorithm: Set Zmag first if you don’t want the default
Save present (reduced) circuit Filename is listed in the Text Result interface
Edit String for RemoveBranches functions
Name of Energymeter to use for reduction
Keep load flag (T/F) for Reduction options that remove branches
Start element for Remove Branch function
Zmag (ohms) for Reduce Option for Z of short lines
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
CT primary ampere rating (secondary is 0.2 amperes)
Number of objects of this type
Time delay [s] after arming before the first tap change. Control may reset before actually changing taps.
Sets the first object of this type active. Returns 0 if none.
Regulation bandwidth in forward direciton, centered on Vreg
LDC R setting in Volts
Target voltage in the forward direction, on PT secondary base.
LDC X setting in Volts
Time delay is inversely adjsuted, proportinal to the amount of voltage outside the regulating band.
Regulator can use different settings in the reverse direction. Usually not applicable to substation transformers.
Maximum tap change per iteration in STATIC solution mode. 1 is more realistic, 16 is the default for a faster soluiton.
Name of a remote regulated bus, in lieu of LDC settings
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
PT ratio for voltage control settings
Bandwidth in reverse direction, centered on reverse Vreg.
Reverse LDC R setting in Volts.
Target voltage in the revese direction, on PT secondary base.
Reverse LDC X setting in volts.
Time delay [s] for subsequent tap changes in a set. Control may reset before actually changing taps.
Integer number of the tap that the controlled transformer winding is currentliy on.
Tapped winding number
Name of the transformer this regulator controls
First house voltage limit on PT secondary base. Setting to 0 disables this function.
Winding number for PT and CT connections
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Close the switched object controlled by the relay. Resets relay to first operation.
Open relay’s controlled element and lock out the relay.
Reset relay to normal state. If open, lock out the relay. If closed, resets relay to first operation.
Array of all names of this object type
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Full name of object this Relay is monitoring.
Number of terminal of monitored element that this Relay is monitoring.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Normal state of relay.
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.
Full name of element that will be switched when relay trips.
Terminal number of the switched object that will be opened when the relay trips.
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
Array of doubles for the allocation factors for each phase.
Number of objects of this type
Array of doubles for the line current measurements; don’t use with kWS and kVARS.
Sets the first object of this type active. Returns 0 if none.
True if measured voltages are line-line. Currents are always line currents.
Full Name of the measured element
Number of the measured terminal in the measured element.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Assumed percent error in the Sensor measurement. Default is 1.
True if voltage measurements are 1-3, 3-2, 2-1.
Weighting factor for this Sensor measurement with respect to other Sensors. Default is 1.
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
Array of doubles for Q measurements. Overwrites Currents with a new estimate using kWS.
Array of doubles for the LL or LN (depending on Delta connection) voltage measurements.
Voltage base for the sensor measurements. LL for 2 and 3-phase sensors, LN for 1-phase sensors.
Array of doubles for P measurements. Overwrites Currents with a new estimate using kVARS.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Base
(write-only) Sets all load allocation factors for all loads defined by XFKVA property to this value.
{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.
List of Buses or (File=xxxx) syntax for the AutoAdd solution mode.
{dssMultiphase (0) * | dssPositiveSeq (1) } Indicate if the circuit model is positive sequence.
{True | False*} Denotes whether to trace the control actions to a file.
Per Unit maximum voltage for Emergency conditions.
Per Unit minimum voltage for Emergency conditions.
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)
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)
Integer array defining which energy meter registers to use for computing losses
Weighting factor applied to Loss register values.
Per Unit maximum voltage for Normal conditions.
Per Unit minimum voltage for Normal conditions.
Name of LoadShape object that serves as the source of price signal data for yearly simulations, etc.
Price Signal for the Circuit
Gets value of trapezoidal integration flag in energy meters. Defaults to False.
Array of Integers defining energy meter registers to use for computing UE
Weighting factor applied to UE register values.
Array of doubles defining the legal voltage bases in kV L-L
{True | False*} Locks Zones on energy meters to prevent rebuilding if a circuit change occurs.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Base
Type of device to add in AutoAdd Mode: {dssGen (Default) | dssCap}
Base Solution algorithm: {dssNormalSolve | dssNewtonSolve}
Capacitor kvar for adding capacitors in AutoAdd mode
Flag indicating the control actions are done.
Value of the control iteration counter
{dssStatic* | dssEvent | dssTime} Modes for control devices
Flag to indicate whether the circuit solution converged
Default daily load shape (defaults to “Default”)
Default Yearly load shape (defaults to “Default”)
Array of strings containing the Event Log
Set the Frequency for next solution
Default Multiplier applied to generators (like LoadMult)
PF for generators in AutoAdd mode
Generator kW for AutoAdd mode
Set Hour for time series solutions.
Get/Set the Solution.IntervalHrs variable used for devices that integrate / custom solution algorithms
Number of iterations taken for last solution. (Same as Totaliterations)
Load-Duration Curve name for LD modes
Load Model: {dssPowerFlow (default) | dssAdmittance}
Default load multiplier applied to all non-fixed loads
Maximum allowable control iterations
Max allowable iterations.
Minimum number of iterations required for a power flow solution.
Set present solution mode
ID (text) of the present solution mode
Max number of iterations required to converge at any control iteration of the most recent solution.
Number of solutions to perform for Monte Carlo and time series simulations
Gets the time required to perform the latest solution (Read only)
Randomization mode for random variables “Gaussian” or “Uniform”
Seconds from top of the hour.
Time step size in sec
(write-only) Set Stepsize in Hr
(write-only) Set Stepsize in minutes
Flag that indicates if elements of the System Y have been changed by recent activity.
Get the solution process time + sample time for time step
Solution convergence tolerance.
Gets/sets the accumulated time of the simulation
Total iterations including control iterations for most recent solution.
Set year for planning studies
Hour as a double, including fractional part
Percent default annual load growth rate
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2023 Paulo Meira Copyright (c) 2023 DSS-Extensions contributors
Bases: Iterable
Storage objects
Array of all names of this object type
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Array of Names of all Storage energy meter registers
Array of values in Storage registers.
Get/set state: 0=Idling; 1=Discharging; -1=Charging;
Related enumeration: StorageStates
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
Per unit state of charge
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Open or Close the switch. No effect if switch is locked. However, Reset removes any lock and then closes the switch (shelf state).
Array of all names of this object type
Number of objects of this type
Time delay [s] betwen arming and opening or closing the switch. Control may reset before actually operating the switch.
Sets the first object of this type active. Returns 0 if none.
The lock prevents both manual and automatic switch operation.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Get/set Normal state of switch (see actioncodes) dssActionOpen or dssActionClose
Set it to force the switch to a specified state, otherwise read its present state.
Full name of the switched element.
Terminal number where the switch is located on the SwitchedObj
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Iterable
TSData objects
(API Extension)
Array of all names of this object type
Number of objects of this type
Emergency ampere rating
Sets the first object of this type active. Returns 0 if none.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Normal Ampere rating
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Base
Returns index of the active branch
Topological depth of the active branch
Array of all isolated branch names.
Array of all isolated load names.
Array of all looped element names, by pairs.
Move back toward the source, return index of new active branch, or 0 if no more.
Name of the active branch.
Set the active branch to one containing this bus, return index or 0 if not found
Sets the first branch active, returns 0 if none.
First load at the active branch, return index or 0 if none.
Move forward in the tree, return index of new active branch or 0 if no more
Move to looped branch, return index or 0 if none.
Sets the next branch active, returns 0 if no more.
Next load at the active branch, return index or 0 if no more.
Number of isolated branches (PD elements and capacitors).
Number of isolated loads
Number of loops
Move to directly parallel branch, return index or 0 if none.
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
Complex array with the losses by type (total losses, load losses, no-load losses), in VA, concatenated for ALL transformers
(API Extension)
Array of all names of this object type
Transformer Core Type: 0=Shell; 1=1ph; 3-3leg; 4=4-Leg; 5=5-leg; 9=Core-1-phase
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Active Winding delta or wye connection?
Complex array with the losses by type (total losses, load losses, no-load losses), in VA
(API Extension)
Active Winding maximum tap in per-unit.
Active Winding minimum tap in per-unit.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Active Winding number of tap steps betwein MinTap and MaxTap.
Number of windings on this transformer. Allocates memory; set or change this property first.
Active Winding resistance in %
dc Resistance of active winding in ohms for GIC analysis
Active Winding neutral resistance [ohms] for wye connections. Set less than zero for ungrounded wye.
Active Winding tap in per-unit.
Active Winding Number from 1..NumWindings. Update this before reading or setting a sequence of winding properties (R, Tap, kV, kVA, etc.)
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 https://github.com/dss-extensions/dss-extensions/issues/24
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 https://github.com/dss-extensions/dss-extensions/issues/24
Name of an XfrmCode that supplies electircal parameters for this Transformer.
Percent reactance between windings 1 and 2, on winding 1 kVA base. Use for 2-winding or 3-winding transformers.
Percent reactance between windigns 1 and 3, on winding 1 kVA base. Use for 3-winding transformers only.
Percent reactance between windings 2 and 3, on winding 1 kVA base. Use for 3-winding transformers only.
Active Winding neutral reactance [ohms] for wye connections.
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
Active Winding kV rating. Phase-phase for 2 or 3 phases, actual winding kV for 1 phase transformer.
Active Winding kVA rating. On winding 1, this also determines normal and emergency current ratings for all windings.
Active Winding kVA rating. On winding 1, this also determines normal and emergency current ratings for all windings.
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 https://github.com/dss-extensions/dss-extensions/issues/24
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
Phase angle of first phase in degrees
Source voltage in kV
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Source frequency in Hz
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Number of phases
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
Per-unit value of source voltage
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Iterable
WireData objects
(API Extension)
Array of all names of this object type
Equivalent conductor radius for capacitance calcs. Specify this for bundled conductors. Defaults to same value as radius.
Number of objects of this type
Emergency ampere rating
Sets the first object of this type active. Returns 0 if none.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Normal Ampere rating
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2022 Paulo Meira
Copyright (c) 2018-2022 DSS-Extensions contributors
Bases: Iterable
Array of all names of this object type
Number of objects of this type
Sets the first object of this type active. Returns 0 if none.
Gets the current name or sets the active object of this type by name
Sets next object of this type active. Returns 0 if no more.
Get/Set Number of points in X-Y curve
Get/set X values as a Array of doubles. Set Npts to max number expected if setting
Factor to scale X values from original curve
Amount to shift X value from original curve
Get/Set Y values in curve; Set Npts to max number expected if setting
Factor to scale Y values from original curve
Amount to shift Y value from original curve
Gets the current index or sets the active object of this type by index
While the official API included this for some classes, this is an API Extension for:
Capacitors
CapControls
ISources
LineCodes
Lines
LoadShapes
Meters
Monitors
RegControls
Sensors
SwtControls
Transformers
Vsources
XYCurves
(API Extension)
Set X value or get interpolated value after setting Y
Set Y value or get interpolated Y value after setting X
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2023 Paulo Meira
Copyright (c) 2018-2023 DSS-Extensions contributors
Bases: Base
bool
Return as (data, indices, indptr) that can fed into scipy.sparse.csc_matrix
Tuple
[ndarray
[Any
, dtype
[complex128
]], ndarray
[Any
, dtype
[int32
]], ndarray
[Any
, dtype
[int32
]]]
Get access to the internal Current pointer
Get access to the internal Voltage pointer
int
Get the data from the internal Current pointer
List
[float
]
Get the data from the internal Voltage pointer
List
[float
]
Return as (data, indices, indptr) that can fed into scipy.sparse.csc_matrix
Tuple
[ndarray
[Any
, dtype
[complex128
]], ndarray
[Any
, dtype
[int32
]], ndarray
[Any
, dtype
[int32
]]]
Sparse solver options. See the enumeration SparseSolverOptions
DSS-Python provides a compatibility layer for DSS_CAPI that mimics the official OpenDSS COM interface, with various extensions and quality-of-life tweaks.
dss
is the main package for DSS-Python. DSS-Python is a compatibility layer for the DSS C-API library that mimics the official OpenDSS COM interface, with many extensions and a few limitations.
This module used to provide instances for the OpenDSS Version 7 implementation. As of 2022, most of the parallel-machine functions of EPRI’s OpenDSS have been reimplemented using a different approach. Therefore the PM functions are available in the instances of this module too. Besides the parallel-machine mechanisms, DSS-Python also exposes the DSSContext mechanism provided by DSS-Extensions. DSSContexts allow using multiple OpenDSS instances directly, including user-managed multi-threading, without using the internal OpenDSS actors.
Starting April 2023, our CFFI extension modules and DSS C-API binaries moved to dss_python_backend and are justed consumed here.
Bases: Exception
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
Bases: object
Edit is a helper class that makes block-editing DSS properties easier. It supports instances for the new Obj and Batch APIs.
This function is provided to allow easier migration from win32com.client.
When used with late bindings, win32com allows using mixed-case names for any of the COM-related items. When migrating or testing with DSS-Python, users can then use this function to continue using the same code, optionally emitting warnings when the canonical casing is different from the one used. Note that there is a small overhead for allowing case-insensitive names, thus is not recommended to continue using it after migration/adjustments to the user code.
GR (Global Result) interface using the new DSSContext API
API utility functions and low-level access to the classic API
API utility functions and low-level access for DSSContext API