dss.IRelays#

Module Contents#

Classes#

IRelays

API#

class dss.IRelays.IRelays(api_util)#

Bases: dss._cffi_api_util.Iterable

property AllNames: List[str]#

Array of all names of this object type

Close()#

Close the switched object controlled by the relay. Resets relay to first operation.

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

property Count: int#

Number of objects of this type

property First: int#

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

property MonitoredObj: str#

Full name of object this Relay is monitoring.

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

property MonitoredTerm: int#

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

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

property Name: str#

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

property Next: int#

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

property NormalState: int#

Normal state of relay.

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

Open()#

Open relay’s controlled element and lock out the relay.

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

Reset()#

Reset relay to normal state. If open, lock out the relay. If closed, resets relay to first operation.

property State: int#

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.

property SwitchedObj: str#

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

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

property SwitchedTerm: int#

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

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

__init__(api_util)#
__iter__() Iterator[dss._cffi_api_util.Iterable]#

Get an iterator of the object collection.

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

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

(API Extension)

__len__() int#
property idx: int#

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)