altdss.RegControl
#
Module Contents#
Classes#
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
|
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
API#
- class altdss.RegControl.IRegControl(iobj)#
Bases:
altdss.DSSObj.IDSSObj
,altdss.RegControl.RegControlBatch
- Band: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Bandwidth in VOLTS for the controlled bus (see help for ptratio property). Default is 3.0
DSS property name:
Band
, DSS property index: 4.
- BaseFreq: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Base Frequency for ratings.
DSS property name:
BaseFreq
, DSS property index: 33.
- Bus: List[str]#
‘property(…)’
Name of a bus (busname.nodename) in the system to use as the controlled bus instead of the bus to which the transformer winding is connected or the R and X line drop compensator settings. Do not specify this value if you wish to use the line drop compensator settings. Default is null string. Assumes the base voltage for this bus is the same as the transformer winding base specified above. Note: This bus (1-phase) WILL BE CREATED by the regulator control upon SOLVE if not defined by some other device. You can specify the node of the bus you wish to sample (defaults to 1). If specified, the RegControl is redefined as a 1-phase device since only one voltage is used.
DSS property name:
Bus
, DSS property index: 9.
- CTPrim: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Rating, in Amperes, of the primary CT rating for which the line amps convert to control rated amps.The typical default secondary ampere rating is 0.2 Amps (check with manufacturer specs). Current at which the LDC voltages match the R and X settings.
DSS property name:
CTPrim
, DSS property index: 6.
- Cogen: List[bool]#
‘property(…)’
{Yes|No*} Default is No. The Cogen feature is activated. Continues looking forward if power reverses, but switches to reverse-mode LDC, vreg and band values.
DSS property name:
Cogen
, DSS property index: 32.
- ComplexSeqCurrents() altdss.types.ComplexArray #
Complex double array of Sequence Currents for all conductors of all terminals of active circuit element.
Original COM help: https://opendss.epri.com/CplxSeqCurrents.html
- ComplexSeqVoltages() altdss.types.ComplexArray #
Complex double array of Sequence Voltage for all terminals of active circuit element.
Original COM help: https://opendss.epri.com/CplxSeqVoltages1.html
- Currents() altdss.types.ComplexArray #
Complex array of currents into each conductor of each terminal
Original COM help: https://opendss.epri.com/Currents1.html
- CurrentsMagAng() altdss.types.Float64Array #
Currents in magnitude, angle (degrees) format as a array of doubles.
Original COM help: https://opendss.epri.com/CurrentsMagAng.html
- DebugTrace: List[bool]#
‘property(…)’
{Yes | No* } Default is no. Turn this on to capture the progress of the regulator model for each control iteration. Creates a separate file for each RegControl named “REG_name.csv”.
DSS property name:
DebugTrace
, DSS property index: 17.
- Delay: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Time delay, in seconds, from when the voltage goes out of band to when the tap changing begins. This is used to determine which regulator control will act first. Default is 15. You may specify any floating point number to achieve a model of whatever condition is necessary.
DSS property name:
Delay
, DSS property index: 10.
- Enabled: List[bool]#
‘property(…)’
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name:
Enabled
, DSS property index: 34.
- EventLog: List[bool]#
‘property(…)’
{Yes/True | No/False*} Default is NO for regulator control. Log control actions to Eventlog.
DSS property name:
EventLog
, DSS property index: 26.
- FullName() List[str] #
Returns the full name (including object type) for all objects in this batch
- GUID() List[str] #
GUID/UUID for each object. Currently used only in the CIM-related methods.
Original COM help: https://opendss.epri.com/GUID.html
- Handle() altdss.types.Int32Array #
Index of each element into the circuit’s element list.
Original COM help: https://opendss.epri.com/Handle.html
- HasOCPDevice() altdss.types.BoolArray #
For each element in the batch: returns true if a recloser, relay, or fuse controlling the circuit element.
OCP = Overcurrent Protection
Original COM help: https://opendss.epri.com/HasOCPDevice.html
- HasSwitchControl() altdss.types.BoolArray #
For each element in the batch: returns true if the element has a SwtControl attached.
Original COM help: https://opendss.epri.com/HasSwitchControl.html
- HasVoltControl() altdss.types.BoolArray #
For each element in the batch: returns true if the element has a CapControl or RegControl attached.
Original COM help: https://opendss.epri.com/HasVoltControl.html
- InverseTime: List[bool]#
‘property(…)’
{Yes | No* } Default is no. The time delay is adjusted inversely proportional to the amount the voltage is outside the band down to 10%.
DSS property name:
InverseTime
, DSS property index: 19.
- IsIsolated() altdss.types.BoolArray #
For each element in the batch: returns true if the element is isolated. Note that this only fetches the current value. See also the Topology interface.
- LDC_Z: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Z value for Beckwith LDC_Z control option. Volts adjustment at rated control current.
DSS property name:
LDC_Z
, DSS property index: 30.
- Like(value: AnyStr, flags: altdss.enums.SetterFlags = 0)#
Make like another object, e.g.:
New Capacitor.C2 like=c1 …
DSS property name:
Like
, DSS property index: 35.
- Losses() altdss.types.ComplexArray #
For each element in the batch: total losses in the element, in VA (watts, vars).
Original COM help: https://opendss.epri.com/Losses1.html
- MaxCurrent(terminal: int) altdss.types.Float64Array #
Returns the maximum current (magnitude) at the specified terminal for each element in this batch. Use -1 as terminal to get the value across all terminals.
- MaxTapChange: altdss.ArrayProxy.BatchInt32ArrayProxy#
‘property(…)’
Maximum allowable tap change per control iteration in STATIC control mode. Default is 16.
Set this to 1 to better approximate actual control action.
Set this to 0 to fix the tap in the current position.
DSS property name:
MaxTapChange
, DSS property index: 18.
- property Name: List[str]#
- NumConductors() altdss.types.Int32Array #
Number of conductors per terminal for each element in the batch.
Original COM help: https://opendss.epri.com/NumConductors.html
- NumControllers() altdss.types.Int32Array #
Number of controllers connected to each device in the batch.
Original COM help: https://opendss.epri.com/NumControls.html
- NumPhases() altdss.types.Int32Array #
Number of Phases for each element in this batch.
Original COM help: https://opendss.epri.com/NumPhases.html
- NumTerminals() altdss.types.Int32Array #
Number of terminals for each Circuit Element in the batch.
Original COM help: https://opendss.epri.com/NumTerminals.html
- OCPDevice() List[Union[altdss.DSSObj.DSSObj, None]] #
Returns (as a list of Python objects) the OCP device controlling each element.
- OCPDeviceIndex() altdss.types.Int32Array #
For each element in the batch: index into each controller list of the OCP Device controlling each circuit element
Original COM help: https://opendss.epri.com/OCPDevIndex.html
- OCPDeviceType() List[dss.enums.OCPDevType] #
For each element in the batch: type of OCP controller device
Original COM help: https://opendss.epri.com/OCPDevType.html
- PTPhase: altdss.ArrayProxy.BatchInt32ArrayProxy#
‘property(…)’
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. Default=1. Must be less than or equal to the number of phases. Ignored for regulated bus.
DSS property name:
PTPhase
, DSS property index: 22.
- PTPhase_str: List[str]#
‘property(…)’
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. Default=1. Must be less than or equal to the number of phases. Ignored for regulated bus.
DSS property name:
PTPhase
, DSS property index: 22.
- PTRatio: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Ratio of the PT that converts the controlled winding voltage to the regulator control voltage. Default is 60. If the winding is Wye, the line-to-neutral voltage is used. Else, the line-to-line voltage is used. SIDE EFFECT: Also sets RemotePTRatio property.
DSS property name:
PTRatio
, DSS property index: 5.
- PhaseLosses() altdss.types.ComplexArray #
Complex array of losses (kVA) by phase
Original COM help: https://opendss.epri.com/PhaseLosses.html
- Powers() altdss.types.ComplexArray #
Complex array of powers (kVA) into each conductor of each terminal, of each element in the batch.
Original COM help: https://opendss.epri.com/Powers.html
- R: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
R setting on the line drop compensator in the regulator, expressed in VOLTS.
DSS property name:
R
, DSS property index: 7.
- RemotePTRatio: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
When regulating a bus (the Bus= property is set), the PT ratio required to convert actual voltage at the remote bus to control voltage. Is initialized to PTratio property. Set this property after setting PTratio.
DSS property name:
RemotePTRatio
, DSS property index: 27.
- Reset(value: Union[bool, List[bool]] = True, flags: altdss.enums.SetterFlags = 0)#
{Yes | No} If Yes, forces Reset of this RegControl.
DSS property name:
Reset
, DSS property index: 29.
- RevBand: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Bandwidth for operating in the reverse direction.
DSS property name:
RevBand
, DSS property index: 13.
- RevDelay: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Time Delay in seconds (s) for executing the reversing action once the threshold for reversing has been exceeded. Default is 60 s.
DSS property name:
RevDelay
, DSS property index: 24.
- RevNeutral: List[bool]#
‘property(…)’
{Yes | No*} Default is no. Set this to Yes if you want the regulator to go to neutral in the reverse direction or in cogen operation.
DSS property name:
RevNeutral
, DSS property index: 25.
- RevR: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
R line drop compensator setting for reverse direction.
DSS property name:
RevR
, DSS property index: 14.
- RevThreshold: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
kW reverse power threshold for reversing the direction of the regulator. Default is 100.0 kw.
DSS property name:
RevThreshold
, DSS property index: 23.
- RevVReg: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Voltage setting in volts for operation in the reverse direction.
DSS property name:
RevVReg
, DSS property index: 12.
- RevX: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
X line drop compensator setting for reverse direction.
DSS property name:
RevX
, DSS property index: 15.
- Rev_Z: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Reverse Z value for Beckwith LDC_Z control option.
DSS property name:
Rev_Z
, DSS property index: 31.
- Reversible: List[bool]#
‘property(…)’
{Yes |No*} Indicates whether or not the regulator can be switched to regulate in the reverse direction. Default is No.Typically applies only to line regulators and not to LTC on a substation transformer.
DSS property name:
Reversible
, DSS property index: 11.
- SeqCurrents() altdss.types.Float64Array #
Array of symmetrical component currents (magnitudes only) into each 3-phase terminal of each element
Original COM help: https://opendss.epri.com/SeqCurrents.html
- SeqPowers() altdss.types.ComplexArray #
Complex array of sequence powers (kW, kvar) into each 3-phase terminal of each element
Original COM help: https://opendss.epri.com/SeqPowers.html
- SeqVoltages() altdss.types.Float64Array #
Double array of symmetrical component voltages (magnitudes only) at each 3-phase terminal
Original COM help: https://opendss.epri.com/SeqVoltages1.html
- TapDelay: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Delay in sec between tap changes. Default is 2. This is how long it takes between changes after the first change.
DSS property name:
TapDelay
, DSS property index: 16.
- TapNum: altdss.ArrayProxy.BatchInt32ArrayProxy#
‘property(…)’
An integer number indicating the tap position that the controlled transformer winding tap position is currently at, or is being set to. If being set, and the value is outside the range of the transformer min or max tap, then set to the min or max tap position as appropriate. Default is 0
DSS property name:
TapNum
, DSS property index: 28.
- TapWinding: altdss.ArrayProxy.BatchInt32ArrayProxy#
‘property(…)’
Winding containing the actual taps, if different than the WINDING property. Defaults to the same winding as specified by the WINDING property.
DSS property name:
TapWinding
, DSS property index: 20.
- TotalPowers() altdss.types.ComplexArray #
Returns an array with the total powers (complex, kVA) at all terminals of the circuit elements in this batch.
The resulting array is equivalent to concatenating the TotalPowers for each element.
- Transformer: List[Union[altdss.Transformer.Transformer, altdss.AutoTrans.AutoTrans]]#
‘property(…)’
Name of Transformer or AutoTrans element to which the RegControl is connected. Do not specify the full object name; “Transformer” or “AutoTrans” is assumed for the object class. Example:
Transformer=Xfmr1
DSS property name:
Transformer
, DSS property index: 1.
- Transformer_str: List[str]#
‘property(…)’
Name of Transformer or AutoTrans element to which the RegControl is connected. Do not specify the full object name; “Transformer” or “AutoTrans” is assumed for the object class. Example:
Transformer=Xfmr1
DSS property name:
Transformer
, DSS property index: 1.
- VLimit: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Voltage Limit for bus to which regulated winding is connected (e.g. first customer). Default is 0.0. Set to a value greater then zero to activate this function.
DSS property name:
VLimit
, DSS property index: 21.
- VReg: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Voltage regulator setting, in VOLTS, for the winding being controlled. Multiplying this value times the ptratio should yield the voltage across the WINDING of the controlled transformer. Default is 120.0
DSS property name:
VReg
, DSS property index: 3.
- Voltages() altdss.types.ComplexArray #
Complex array of voltages at terminals
Original COM help: https://opendss.epri.com/Voltages1.html
- VoltagesMagAng() altdss.types.Float64Array #
Voltages at each conductor in magnitude, angle form as array of doubles.
Original COM help: https://opendss.epri.com/VoltagesMagAng.html
- Winding: altdss.ArrayProxy.BatchInt32ArrayProxy#
‘property(…)’
Number of the winding of the transformer element that the RegControl is monitoring. 1 or 2, typically. Side Effect: Sets TAPWINDING property to the same winding.
DSS property name:
Winding
, DSS property index: 2.
- X: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
X setting on the line drop compensator in the regulator, expressed in VOLTS.
DSS property name:
X
, DSS property index: 8.
- __call__()#
- __contains__(name: str) bool #
- __getitem__(name_or_idx)#
- __init__(iobj)#
- __iter__()#
- __len__() int #
- batch(**kwargs)#
Creates a new batch handler of (existing) objects
- batch_new(names: Optional[List[AnyStr]] = None, *, df=None, count: Optional[int] = None, begin_edit: Optional[bool] = None, **kwargs: typing_extensions.Unpack[altdss.RegControl.RegControlBatchProperties]) altdss.RegControl.RegControlBatch #
Creates a new batch of RegControl objects
Either
names
,count
ordf
is required.- Parameters:
begin_edit – The argument
begin_edit
indicates if the user want to leave the elements in the edit state, and requires a call toend_edit()
or equivalent. The defaultbegin_edit
is set toNone
. WithNone
, the behavior will be adjusted according the default of how the batch is created.**kwargs – Pass keyword arguments equivalent to the DSS properties of the object.
names – When using a list of names, each new object will match the names from this list.
begin_edit
defaults toTrue
if no arguments for properties were passed,False
otherwise.count – When using
count
, new objects will be created with based on a random prefix, with an increasing integer up tocount
.begin_edit
defaults toTrue
if no arguments for properties were passed,False
otherwise.df – Currently EXPERIMENTAL AND LIMITED, tries to get the columns from a dataframe to populate the names and the DSS properties.
begin_edit
defaults toFalse
.
- Returns:
Returns the new batch of DSS objects, wrapped in Python.
Note that, to make it easier for new users where the edit context might not be too relevant, AltDSS automatically opens/closes edit contexts for single properties if the object is not in the edit state already.
- begin_edit() None #
Marks for editing all DSS objects in the batch
In the editing mode, some final side-effects of changing properties are postponed until
end_edit
is called. This side-effects can be somewhat costly, like updating the model parameters or internal matrices.If you don’t have any performance constraint, you may edit each property individually without worrying about using
begin_edit
andend_edit
. For convenience, those are emitted automatically when editing single properties outside an edit block.
- edit(**kwargs: typing_extensions.Unpack[altdss.RegControl.RegControlBatchProperties]) altdss.RegControl.RegControlBatch #
Edit this RegControl batch.
This method will try to open a new edit context (if not already open), edit the properties, and finalize the edit context for objects in the batch. It can be seen as a shortcut to manually setting each property, or a Pythonic analogous (but extended) to the DSS
BatchEdit
command.- Parameters:
**kwargs – Pass keyword arguments equivalent to the DSS properties of the objects.
- Returns:
Returns itself to allow call chaining.
- end_edit(num_changes: int = 1) None #
Leaves the editing states of all DSS objects in the batch
num_changes
is required for a few classes to correctly match the official OpenDSS behavior and must be the number of properties modified in the current editing block. As of DSS C-API v0.13, this is only required for the Monitor class, when theAction
property is used with theProcess
value.
- find(name_or_idx: Union[AnyStr, int]) altdss.DSSObj.DSSObj #
Returns an object from the collection by name or index; the index must be zero-based.
- new(name: AnyStr, *, begin_edit: Optional[bool] = None, activate=False, **kwargs: typing_extensions.Unpack[altdss.RegControl.RegControlProperties]) altdss.RegControl.RegControl #
Creates a new RegControl.
- Parameters:
name – The object’s name is a required positional argument.
activate – Activation (setting
activate
to true) is useful for integration with the classic API, and some internal OpenDSS commands. If you interact with this object only via the Alt API, no need to activate it (due to performance costs).begin_edit – This controls how the edit context is left after the object creation:
True
: The object will be left in the edit state, requiring anend_edit
call or equivalent.False
: No edit context is started.None
: If no properties are passed as keyword arguments, the object will be left in the edit state (assumes the user will fill the properties from Python attributes). Otherwise, the internal edit context will be finalized.
- Parameters:
**kwargs – Pass keyword arguments equivalent to the DSS properties of the object.
- Returns:
Returns the new DSS object, wrapped in Python.
Note that, to make it easier for new users where the edit context might not be too relevant, AltDSS automatically opens/closes edit contexts for single properties if the object is not in the edit state already.
- to_json(options: Union[int, dss.enums.DSSJSONFlags] = 0)#
Returns the data (as a list) of the elements in a batch as a JSON-encoded string.
The
options
parameter contains bit-flags to toggle specific features. SeeObj_ToJSON
(C-API) for more, orDSSObj.to_json
in Python.Additionally, the
ExcludeDisabled
flag can be used to excluded disabled elements from the output.
- to_list()#
- class altdss.RegControl.RegControl(api_util, ptr)#
Bases:
altdss.DSSObj.DSSObj
,altdss.CircuitElement.CircuitElementMixin
- Band: float#
‘property(…)’
Bandwidth in VOLTS for the controlled bus (see help for ptratio property). Default is 3.0
DSS property name:
Band
, DSS property index: 4.
- BaseFreq: float#
‘property(…)’
Base Frequency for ratings.
DSS property name:
BaseFreq
, DSS property index: 33.
- Bus: str#
‘property(…)’
Name of a bus (busname.nodename) in the system to use as the controlled bus instead of the bus to which the transformer winding is connected or the R and X line drop compensator settings. Do not specify this value if you wish to use the line drop compensator settings. Default is null string. Assumes the base voltage for this bus is the same as the transformer winding base specified above. Note: This bus (1-phase) WILL BE CREATED by the regulator control upon SOLVE if not defined by some other device. You can specify the node of the bus you wish to sample (defaults to 1). If specified, the RegControl is redefined as a 1-phase device since only one voltage is used.
DSS property name:
Bus
, DSS property index: 9.
- CTPrim: float#
‘property(…)’
Rating, in Amperes, of the primary CT rating for which the line amps convert to control rated amps.The typical default secondary ampere rating is 0.2 Amps (check with manufacturer specs). Current at which the LDC voltages match the R and X settings.
DSS property name:
CTPrim
, DSS property index: 6.
- Close(terminal: int, phase: int) None #
Close the specified terminal and phase, if non-zero, or all conductors at the terminal.
Original COM help: https://opendss.epri.com/Close1.html
- Cogen: bool#
‘property(…)’
{Yes|No*} Default is No. The Cogen feature is activated. Continues looking forward if power reverses, but switches to reverse-mode LDC, vreg and band values.
DSS property name:
Cogen
, DSS property index: 32.
- ComplexSeqCurrents() altdss.types.ComplexArray #
Complex double array of Sequence Currents for all conductors of all terminals of active circuit element.
Original COM help: https://opendss.epri.com/CplxSeqCurrents.html
- ComplexSeqVoltages() altdss.types.ComplexArray #
Complex double array of Sequence Voltage for all terminals of active circuit element.
Original COM help: https://opendss.epri.com/CplxSeqVoltages1.html
- Currents() altdss.types.ComplexArray #
Complex array of currents into each conductor of each terminal
Original COM help: https://opendss.epri.com/Currents1.html
- DebugTrace: bool#
‘property(…)’
{Yes | No* } Default is no. Turn this on to capture the progress of the regulator model for each control iteration. Creates a separate file for each RegControl named “REG_name.csv”.
DSS property name:
DebugTrace
, DSS property index: 17.
- Delay: float#
‘property(…)’
Time delay, in seconds, from when the voltage goes out of band to when the tap changing begins. This is used to determine which regulator control will act first. Default is 15. You may specify any floating point number to achieve a model of whatever condition is necessary.
DSS property name:
Delay
, DSS property index: 10.
- DisplayName: str#
‘property(…)’
Display name of the object (not necessarily unique)
Original COM help: https://opendss.epri.com/DisplayName.html
- Enabled: bool#
‘property(…)’
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name:
Enabled
, DSS property index: 34.
- EventLog: bool#
‘property(…)’
{Yes/True | No/False*} Default is NO for regulator control. Log control actions to Eventlog.
DSS property name:
EventLog
, DSS property index: 26.
- FullName() str #
- GUID() str #
Object’s GUID/UUID. Currently used only in the CIM-related methods.
Original COM help: https://opendss.epri.com/GUID.html
- Handle() int #
Index of this element into the circuit’s element list.
Original COM help: https://opendss.epri.com/Handle.html
- HasOCPDevice() bool #
Returns true if a recloser, relay, or fuse controlling the circuit element.
OCP = Overcurrent Protection
Original COM help: https://opendss.epri.com/HasOCPDevice.html
- HasSwitchControl() bool #
Returns true if the element has a SwtControl attached.
Original COM help: https://opendss.epri.com/HasSwitchControl.html
- HasVoltControl() bool #
Returns true if the element has a CapControl or RegControl attached.
Original COM help: https://opendss.epri.com/HasVoltControl.html
- InverseTime: bool#
‘property(…)’
{Yes | No* } Default is no. The time delay is adjusted inversely proportional to the amount the voltage is outside the band down to 10%.
DSS property name:
InverseTime
, DSS property index: 19.
- IsIsolated() bool #
Returns true if the element is isolated. Note that this only fetches the current value. See also the Topology interface.
- IsOpen(terminal: int, phase: int) bool #
Returns true if the specified terminal and phase are open.
If the
phase
parameter is zero, returns if any conductor at the terminal is open.
- LDC_Z: float#
‘property(…)’
Z value for Beckwith LDC_Z control option. Volts adjustment at rated control current.
DSS property name:
LDC_Z
, DSS property index: 30.
- Like(value: AnyStr)#
Make like another object, e.g.:
New Capacitor.C2 like=c1 …
DSS property name:
Like
, DSS property index: 35.
- Losses() complex #
Total (complex) losses in the element, in VA (watts, vars)
Original COM help: https://opendss.epri.com/Losses1.html
- MaxCurrent(terminal: int) float #
Returns the maximum current (magnitude) at the specified terminal. Use -1 as terminal to get the value across all terminals.
- MaxTapChange: int#
‘property(…)’
Maximum allowable tap change per control iteration in STATIC control mode. Default is 16.
Set this to 1 to better approximate actual control action.
Set this to 0 to fix the tap in the current position.
DSS property name:
MaxTapChange
, DSS property index: 18.
- property Name: str#
- NodeOrder() altdss.types.Int32Array #
Array of integer containing the node numbers (representing phases, for example) for each conductor of each terminal.
Be sure to run a solution to initialize the values after the circuit is created or modified.
- NodeRef() altdss.types.Int32Array #
Array of integers, a copy of the internal NodeRef of the CktElement.
Be sure to run a solution to initialize the values after the circuit is created or modified.
- NumConductors() int #
Number of conductors per terminal
Original COM help: https://opendss.epri.com/NumConductors.html
- NumControllers() int #
Number of controllers connected to this device.
Original COM help: https://opendss.epri.com/NumControls.html
- NumPhases() int #
Number of phases
Original COM help: https://opendss.epri.com/NumPhases.html
- NumTerminals() int #
Number of terminals in this circuit element
Original COM help: https://opendss.epri.com/NumTerminals.html
- OCPDevice() Union[altdss.DSSObj.DSSObj, None] #
Returns (as a Python object) the OCP device controlling this element, if any.
- OCPDeviceIndex() int #
Index into controller list of OCP Device controlling this circuit element
Original COM help: https://opendss.epri.com/OCPDevIndex.html
- OCPDeviceType() dss.enums.OCPDevType #
Type of OCP controller device
Original COM help: https://opendss.epri.com/OCPDevType.html
- Open(terminal: int, phase: int) None #
Open the specified terminal and phase, if non-zero, or all conductors at the terminal.
Original COM help: https://opendss.epri.com/Open1.html
- PTPhase: altdss.enums.RegControlPhaseSelection#
‘property(…)’
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. Default=1. Must be less than or equal to the number of phases. Ignored for regulated bus.
DSS property name:
PTPhase
, DSS property index: 22.
- PTPhase_str: str#
‘property(…)’
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. Default=1. Must be less than or equal to the number of phases. Ignored for regulated bus.
DSS property name:
PTPhase
, DSS property index: 22.
- PTRatio: float#
‘property(…)’
Ratio of the PT that converts the controlled winding voltage to the regulator control voltage. Default is 60. If the winding is Wye, the line-to-neutral voltage is used. Else, the line-to-line voltage is used. SIDE EFFECT: Also sets RemotePTRatio property.
DSS property name:
PTRatio
, DSS property index: 5.
- PhaseLosses() altdss.types.ComplexArray #
Complex array of losses (kVA) by phase
Original COM help: https://opendss.epri.com/PhaseLosses.html
- Powers() altdss.types.ComplexArray #
Complex array of powers (kVA) into each conductor of each terminal
Original COM help: https://opendss.epri.com/Powers.html
- R: float#
‘property(…)’
R setting on the line drop compensator in the regulator, expressed in VOLTS.
DSS property name:
R
, DSS property index: 7.
- RemotePTRatio: float#
‘property(…)’
When regulating a bus (the Bus= property is set), the PT ratio required to convert actual voltage at the remote bus to control voltage. Is initialized to PTratio property. Set this property after setting PTratio.
DSS property name:
RemotePTRatio
, DSS property index: 27.
- Reset(value: bool = True, flags: altdss.enums.SetterFlags = 0)#
{Yes | No} If Yes, forces Reset of this RegControl.
DSS property name:
Reset
, DSS property index: 29.
- Residuals() altdss.types.Float64Array #
Residual currents for each terminal: (magnitude, angle in degrees)
Original COM help: https://opendss.epri.com/Residuals.html
- RevBand: float#
‘property(…)’
Bandwidth for operating in the reverse direction.
DSS property name:
RevBand
, DSS property index: 13.
- RevDelay: float#
‘property(…)’
Time Delay in seconds (s) for executing the reversing action once the threshold for reversing has been exceeded. Default is 60 s.
DSS property name:
RevDelay
, DSS property index: 24.
- RevNeutral: bool#
‘property(…)’
{Yes | No*} Default is no. Set this to Yes if you want the regulator to go to neutral in the reverse direction or in cogen operation.
DSS property name:
RevNeutral
, DSS property index: 25.
- RevR: float#
‘property(…)’
R line drop compensator setting for reverse direction.
DSS property name:
RevR
, DSS property index: 14.
- RevThreshold: float#
‘property(…)’
kW reverse power threshold for reversing the direction of the regulator. Default is 100.0 kw.
DSS property name:
RevThreshold
, DSS property index: 23.
- RevVReg: float#
‘property(…)’
Voltage setting in volts for operation in the reverse direction.
DSS property name:
RevVReg
, DSS property index: 12.
- RevX: float#
‘property(…)’
X line drop compensator setting for reverse direction.
DSS property name:
RevX
, DSS property index: 15.
- Rev_Z: float#
‘property(…)’
Reverse Z value for Beckwith LDC_Z control option.
DSS property name:
Rev_Z
, DSS property index: 31.
- Reversible: bool#
‘property(…)’
{Yes |No*} Indicates whether or not the regulator can be switched to regulate in the reverse direction. Default is No.Typically applies only to line regulators and not to LTC on a substation transformer.
DSS property name:
Reversible
, DSS property index: 11.
- SeqCurrents() altdss.types.Float64Array #
Array of symmetrical component currents (magnitudes only) into each 3-phase terminal
Original COM help: https://opendss.epri.com/SeqCurrents.html
- SeqPowers() altdss.types.ComplexArray #
Complex array of sequence powers (kW, kvar) into each 3-phase terminal
Original COM help: https://opendss.epri.com/SeqPowers.html
- SeqVoltages() altdss.types.Float64Array #
Double array of symmetrical component voltages (magnitudes only) at each 3-phase terminal
Original COM help: https://opendss.epri.com/SeqVoltages1.html
- TapDelay: float#
‘property(…)’
Delay in sec between tap changes. Default is 2. This is how long it takes between changes after the first change.
DSS property name:
TapDelay
, DSS property index: 16.
- TapNum: int#
‘property(…)’
An integer number indicating the tap position that the controlled transformer winding tap position is currently at, or is being set to. If being set, and the value is outside the range of the transformer min or max tap, then set to the min or max tap position as appropriate. Default is 0
DSS property name:
TapNum
, DSS property index: 28.
- TapWinding: int#
‘property(…)’
Winding containing the actual taps, if different than the WINDING property. Defaults to the same winding as specified by the WINDING property.
DSS property name:
TapWinding
, DSS property index: 20.
- TotalPowers() altdss.types.ComplexArray #
Returns an array with the total powers (complex, kVA) at ALL terminals of the active circuit element.
Original COM help: https://opendss.epri.com/TotalPowers.html
- Transformer: altdss.Transformer.Transformer, altdss.AutoTrans.AutoTrans#
‘property(…)’
Name of Transformer or AutoTrans element to which the RegControl is connected. Do not specify the full object name; “Transformer” or “AutoTrans” is assumed for the object class. Example:
Transformer=Xfmr1
DSS property name:
Transformer
, DSS property index: 1.
- Transformer_str: str#
‘property(…)’
Name of Transformer or AutoTrans element to which the RegControl is connected. Do not specify the full object name; “Transformer” or “AutoTrans” is assumed for the object class. Example:
Transformer=Xfmr1
DSS property name:
Transformer
, DSS property index: 1.
- VLimit: float#
‘property(…)’
Voltage Limit for bus to which regulated winding is connected (e.g. first customer). Default is 0.0. Set to a value greater then zero to activate this function.
DSS property name:
VLimit
, DSS property index: 21.
- VReg: float#
‘property(…)’
Voltage regulator setting, in VOLTS, for the winding being controlled. Multiplying this value times the ptratio should yield the voltage across the WINDING of the controlled transformer. Default is 120.0
DSS property name:
VReg
, DSS property index: 3.
- Voltages() altdss.types.ComplexArray #
Complex array of voltages at terminals
Original COM help: https://opendss.epri.com/Voltages1.html
- VoltagesMagAng() altdss.types.Float64Array #
Voltages at each conductor in magnitude, angle form as array of doubles.
Original COM help: https://opendss.epri.com/VoltagesMagAng.html
- Winding: int#
‘property(…)’
Number of the winding of the transformer element that the RegControl is monitoring. 1 or 2, typically. Side Effect: Sets TAPWINDING property to the same winding.
DSS property name:
Winding
, DSS property index: 2.
- X: float#
‘property(…)’
X setting on the line drop compensator in the regulator, expressed in VOLTS.
DSS property name:
X
, DSS property index: 8.
- YPrim() altdss.types.ComplexArray #
YPrim matrix, column order, complex numbers
Original COM help: https://opendss.epri.com/Yprim.html
- __hash__()#
Return hash(self).
- __init__(api_util, ptr)#
- __ne__(other)#
Return self!=value.
- __repr__()#
Return repr(self).
- begin_edit() None #
Marks a DSS object for editing
In the editing mode, some final side-effects of changing properties are postponed until
end_edit
is called. This side-effects can be somewhat costly, like updating the model parameters or internal matrices.If you don’t have any performance constraint, you may edit each property individually without worrying about using
begin_edit
andend_edit
. For convenience, those are emitted automatically when editing single properties outside an edit block.
- edit(**kwargs: typing_extensions.Unpack[altdss.RegControl.RegControlProperties]) altdss.RegControl.RegControl #
Edit this RegControl.
This method will try to open a new edit context (if not already open), edit the properties, and finalize the edit context. It can be seen as a shortcut to manually setting each property, or a Pythonic analogous (but extended) to the DSS
Edit
command.- Parameters:
**kwargs – Pass keyword arguments equivalent to the DSS properties of the object.
- Returns:
Returns itself to allow call chaining.
- end_edit(num_changes: int = 1) None #
Leaves the editing state of a DSS object
num_changes
is required for a few classes to correctly match the official OpenDSS behavior and must be the number of properties modified in the current editing block. As of DSS C-API v0.13, this is only required for the Monitor class, when theAction
property is used with theProcess
value.
- to_json(options: Union[int, dss.enums.DSSJSONFlags] = 0)#
Returns an element’s data as a JSON-encoded string.
The
options
parameter contains bit-flags to toggle specific features.By default (
options = 0
), only the properties explicitly set. The properties are returned in the order they are set in the input. As a reminder, OpenDSS is sensitive to the order of the properties.The
options
bit-flags are available in theDSSJSONFlags
enum. Values used by this function are:Full
: if set, all properties are returned, ordered by property index instead.SkipRedundant
: if used withFull
, all properties except redundant and unused ones are returned.EnumAsInt
: enumerated properties are returned as integer values instead of strings.FullNames
: any element reference will use the full name ({class name}.{element name}
) even if not required.Pretty
: more whitespace is used in the output for a “prettier” format.SkipDSSClass
: do not add the “DSSClass” property to the JSON objects.
NOT IMPLEMENTED YET:
State
: include run-time state informationDebug
: include debug information
Other bit-flags are reserved for future uses. Please use
DSSJSONFlags
enum to avoid potential conflicts.(API Extension)
- class altdss.RegControl.RegControlBatch(api_util, **kwargs)#
Bases:
altdss.Batch.DSSBatch
,altdss.CircuitElement.CircuitElementBatchMixin
- Band: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Bandwidth in VOLTS for the controlled bus (see help for ptratio property). Default is 3.0
DSS property name:
Band
, DSS property index: 4.
- BaseFreq: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Base Frequency for ratings.
DSS property name:
BaseFreq
, DSS property index: 33.
- Bus: List[str]#
‘property(…)’
Name of a bus (busname.nodename) in the system to use as the controlled bus instead of the bus to which the transformer winding is connected or the R and X line drop compensator settings. Do not specify this value if you wish to use the line drop compensator settings. Default is null string. Assumes the base voltage for this bus is the same as the transformer winding base specified above. Note: This bus (1-phase) WILL BE CREATED by the regulator control upon SOLVE if not defined by some other device. You can specify the node of the bus you wish to sample (defaults to 1). If specified, the RegControl is redefined as a 1-phase device since only one voltage is used.
DSS property name:
Bus
, DSS property index: 9.
- CTPrim: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Rating, in Amperes, of the primary CT rating for which the line amps convert to control rated amps.The typical default secondary ampere rating is 0.2 Amps (check with manufacturer specs). Current at which the LDC voltages match the R and X settings.
DSS property name:
CTPrim
, DSS property index: 6.
- Cogen: List[bool]#
‘property(…)’
{Yes|No*} Default is No. The Cogen feature is activated. Continues looking forward if power reverses, but switches to reverse-mode LDC, vreg and band values.
DSS property name:
Cogen
, DSS property index: 32.
- ComplexSeqCurrents() altdss.types.ComplexArray #
Complex double array of Sequence Currents for all conductors of all terminals of active circuit element.
Original COM help: https://opendss.epri.com/CplxSeqCurrents.html
- ComplexSeqVoltages() altdss.types.ComplexArray #
Complex double array of Sequence Voltage for all terminals of active circuit element.
Original COM help: https://opendss.epri.com/CplxSeqVoltages1.html
- Currents() altdss.types.ComplexArray #
Complex array of currents into each conductor of each terminal
Original COM help: https://opendss.epri.com/Currents1.html
- CurrentsMagAng() altdss.types.Float64Array #
Currents in magnitude, angle (degrees) format as a array of doubles.
Original COM help: https://opendss.epri.com/CurrentsMagAng.html
- DebugTrace: List[bool]#
‘property(…)’
{Yes | No* } Default is no. Turn this on to capture the progress of the regulator model for each control iteration. Creates a separate file for each RegControl named “REG_name.csv”.
DSS property name:
DebugTrace
, DSS property index: 17.
- Delay: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Time delay, in seconds, from when the voltage goes out of band to when the tap changing begins. This is used to determine which regulator control will act first. Default is 15. You may specify any floating point number to achieve a model of whatever condition is necessary.
DSS property name:
Delay
, DSS property index: 10.
- Enabled: List[bool]#
‘property(…)’
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name:
Enabled
, DSS property index: 34.
- EventLog: List[bool]#
‘property(…)’
{Yes/True | No/False*} Default is NO for regulator control. Log control actions to Eventlog.
DSS property name:
EventLog
, DSS property index: 26.
- FullName() List[str] #
Returns the full name (including object type) for all objects in this batch
- GUID() List[str] #
GUID/UUID for each object. Currently used only in the CIM-related methods.
Original COM help: https://opendss.epri.com/GUID.html
- Handle() altdss.types.Int32Array #
Index of each element into the circuit’s element list.
Original COM help: https://opendss.epri.com/Handle.html
- HasOCPDevice() altdss.types.BoolArray #
For each element in the batch: returns true if a recloser, relay, or fuse controlling the circuit element.
OCP = Overcurrent Protection
Original COM help: https://opendss.epri.com/HasOCPDevice.html
- HasSwitchControl() altdss.types.BoolArray #
For each element in the batch: returns true if the element has a SwtControl attached.
Original COM help: https://opendss.epri.com/HasSwitchControl.html
- HasVoltControl() altdss.types.BoolArray #
For each element in the batch: returns true if the element has a CapControl or RegControl attached.
Original COM help: https://opendss.epri.com/HasVoltControl.html
- InverseTime: List[bool]#
‘property(…)’
{Yes | No* } Default is no. The time delay is adjusted inversely proportional to the amount the voltage is outside the band down to 10%.
DSS property name:
InverseTime
, DSS property index: 19.
- IsIsolated() altdss.types.BoolArray #
For each element in the batch: returns true if the element is isolated. Note that this only fetches the current value. See also the Topology interface.
- LDC_Z: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Z value for Beckwith LDC_Z control option. Volts adjustment at rated control current.
DSS property name:
LDC_Z
, DSS property index: 30.
- Like(value: AnyStr, flags: altdss.enums.SetterFlags = 0)#
Make like another object, e.g.:
New Capacitor.C2 like=c1 …
DSS property name:
Like
, DSS property index: 35.
- Losses() altdss.types.ComplexArray #
For each element in the batch: total losses in the element, in VA (watts, vars).
Original COM help: https://opendss.epri.com/Losses1.html
- MaxCurrent(terminal: int) altdss.types.Float64Array #
Returns the maximum current (magnitude) at the specified terminal for each element in this batch. Use -1 as terminal to get the value across all terminals.
- MaxTapChange: altdss.ArrayProxy.BatchInt32ArrayProxy#
‘property(…)’
Maximum allowable tap change per control iteration in STATIC control mode. Default is 16.
Set this to 1 to better approximate actual control action.
Set this to 0 to fix the tap in the current position.
DSS property name:
MaxTapChange
, DSS property index: 18.
- property Name: List[str]#
- NumConductors() altdss.types.Int32Array #
Number of conductors per terminal for each element in the batch.
Original COM help: https://opendss.epri.com/NumConductors.html
- NumControllers() altdss.types.Int32Array #
Number of controllers connected to each device in the batch.
Original COM help: https://opendss.epri.com/NumControls.html
- NumPhases() altdss.types.Int32Array #
Number of Phases for each element in this batch.
Original COM help: https://opendss.epri.com/NumPhases.html
- NumTerminals() altdss.types.Int32Array #
Number of terminals for each Circuit Element in the batch.
Original COM help: https://opendss.epri.com/NumTerminals.html
- OCPDevice() List[Union[altdss.DSSObj.DSSObj, None]] #
Returns (as a list of Python objects) the OCP device controlling each element.
- OCPDeviceIndex() altdss.types.Int32Array #
For each element in the batch: index into each controller list of the OCP Device controlling each circuit element
Original COM help: https://opendss.epri.com/OCPDevIndex.html
- OCPDeviceType() List[dss.enums.OCPDevType] #
For each element in the batch: type of OCP controller device
Original COM help: https://opendss.epri.com/OCPDevType.html
- PTPhase: altdss.ArrayProxy.BatchInt32ArrayProxy#
‘property(…)’
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. Default=1. Must be less than or equal to the number of phases. Ignored for regulated bus.
DSS property name:
PTPhase
, DSS property index: 22.
- PTPhase_str: List[str]#
‘property(…)’
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. Default=1. Must be less than or equal to the number of phases. Ignored for regulated bus.
DSS property name:
PTPhase
, DSS property index: 22.
- PTRatio: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Ratio of the PT that converts the controlled winding voltage to the regulator control voltage. Default is 60. If the winding is Wye, the line-to-neutral voltage is used. Else, the line-to-line voltage is used. SIDE EFFECT: Also sets RemotePTRatio property.
DSS property name:
PTRatio
, DSS property index: 5.
- PhaseLosses() altdss.types.ComplexArray #
Complex array of losses (kVA) by phase
Original COM help: https://opendss.epri.com/PhaseLosses.html
- Powers() altdss.types.ComplexArray #
Complex array of powers (kVA) into each conductor of each terminal, of each element in the batch.
Original COM help: https://opendss.epri.com/Powers.html
- R: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
R setting on the line drop compensator in the regulator, expressed in VOLTS.
DSS property name:
R
, DSS property index: 7.
- RemotePTRatio: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
When regulating a bus (the Bus= property is set), the PT ratio required to convert actual voltage at the remote bus to control voltage. Is initialized to PTratio property. Set this property after setting PTratio.
DSS property name:
RemotePTRatio
, DSS property index: 27.
- Reset(value: Union[bool, List[bool]] = True, flags: altdss.enums.SetterFlags = 0)#
{Yes | No} If Yes, forces Reset of this RegControl.
DSS property name:
Reset
, DSS property index: 29.
- RevBand: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Bandwidth for operating in the reverse direction.
DSS property name:
RevBand
, DSS property index: 13.
- RevDelay: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Time Delay in seconds (s) for executing the reversing action once the threshold for reversing has been exceeded. Default is 60 s.
DSS property name:
RevDelay
, DSS property index: 24.
- RevNeutral: List[bool]#
‘property(…)’
{Yes | No*} Default is no. Set this to Yes if you want the regulator to go to neutral in the reverse direction or in cogen operation.
DSS property name:
RevNeutral
, DSS property index: 25.
- RevR: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
R line drop compensator setting for reverse direction.
DSS property name:
RevR
, DSS property index: 14.
- RevThreshold: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
kW reverse power threshold for reversing the direction of the regulator. Default is 100.0 kw.
DSS property name:
RevThreshold
, DSS property index: 23.
- RevVReg: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Voltage setting in volts for operation in the reverse direction.
DSS property name:
RevVReg
, DSS property index: 12.
- RevX: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
X line drop compensator setting for reverse direction.
DSS property name:
RevX
, DSS property index: 15.
- Rev_Z: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Reverse Z value for Beckwith LDC_Z control option.
DSS property name:
Rev_Z
, DSS property index: 31.
- Reversible: List[bool]#
‘property(…)’
{Yes |No*} Indicates whether or not the regulator can be switched to regulate in the reverse direction. Default is No.Typically applies only to line regulators and not to LTC on a substation transformer.
DSS property name:
Reversible
, DSS property index: 11.
- SeqCurrents() altdss.types.Float64Array #
Array of symmetrical component currents (magnitudes only) into each 3-phase terminal of each element
Original COM help: https://opendss.epri.com/SeqCurrents.html
- SeqPowers() altdss.types.ComplexArray #
Complex array of sequence powers (kW, kvar) into each 3-phase terminal of each element
Original COM help: https://opendss.epri.com/SeqPowers.html
- SeqVoltages() altdss.types.Float64Array #
Double array of symmetrical component voltages (magnitudes only) at each 3-phase terminal
Original COM help: https://opendss.epri.com/SeqVoltages1.html
- TapDelay: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Delay in sec between tap changes. Default is 2. This is how long it takes between changes after the first change.
DSS property name:
TapDelay
, DSS property index: 16.
- TapNum: altdss.ArrayProxy.BatchInt32ArrayProxy#
‘property(…)’
An integer number indicating the tap position that the controlled transformer winding tap position is currently at, or is being set to. If being set, and the value is outside the range of the transformer min or max tap, then set to the min or max tap position as appropriate. Default is 0
DSS property name:
TapNum
, DSS property index: 28.
- TapWinding: altdss.ArrayProxy.BatchInt32ArrayProxy#
‘property(…)’
Winding containing the actual taps, if different than the WINDING property. Defaults to the same winding as specified by the WINDING property.
DSS property name:
TapWinding
, DSS property index: 20.
- TotalPowers() altdss.types.ComplexArray #
Returns an array with the total powers (complex, kVA) at all terminals of the circuit elements in this batch.
The resulting array is equivalent to concatenating the TotalPowers for each element.
- Transformer: List[Union[altdss.Transformer.Transformer, altdss.AutoTrans.AutoTrans]]#
‘property(…)’
Name of Transformer or AutoTrans element to which the RegControl is connected. Do not specify the full object name; “Transformer” or “AutoTrans” is assumed for the object class. Example:
Transformer=Xfmr1
DSS property name:
Transformer
, DSS property index: 1.
- Transformer_str: List[str]#
‘property(…)’
Name of Transformer or AutoTrans element to which the RegControl is connected. Do not specify the full object name; “Transformer” or “AutoTrans” is assumed for the object class. Example:
Transformer=Xfmr1
DSS property name:
Transformer
, DSS property index: 1.
- VLimit: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Voltage Limit for bus to which regulated winding is connected (e.g. first customer). Default is 0.0. Set to a value greater then zero to activate this function.
DSS property name:
VLimit
, DSS property index: 21.
- VReg: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
Voltage regulator setting, in VOLTS, for the winding being controlled. Multiplying this value times the ptratio should yield the voltage across the WINDING of the controlled transformer. Default is 120.0
DSS property name:
VReg
, DSS property index: 3.
- Voltages() altdss.types.ComplexArray #
Complex array of voltages at terminals
Original COM help: https://opendss.epri.com/Voltages1.html
- VoltagesMagAng() altdss.types.Float64Array #
Voltages at each conductor in magnitude, angle form as array of doubles.
Original COM help: https://opendss.epri.com/VoltagesMagAng.html
- Winding: altdss.ArrayProxy.BatchInt32ArrayProxy#
‘property(…)’
Number of the winding of the transformer element that the RegControl is monitoring. 1 or 2, typically. Side Effect: Sets TAPWINDING property to the same winding.
DSS property name:
Winding
, DSS property index: 2.
- X: altdss.ArrayProxy.BatchFloat64ArrayProxy#
‘property(…)’
X setting on the line drop compensator in the regulator, expressed in VOLTS.
DSS property name:
X
, DSS property index: 8.
- __call__()#
- __getitem__(idx0) altdss.DSSObj.DSSObj #
Get element at 0-based index of the batch pointer array
- __init__(api_util, **kwargs)#
- __iter__()#
- __len__() int #
- batch(**kwargs) altdss.Batch.DSSBatch #
Filter a batch using integer or float DSS properties, returning a new batch.
For integers, provide a single value to match.
For floats, provide a range as a 2-valued tuple/list (min value, max value), or an exact value to value (not recommended).
Multiple properties can be listed to allow filtering various conditions.
Example for loads:
# Create an initial batch using a regular expression abc_loads = altdss.Load.batch(re=r'^abc.*$') # a batch of all loads with names starting with "abc" abc_loads_filtered = abc_loads.batch(Class=1, Phases=1, kV=(0.1, 1.0)) # Create an initial batch, already filtered abc_loads_filtered = altdss.Load.batch(re=r'^abc.*$', Class=1, Phases=1, kV=(0.1, 1.0))
- begin_edit() None #
Marks for editing all DSS objects in the batch
In the editing mode, some final side-effects of changing properties are postponed until
end_edit
is called. This side-effects can be somewhat costly, like updating the model parameters or internal matrices.If you don’t have any performance constraint, you may edit each property individually without worrying about using
begin_edit
andend_edit
. For convenience, those are emitted automatically when editing single properties outside an edit block.
- edit(**kwargs: typing_extensions.Unpack[altdss.RegControl.RegControlBatchProperties]) altdss.RegControl.RegControlBatch #
Edit this RegControl batch.
This method will try to open a new edit context (if not already open), edit the properties, and finalize the edit context for objects in the batch. It can be seen as a shortcut to manually setting each property, or a Pythonic analogous (but extended) to the DSS
BatchEdit
command.- Parameters:
**kwargs – Pass keyword arguments equivalent to the DSS properties of the objects.
- Returns:
Returns itself to allow call chaining.
- end_edit(num_changes: int = 1) None #
Leaves the editing states of all DSS objects in the batch
num_changes
is required for a few classes to correctly match the official OpenDSS behavior and must be the number of properties modified in the current editing block. As of DSS C-API v0.13, this is only required for the Monitor class, when theAction
property is used with theProcess
value.
- to_json(options: Union[int, dss.enums.DSSJSONFlags] = 0)#
Returns the data (as a list) of the elements in a batch as a JSON-encoded string.
The
options
parameter contains bit-flags to toggle specific features. SeeObj_ToJSON
(C-API) for more, orDSSObj.to_json
in Python.Additionally, the
ExcludeDisabled
flag can be used to excluded disabled elements from the output.
- to_list()#
- class altdss.RegControl.RegControlBatchProperties#
Bases:
typing_extensions.TypedDict
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
- Band: Union[float, altdss.types.Float64Array]#
None
- BaseFreq: Union[float, altdss.types.Float64Array]#
None
- Bus: Union[AnyStr, List[AnyStr]]#
None
- CTPrim: Union[float, altdss.types.Float64Array]#
None
- Cogen: bool#
None
- DebugTrace: bool#
None
- Delay: Union[float, altdss.types.Float64Array]#
None
- Enabled: bool#
None
- EventLog: bool#
None
- InverseTime: bool#
None
- LDC_Z: Union[float, altdss.types.Float64Array]#
None
- Like: AnyStr#
None
- MaxTapChange: Union[int, altdss.types.Int32Array]#
None
- PTPhase: Union[AnyStr, int, altdss.enums.RegControlPhaseSelection, List[AnyStr], List[int], List[altdss.enums.RegControlPhaseSelection], altdss.types.Int32Array]#
None
- PTRatio: Union[float, altdss.types.Float64Array]#
None
- R: Union[float, altdss.types.Float64Array]#
None
- RemotePTRatio: Union[float, altdss.types.Float64Array]#
None
- Reset: bool#
None
- RevBand: Union[float, altdss.types.Float64Array]#
None
- RevDelay: Union[float, altdss.types.Float64Array]#
None
- RevNeutral: bool#
None
- RevR: Union[float, altdss.types.Float64Array]#
None
- RevThreshold: Union[float, altdss.types.Float64Array]#
None
- RevVReg: Union[float, altdss.types.Float64Array]#
None
- RevX: Union[float, altdss.types.Float64Array]#
None
- Rev_Z: Union[float, altdss.types.Float64Array]#
None
- Reversible: bool#
None
- TapDelay: Union[float, altdss.types.Float64Array]#
None
- TapNum: Union[int, altdss.types.Int32Array]#
None
- TapWinding: Union[int, altdss.types.Int32Array]#
None
- Transformer: Union[AnyStr, altdss.Transformer.Transformer, altdss.AutoTrans.AutoTrans, List[AnyStr], List[Union[altdss.Transformer.Transformer, altdss.AutoTrans.AutoTrans]]]#
None
- VLimit: Union[float, altdss.types.Float64Array]#
None
- VReg: Union[float, altdss.types.Float64Array]#
None
- Winding: Union[int, altdss.types.Int32Array]#
None
- X: Union[float, altdss.types.Float64Array]#
None
- __contains__()#
True if the dictionary has the specified key, else False.
- __delattr__()#
Implement delattr(self, name).
- __delitem__()#
Delete self[key].
- __dir__()#
Default dir() implementation.
- __format__()#
Default object formatter.
Return str(self) if format_spec is empty. Raise TypeError otherwise.
- __ge__()#
Return self>=value.
- __getattribute__()#
Return getattr(self, name).
- __getitem__()#
Return self[key].
- __getstate__()#
Helper for pickle.
- __gt__()#
Return self>value.
- __init__()#
Initialize self. See help(type(self)) for accurate signature.
- __ior__()#
Return self|=value.
- __iter__()#
Implement iter(self).
- __le__()#
Return self<=value.
- __len__()#
Return len(self).
- __lt__()#
Return self<value.
- __ne__()#
Return self!=value.
- __new__()#
Create and return a new object. See help(type) for accurate signature.
- __or__()#
Return self|value.
- __reduce__()#
Helper for pickle.
- __reduce_ex__()#
Helper for pickle.
- __repr__()#
Return repr(self).
- __reversed__()#
Return a reverse iterator over the dict keys.
- __ror__()#
Return value|self.
- __setitem__()#
Set self[key] to value.
- __sizeof__()#
D.sizeof() -> size of D in memory, in bytes
- __str__()#
Return str(self).
- __subclasshook__()#
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.subclasscheck(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
- clear()#
D.clear() -> None. Remove all items from D.
- copy()#
D.copy() -> a shallow copy of D
- get()#
Return the value for key if key is in the dictionary, else default.
- items()#
D.items() -> a set-like object providing a view on D’s items
- keys()#
D.keys() -> a set-like object providing a view on D’s keys
- pop()#
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()#
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault()#
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update()#
D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()#
D.values() -> an object providing a view on D’s values
- class altdss.RegControl.RegControlProperties#
Bases:
typing_extensions.TypedDict
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
- Band: float#
None
- BaseFreq: float#
None
- Bus: AnyStr#
None
- CTPrim: float#
None
- Cogen: bool#
None
- DebugTrace: bool#
None
- Delay: float#
None
- Enabled: bool#
None
- EventLog: bool#
None
- InverseTime: bool#
None
- LDC_Z: float#
None
- Like: AnyStr#
None
- MaxTapChange: int#
None
- PTPhase: Union[AnyStr, int, altdss.enums.RegControlPhaseSelection]#
None
- PTRatio: float#
None
- R: float#
None
- RemotePTRatio: float#
None
- Reset: bool#
None
- RevBand: float#
None
- RevDelay: float#
None
- RevNeutral: bool#
None
- RevR: float#
None
- RevThreshold: float#
None
- RevVReg: float#
None
- RevX: float#
None
- Rev_Z: float#
None
- Reversible: bool#
None
- TapDelay: float#
None
- TapNum: int#
None
- TapWinding: int#
None
- Transformer: Union[AnyStr, altdss.Transformer.Transformer, altdss.AutoTrans.AutoTrans]#
None
- VLimit: float#
None
- VReg: float#
None
- Winding: int#
None
- X: float#
None
- __contains__()#
True if the dictionary has the specified key, else False.
- __delattr__()#
Implement delattr(self, name).
- __delitem__()#
Delete self[key].
- __dir__()#
Default dir() implementation.
- __format__()#
Default object formatter.
Return str(self) if format_spec is empty. Raise TypeError otherwise.
- __ge__()#
Return self>=value.
- __getattribute__()#
Return getattr(self, name).
- __getitem__()#
Return self[key].
- __getstate__()#
Helper for pickle.
- __gt__()#
Return self>value.
- __init__()#
Initialize self. See help(type(self)) for accurate signature.
- __ior__()#
Return self|=value.
- __iter__()#
Implement iter(self).
- __le__()#
Return self<=value.
- __len__()#
Return len(self).
- __lt__()#
Return self<value.
- __ne__()#
Return self!=value.
- __new__()#
Create and return a new object. See help(type) for accurate signature.
- __or__()#
Return self|value.
- __reduce__()#
Helper for pickle.
- __reduce_ex__()#
Helper for pickle.
- __repr__()#
Return repr(self).
- __reversed__()#
Return a reverse iterator over the dict keys.
- __ror__()#
Return value|self.
- __setitem__()#
Set self[key] to value.
- __sizeof__()#
D.sizeof() -> size of D in memory, in bytes
- __str__()#
Return str(self).
- __subclasshook__()#
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.subclasscheck(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
- clear()#
D.clear() -> None. Remove all items from D.
- copy()#
D.copy() -> a shallow copy of D
- get()#
Return the value for key if key is in the dictionary, else default.
- items()#
D.items() -> a set-like object providing a view on D’s items
- keys()#
D.keys() -> a set-like object providing a view on D’s keys
- pop()#
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()#
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault()#
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update()#
D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()#
D.values() -> an object providing a view on D’s values