diff --git a/altdss/AltDSS.py b/altdss/AltDSS.py index 730f987..6983958 100644 --- a/altdss/AltDSS.py +++ b/altdss/AltDSS.py @@ -11,7 +11,7 @@ from .Topology import ITopology from .YMatrix import IYMatrix -from .common import CffiApiUtil +from .common import AltDSSAPIUtil from dss.enums import DSSJSONFlags from .enums import * from .Bus import IBuses @@ -29,12 +29,12 @@ try: from dss import IDSS as DSSPython except: - DSSPython = None + pass try: from opendssdirect.OpenDSSDirect import OpenDSSDirect except: - OpenDSSDirect = None + pass class AltDSS(IObj): @@ -73,7 +73,7 @@ class AltDSS(IObj): ZIP: IZIP @classmethod - def _get_instance(cls: AltDSS, api_util: CffiApiUtil = None, ctx=None) -> AltDSS: + def _get_instance(cls: AltDSS, api_util: AltDSSAPIUtil = None, ctx=None) -> AltDSS: ''' If there is an existing AltDSS instance for a context, return it. Otherwise, try to wrap the context into a new AltDSS API instance. @@ -81,7 +81,7 @@ def _get_instance(cls: AltDSS, api_util: CffiApiUtil = None, ctx=None) -> AltDSS if api_util is None: # If none exists, something is probably wrong elsewhere, # so let's allow the IndexError to propagate - api_util = CffiApiUtil._ctx_to_util[ctx] + api_util = AltDSSAPIUtil._ctx_to_util[ctx] dss = cls._ctx_to_dss.get(api_util.ctx) if dss is None: @@ -99,6 +99,9 @@ def __init__(self, api_util): ''' IObj.__init__(self, api_util) AltDSS._ctx_to_dss[api_util.ctx] = self + if api_util._altdss is None: + api_util._altdss = self + self._ptr = api_util.ctx self.Bus = IBuses(self._api_util) @@ -120,125 +123,146 @@ def __init__(self, api_util): def DisableElement(self, name: AnyStr): ''' Disable a circuit element by name (removes from circuit but leave in database). - ''' - if not isinstance(name, bytes): - name = name.encode(self._api_util.codec) - self._check_for_error(self._lib.Circuit_Disable(name)) + Original COM help: https://opendss.epri.com/Disable.html + ''' + self._lib.Circuit_Disable(name) def EnableElement(self, name: AnyStr): ''' Enable a circuit element by name - ''' - if not isinstance(name, bytes): - name = name.encode(self._api_util.codec) - self._check_for_error(self._lib.Circuit_Enable(name)) + Original COM help: https://opendss.epri.com/Enable.html + ''' + self._lib.Circuit_Enable(name) def NodeDistancesByPhase(self, Phase: int) -> Float64Array: '''Returns an array of doubles representing the distances to parent EnergyMeter. Sequence of array corresponds to other node ByPhase properties.''' - self._check_for_error(self._lib.Circuit_Get_AllNodeDistancesByPhase_GR(Phase)) - return self._get_float64_gr_array() + return self._lib.Circuit_Get_AllNodeDistancesByPhase_GR(Phase) def NodeNamesByPhase(self, Phase: int) -> List[str]: '''Return array of strings of the node names for the By Phase criteria. Sequence corresponds to other ByPhase properties.''' - return self._check_for_error(self._get_string_array(self._lib.Circuit_Get_AllNodeNamesByPhase, Phase)) + return self._lib.Circuit_Get_AllNodeNamesByPhase(Phase) def NodeVMagByPhase(self, Phase: int) -> Float64Array: '''Returns Array of doubles represent voltage magnitudes for nodes on the specified phase.''' - self._check_for_error(self._lib.Circuit_Get_AllNodeVmagByPhase_GR(Phase)) - return self._get_float64_gr_array() + return self._lib.Circuit_Get_AllNodeVmagByPhase_GR(Phase) def NodeVMagPUByPhase(self, Phase: int) -> Float64Array: '''Returns array of per unit voltage magnitudes for each node by phase''' - self._check_for_error(self._lib.Circuit_Get_AllNodeVmagPUByPhase_GR(Phase)) - return self._get_float64_gr_array() + return self._lib.Circuit_Get_AllNodeVmagPUByPhase_GR(Phase) def BusDistances(self) -> Float64Array: ''' Returns distance from each bus to parent EnergyMeter. Corresponds to sequence in AllBusNames. ''' - self._check_for_error(self._lib.Circuit_Get_AllBusDistances_GR()) - return self._get_float64_gr_array() + return self._lib.Circuit_Get_AllBusDistances_GR() def BusNames(self) -> List[str]: ''' Array of strings containing names of all buses in circuit (see AllNodeNames). ''' - return self._check_for_error(self._get_string_array(self._lib.Circuit_Get_AllBusNames)) + return self._lib.Circuit_Get_AllBusNames() def BusVMag(self) -> Float64Array: ''' Array of magnitudes (doubles) of voltages at all buses + + Original COM help: https://opendss.epri.com/AllBusVmag.html ''' - self._check_for_error(self._lib.Circuit_Get_AllBusVmag_GR()) - return self._get_float64_gr_array() + return self._lib.Circuit_Get_AllBusVmag_GR() def BusVMagPU(self) -> Float64Array: ''' Array of all bus voltages (each node) magnitudes in Per unit + + Original COM help: https://opendss.epri.com/AllBusVmagPu.html ''' - self._check_for_error(self._lib.Circuit_Get_AllBusVmagPu_GR()) - return self._get_float64_gr_array() + return self._lib.Circuit_Get_AllBusVmagPu_GR() def BusVolts(self) -> ComplexArray: ''' Complex array of all bus, node voltages from most recent solution + + Original COM help: https://opendss.epri.com/AllBusVolts.html ''' - self._check_for_error(self._lib.Circuit_Get_AllBusVolts_GR()) + self._check_for_error(self._api_util.lib_unpatched.Circuit_Get_AllBusVolts_GR(self._api_util.ctx)) return self._get_fcomplex128_gr_array() def NodeDistances(self) -> Float64Array: ''' Returns an array of distances from parent EnergyMeter for each Node. Corresponds to AllBusVMag sequence. + + Original COM help: https://opendss.epri.com/AllNodeDistances.html ''' - self._check_for_error(self._lib.Circuit_Get_AllNodeDistances_GR()) - return self._get_float64_gr_array() + return self._lib.Circuit_Get_AllNodeDistances_GR() def NodeNames(self) -> List[str]: ''' Array of strings containing full name of each node in system in same order as returned by AllBusVolts, etc. + + Original COM help: https://opendss.epri.com/AllNodeNames.html ''' - return self._check_for_error(self._get_string_array(self._lib.Circuit_Get_AllNodeNames)) + return self._lib.Circuit_Get_AllNodeNames() def LineLosses(self) -> complex: ''' Complex total line losses in the circuit + + Original COM help: https://opendss.epri.com/LineLosses.html ''' - self._check_for_error(self._lib.Circuit_Get_LineLosses_GR()) + self._check_for_error(self._api_util.lib_unpatched.Circuit_Get_LineLosses_GR(self._api_util.ctx)) return self._get_fcomplex128_gr_simple() def Losses(self) -> complex: ''' Total losses in active circuit, complex number (two-element array of double). + + Original COM help: https://opendss.epri.com/Losses.html ''' - self._check_for_error(self._lib.Circuit_Get_Losses_GR()) + self._check_for_error(self._api_util.lib_unpatched.Circuit_Get_Losses_GR(self._api_util.ctx)) return self._get_fcomplex128_gr_simple() @property def Name(self) -> str: '''Name of the active circuit.''' - return self._get_string(self._check_for_error(self._lib.Circuit_Get_Name())) + return self._lib.Circuit_Get_Name() @property def NumBuses(self) -> int: - '''Total number of Buses in the circuit.''' - return self._check_for_error(self._lib.Circuit_Get_NumBuses()) + ''' + Total number of Buses in the circuit. + + Original COM help: https://opendss.epri.com/NumBuses.html + ''' + return self._lib.Circuit_Get_NumBuses() @property def NumCircuitElements(self) -> int: - '''Number of CircuitElements in the circuit.''' - return self._check_for_error(self._lib.Circuit_Get_NumCktElements()) + ''' + Number of CktElements in the circuit. + + Original COM help: https://opendss.epri.com/NumCktElements.html + ''' + return self._lib.Circuit_Get_NumCktElements() @property def NumNodes(self) -> int: - '''Total number of nodes in the circuit.''' - return self._check_for_error(self._lib.Circuit_Get_NumNodes()) + ''' + Total number of nodes in the circuit. + + Original COM help: https://opendss.epri.com/NumNodes1.html + ''' + return self._lib.Circuit_Get_NumNodes() @property def SubstationLosses(self) -> complex: - '''Complex losses in all transformers designated to substations.''' - self._check_for_error(self._lib.Circuit_Get_SubstationLosses_GR()) + ''' + Complex losses in all transformers designated to substations. + + Original COM help: https://opendss.epri.com/SubstationLosses.html + ''' + self._check_for_error(self._api_util.lib_unpatched.Circuit_Get_SubstationLosses_GR(self._api_util.ctx)) return self._get_fcomplex128_gr_simple() def SystemY(self, dense=False) -> ComplexArray: @@ -253,10 +277,10 @@ def SystemY(self, dense=False) -> ComplexArray: matrices for small systems. ''' if dense: - self._check_for_error(self._lib.Circuit_Get_SystemY_GR()) - return self._get_fcomplex128_gr_array() + return self._lib.Circuit_Get_SystemY_GR() ffi = self._api_util.ffi + lib = self._api_util.lib_unpatched nBus = ffi.new('uint32_t*') nBus[0] = 0 @@ -267,7 +291,7 @@ def SystemY(self, dense=False) -> ComplexArray: RowIdxPtr = ffi.new('int32_t**') cValsPtr = ffi.new('double**') - self._lib.YMatrix_GetCompressedYMatrix(True, nBus, nNz, ColPtr, RowIdxPtr, cValsPtr) + lib.YMatrix_GetCompressedYMatrix(self._api_util.ctx, True, nBus, nNz, ColPtr, RowIdxPtr, cValsPtr) if not nBus[0] or not nNz[0]: res = None @@ -280,9 +304,9 @@ def SystemY(self, dense=False) -> ComplexArray: np.frombuffer(ffi.buffer(ColPtr[0], (nBus[0] + 1) * 4), dtype=np.int32).copy() )) - self._lib.DSS_Dispose_PInteger(ColPtr) - self._lib.DSS_Dispose_PInteger(RowIdxPtr) - self._lib.DSS_Dispose_PDouble(cValsPtr) + lib.DSS_Dispose_PInteger(ColPtr) + lib.DSS_Dispose_PInteger(RowIdxPtr) + lib.DSS_Dispose_PDouble(cValsPtr) self._check_for_error() @@ -290,22 +314,38 @@ def SystemY(self, dense=False) -> ComplexArray: def TotalPower(self) -> complex: - '''Total power (complex), kVA delivered to the circuit''' - self._check_for_error(self._lib.Circuit_Get_TotalPower_GR()) + ''' + Total power (complex), kVA delivered to the circuit + + Original COM help: https://opendss.epri.com/TotalPower.html + ''' + self._check_for_error(self._api_util.lib_unpatched.Circuit_Get_TotalPower_GR(self._api_util.ctx)) return self._get_fcomplex128_gr_simple() def YCurrents(self) -> ComplexArray: - '''Array of doubles containing complex injection currents for the present solution. It is the "I" vector of I=YV''' - self._check_for_error(self._lib.Circuit_Get_YCurrents_GR()) + ''' + Array of the complex injection currents for the present solution. It is the "I" vector of I=YV + + Original COM help: https://opendss.epri.com/YCurrents.html + ''' + self._check_for_error(self._api_util.lib_unpatched.Circuit_Get_YCurrents_GR(self._api_util.ctx)) return self._get_fcomplex128_gr_array() def YNodeOrder(self) -> List[str]: - '''Array of strings containing the names of the nodes in the same order as the Y matrix''' - return self._check_for_error(self._get_string_array(self._lib.Circuit_Get_YNodeOrder)) + ''' + Array of strings containing the names of the nodes in the same order as the Y matrix + + Original COM help: https://opendss.epri.com/YNodeOrder.html + ''' + return self._lib.Circuit_Get_YNodeOrder() def YNodeVarray(self) -> ComplexArray: - '''Complex array of actual node voltages in same order as SystemY matrix.''' - self._check_for_error(self._lib.Circuit_Get_YNodeVarray_GR()) + ''' + Complex array of actual node voltages in same order as SystemY matrix. + + Original COM help: https://opendss.epri.com/YNodeVarray.html + ''' + self._check_for_error(self._api_util.lib_unpatched.Circuit_Get_YNodeVarray_GR(self._api_util.ctx)) return self._get_fcomplex128_gr_array() def Capacity(self, Start: float, Increment: float) -> float: @@ -324,19 +364,23 @@ def Capacity(self, Start: float, Increment: float) -> float: Original COM help: https://opendss.epri.com/Capacity1.html ''' - return self._check_for_error(self._lib.Circuit_Capacity(Start, Increment)) + return self._lib.Circuit_Capacity(Start, Increment) def TakeSample(self): ''' Force all Meters and Monitors to take a sample. + + Original COM help: https://opendss.epri.com/Sample.html ''' - self._check_for_error(self._lib.Circuit_Sample()) + self._lib.Circuit_Sample() def SaveSample(self): ''' Force all meters and monitors to save their current buffers. + + Original COM help: https://opendss.epri.com/SaveSample.html ''' - self._check_for_error(self._lib.Circuit_SaveSample()) + self._lib.Circuit_SaveSample() def UpdateStorage(self): ''' @@ -346,13 +390,13 @@ def UpdateStorage(self): Original COM help: https://opendss.epri.com/UpdateStorage.html ''' - self._check_for_error(self._lib.Circuit_UpdateStorage()) #TODO: move to the dedicated class/API + self._lib.Circuit_UpdateStorage() #TODO: move to the dedicated class/API def Clear(self): self('clear') def ClearAll(self): - self._check_for_error(self._lib.DSS_ClearAll()) + self._lib.DSS_ClearAll() def to_json(self, options: DSSJSONFlags = 0) -> str: ''' @@ -362,7 +406,7 @@ def to_json(self, options: DSSJSONFlags = 0) -> str: The `options` parameter contains bit-flags to toggle specific features. See `Obj_ToJSON` (C-API) for more, or `DSSObj.to_json` in Python. ''' - return self._get_string(self._check_for_error(self._lib.Circuit_ToJSON(options))) + return self._lib.Circuit_ToJSON(options) def NewContext(self) -> AltDSS: ''' @@ -375,12 +419,11 @@ def NewContext(self) -> AltDSS: ffi = self._api_util.ffi lib = self._api_util.lib_unpatched new_ctx = ffi.gc(lib.ctx_New(), lib.ctx_Dispose) - new_api_util = CffiApiUtil(ffi, lib, new_ctx) - new_api_util._allow_complex = self._api_util._allow_complex + new_api_util = AltDSSAPIUtil(ffi, lib, new_ctx, parent=self._api_util) return type(self)(new_api_util) - def Command(self, value: Optional[AnyStr]) -> Optional[str]: + def Command(self, value: Optional[AnyStr] = None) -> Optional[str]: ''' Input command **string** for the DSS engine. @@ -389,12 +432,9 @@ def Command(self, value: Optional[AnyStr]) -> Optional[str]: Prefer using the `Commands` function or the call operator from this class. ''' if value is None: - return self._get_string(self._check_for_error(self._lib.Text_Get_Command())) - - if not isinstance(value, bytes): - value = value.encode(self._api_util.codec) + return self._lib.Text_Get_Command() - self._check_for_error(self._lib.Text_Set_Command(value)) + self._lib.Text_Set_Command(value) def Commands(self, Value: Union[AnyStr, List[AnyStr]]): @@ -405,22 +445,23 @@ def Commands(self, Value: Union[AnyStr, List[AnyStr]]): Value can be a list of strings, or a single large string (usually faster, but varies). ''' if isinstance(Value, str) or isinstance(Value, bytes): - if not isinstance(Value, bytes): - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.Text_CommandBlock(Value)) + self._lib.Text_CommandBlock(Value) else: - self._check_for_error(self._set_string_array(self._lib.Text_CommandArray, Value)) + self._set_string_array(self._lib.Text_CommandArray, Value) @property def TextResult(self) -> str: - """Result string for the last DSS command (classic `Text.Result`).""" - return self._get_string(self._check_for_error(self._lib.Text_Get_Result())) + """ + Result string for the last DSS command (classic `Text.Result`). + + Original COM help: https://opendss.epri.com/Result.html + """ + return self._lib.Text_Get_Result() def Version(self) -> str: from . import __version__ - return self._get_string(self._check_for_error(self._lib.DSS_Get_Version())) + f'\nAltDSS-Python version: {__version__}' + return self._lib.DSS_Get_Version() + f'\nAltDSS-Python version: {__version__}' def __call__(self, cmds: Union[AnyStr, List[AnyStr]]): diff --git a/altdss/ArrayProxy.py b/altdss/ArrayProxy.py index 95c19ba..48f2a61 100644 --- a/altdss/ArrayProxy.py +++ b/altdss/ArrayProxy.py @@ -1,4 +1,5 @@ import numpy as np +from .enums import BatchOperation class BatchFloat64ArrayProxy: def __init__(self, batch, idx): @@ -51,7 +52,7 @@ def __iadd__(self, other, flags=0): self._lib.Batch_Float64( *ptr_cnt, self._idx, - self._lib.BatchOperation_Increment, + BatchOperation.Increment, other, flags ) @@ -64,7 +65,7 @@ def __iadd__(self, other, flags=0): batch._lib.Batch_Float64Array( *ptr_cnt, self._idx, - self._lib.BatchOperation_Increment, + BatchOperation.Increment, data_ptr, flags ) @@ -91,7 +92,7 @@ def __imul__(self, other, flags=0): self._lib.Batch_Float64( *ptr_cnt, self._idx, - self._lib.BatchOperation_Multiply, + BatchOperation.Multiply, other, flags ) @@ -104,7 +105,7 @@ def __imul__(self, other, flags=0): batch._lib.Batch_Float64Array( *ptr_cnt, self._idx, - self._lib.BatchOperation_Multiply, + BatchOperation.Multiply, data_ptr, flags ) @@ -123,7 +124,7 @@ def __itruediv__(self, other, flags=0): self._lib.Batch_Float64( *ptr_cnt, self._idx, - self._lib.BatchOperation_Divide, + BatchOperation.Divide, other, flags ) @@ -136,7 +137,7 @@ def __itruediv__(self, other, flags=0): batch._lib.Batch_Float64Array( *ptr_cnt, self._idx, - self._lib.BatchOperation_Divide, + BatchOperation.Divide, data_ptr, flags ) @@ -202,7 +203,7 @@ def __iadd__(self, other, flags=0): self._lib.Batch_Int32( *ptr_cnt, self._idx, - self._lib.BatchOperation_Increment, + BatchOperation.Increment, other, flags ) @@ -215,7 +216,7 @@ def __iadd__(self, other, flags=0): batch._lib.Batch_Int32Array( *ptr_cnt, self._idx, - self._lib.BatchOperation_Increment, + BatchOperation.Increment, data_ptr, flags ) @@ -242,7 +243,7 @@ def __imul__(self, other, flags=0): self._lib.Batch_Int32( *ptr_cnt, self._idx, - self._lib.BatchOperation_Multiply, + BatchOperation.Multiply, other, flags ) @@ -255,7 +256,7 @@ def __imul__(self, other, flags=0): batch._lib.Batch_Int32Array( *ptr_cnt, self._idx, - self._lib.BatchOperation_Multiply, + BatchOperation.Multiply, data_ptr, flags ) @@ -274,7 +275,7 @@ def __ifloordiv__(self, other, flags=0): self._lib.Batch_Int32( *ptr_cnt, self._idx, - self._lib.BatchOperation_Divide, + BatchOperation.Divide, other, flags ) @@ -287,7 +288,7 @@ def __ifloordiv__(self, other, flags=0): self._lib.Batch_Int32Array( *ptr_cnt, self._idx, - self._lib.BatchOperation_Divide, + BatchOperation.Divide, data_ptr, flags ) diff --git a/altdss/AutoTrans.py b/altdss/AutoTrans.py index 0df05be..415d8b7 100644 --- a/altdss/AutoTrans.py +++ b/altdss/AutoTrans.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -16,7 +16,7 @@ class AutoTrans(DSSObj, CircuitElementMixin, PDElementMixin, TransformerObjMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PDElementMixin._extra_slots + TransformerObjMixin._extra_slots _cls_name = 'AutoTrans' - _cls_idx = 41 + _cls_idx = 42 _cls_int_idx = { 1, 2, @@ -26,7 +26,8 @@ class AutoTrans(DSSObj, CircuitElementMixin, PDElementMixin, TransformerObjMixin 33, 39, 40, - 48, + 42, + 51, } _cls_float_idx = { 6, @@ -50,12 +51,12 @@ class AutoTrans(DSSObj, CircuitElementMixin, PDElementMixin, TransformerObjMixin 32, 35, 36, - 42, - 43, - 44, 45, 46, 47, + 48, + 49, + 50, } _cls_prop_idx = { 'phases': 1, @@ -104,14 +105,17 @@ class AutoTrans(DSSObj, CircuitElementMixin, PDElementMixin, TransformerObjMixin 'xrconst': 39, 'leadlag': 40, 'wdgcurrents': 41, - 'normamps': 42, - 'emergamps': 43, - 'faultrate': 44, - 'pctperm': 45, - 'repair': 46, - 'basefreq': 47, - 'enabled': 48, - 'like': 49, + 'bhpoints': 42, + 'bhcurrent': 43, + 'bhflux': 44, + 'normamps': 45, + 'emergamps': 46, + 'faultrate': 47, + 'pctperm': 48, + 'repair': 49, + 'basefreq': 50, + 'enabled': 51, + 'like': 52, } def __init__(self, api_util, ptr): @@ -145,9 +149,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of phases this AutoTrans. Default is 3. + Number of phases this AutoTrans. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Windings(self) -> int: @@ -158,9 +163,9 @@ def _set_Windings(self, value: int, flags: enums.SetterFlags = 0): Windings = property(_get_Windings, _set_Windings) # type: int """ - Number of windings, this AutoTrans. (Also is the number of terminals) Default is 2. This property triggers memory allocation for the AutoTrans and will cause other properties to revert to default values. + Number of windings, this AutoTrans. (Also is the number of terminals) This property triggers memory allocation for the AutoTrans and will cause other properties to revert to default values. - DSS property name: `Windings`, DSS property index: 2. + Name: `Windings` """ def _get_pctR(self) -> Float64Array: @@ -173,7 +178,8 @@ def _set_pctR(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Percent ac resistance this winding. This value is for the power flow model.Is derived from the full load losses in the transformer test report. - DSS property name: `%R`, DSS property index: 9. + Name: `%R` + Default: [0.2, 0.2] """ def _get_RDCOhms(self) -> Float64Array: @@ -186,7 +192,8 @@ def _set_RDCOhms(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Winding dc resistance in OHMS. Specify this for GIC analysis. From transformer test report (divide by number of phases). Defaults to 85% of %R property (the ac value that includes stray losses). - DSS property name: `RDCOhms`, DSS property index: 10. + Name: `RDCOhms` + Default: [5.957027176666669, 0.0881171766666667] """ def _get_Core(self) -> enums.CoreType: @@ -200,9 +207,10 @@ def _set_Core(self, value: Union[AnyStr, int, enums.CoreType], flags: enums.Sett Core = property(_get_Core, _set_Core) # type: enums.CoreType """ - {Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. Used for GIC analysis in auxiliary programs. Not used inside OpenDSS. + Core Type. Used for GIC analysis in auxiliary programs. Not used inside OpenDSS. - DSS property name: `Core`, DSS property index: 11. + Name: `Core` + Default: shell """ def _get_Core_str(self) -> str: @@ -213,9 +221,10 @@ def _set_Core_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Core_str = property(_get_Core_str, _set_Core_str) # type: str """ - {Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. Used for GIC analysis in auxiliary programs. Not used inside OpenDSS. + Core Type. Used for GIC analysis in auxiliary programs. Not used inside OpenDSS. - DSS property name: `Core`, DSS property index: 11. + Name: `Core` + Default: shell """ def _get_Buses(self) -> List[str]: @@ -232,7 +241,7 @@ def _set_Buses(self, value: List[AnyStr], flags: enums.SetterFlags = 0): New AutoTrans.T1 buses=[Hbus, Xbus] - DSS property name: `Buses`, DSS property index: 12. + Name: `Buses` """ def _get_Conns(self) -> List[enums.AutoTransConnection]: @@ -250,13 +259,14 @@ def _set_Conns(self, value: Union[List[Union[int, enums.AutoTransConnection]], L New AutoTrans.T1 buses=[Hbus, Xbus] ~ conns=(series, wye) - DSS property name: `Conns`, DSS property index: 13. + Name: `Conns` + Default: ['Series', 'Wye'] """ def _get_Conns_str(self) -> List[str]: return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 13) - def _set_Conns_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + def _set_Conns_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): self._set_Conns(value, flags) Conns_str = property(_get_Conns_str, _set_Conns_str) # type: List[str] @@ -265,7 +275,8 @@ def _set_Conns_str(self, value: AnyStr, flags: enums.SetterFlags = 0): New AutoTrans.T1 buses=[Hbus, Xbus] ~ conns=(series, wye) - DSS property name: `Conns`, DSS property index: 13. + Name: `Conns` + Default: ['Series', 'Wye'] """ def _get_kVs(self) -> Float64Array: @@ -284,7 +295,8 @@ def _set_kVs(self, value: Float64Array, flags: enums.SetterFlags = 0): See kV= property for voltage rules. - DSS property name: `kVs`, DSS property index: 14. + Name: `kVs` + Default: [115.0, 12.47] """ def _get_kVAs(self) -> Float64Array: @@ -297,7 +309,8 @@ def _set_kVAs(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Use this to specify the kVA ratings of all windings at once using an array. - DSS property name: `kVAs`, DSS property index: 15. + Name: `kVAs` + Default: [1000.0, 1000.0] """ def _get_Taps(self) -> Float64Array: @@ -310,7 +323,8 @@ def _set_Taps(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Use this to specify the p.u. tap of all windings at once using an array. - DSS property name: `Taps`, DSS property index: 16. + Name: `Taps` + Default: [1.0, 1.0] """ def _get_XHX(self) -> float: @@ -323,7 +337,8 @@ def _set_XHX(self, value: float, flags: enums.SetterFlags = 0): """ Use this to specify the percent reactance, H-L (winding 1 to winding 2). Use for 2- or 3-winding AutoTranss. On the kVA base of winding 1(H-X). - DSS property name: `XHX`, DSS property index: 17. + Name: `XHX` + Default: 10.0 """ def _get_XHT(self) -> float: @@ -336,7 +351,8 @@ def _set_XHT(self, value: float, flags: enums.SetterFlags = 0): """ Use this to specify the percent reactance, H-T (winding 1 to winding 3). Use for 3-winding AutoTranss only. On the kVA base of winding 1(H-X). - DSS property name: `XHT`, DSS property index: 18. + Name: `XHT` + Default: 35.0 """ def _get_XXT(self) -> float: @@ -349,7 +365,8 @@ def _set_XXT(self, value: float, flags: enums.SetterFlags = 0): """ Use this to specify the percent reactance, L-T (winding 2 to winding 3). Use for 3-winding AutoTranss only. On the kVA base of winding 1(H-X). - DSS property name: `XXT`, DSS property index: 19. + Name: `XXT` + Default: 30.0 """ def _get_XSCArray(self) -> Float64Array: @@ -366,7 +383,8 @@ def _set_XSCArray(self, value: Float64Array, flags: enums.SetterFlags = 0): There will be n(n-1)/2 values, where n=number of windings. - DSS property name: `XSCArray`, DSS property index: 20. + Name: `XSCArray` + Default: [10.0] """ def _get_Thermal(self) -> float: @@ -377,9 +395,13 @@ def _set_Thermal(self, value: float, flags: enums.SetterFlags = 0): Thermal = property(_get_Thermal, _set_Thermal) # type: float """ - Thermal time constant of the AutoTrans in hours. Typically about 2. + Thermal time constant of the AutoTrans. Typically about 2. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `Thermal`, DSS property index: 21. + Name: `Thermal` + Units: hour + Default: 2.0 """ def _get_n(self) -> float: @@ -392,7 +414,10 @@ def _set_n(self, value: float, flags: enums.SetterFlags = 0): """ n Exponent for thermal properties in IEEE C57. Typically 0.8. - DSS property name: `n`, DSS property index: 22. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `n` + Default: 0.8 """ def _get_m(self) -> float: @@ -405,7 +430,10 @@ def _set_m(self, value: float, flags: enums.SetterFlags = 0): """ m Exponent for thermal properties in IEEE C57. Typically 0.9 - 1.0 - DSS property name: `m`, DSS property index: 23. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `m` + Default: 0.8 """ def _get_FLRise(self) -> float: @@ -416,9 +444,13 @@ def _set_FLRise(self, value: float, flags: enums.SetterFlags = 0): FLRise = property(_get_FLRise, _set_FLRise) # type: float """ - Temperature rise, deg C, for full load. Default is 65. + Temperature rise for full load. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `FLRise`, DSS property index: 24. + Name: `FLRise` + Units: °C + Default: 65.0 """ def _get_HSRise(self) -> float: @@ -429,9 +461,13 @@ def _set_HSRise(self, value: float, flags: enums.SetterFlags = 0): HSRise = property(_get_HSRise, _set_HSRise) # type: float """ - Hot spot temperature rise, deg C. Default is 15. + Hot spot temperature rise + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `HSRise`, DSS property index: 25. + Name: `HSRise` + Units: °C + Default: 15.0 """ def _get_pctLoadLoss(self) -> float: @@ -444,7 +480,8 @@ def _set_pctLoadLoss(self, value: float, flags: enums.SetterFlags = 0): """ Percent load loss at full load. The %R of the High and Low windings (1 and 2) are adjusted to agree at rated kVA loading. - DSS property name: `%LoadLoss`, DSS property index: 26. + Name: `%LoadLoss` + Default: 0.4 """ def _get_pctNoLoadLoss(self) -> float: @@ -455,9 +492,10 @@ def _set_pctNoLoadLoss(self, value: float, flags: enums.SetterFlags = 0): pctNoLoadLoss = property(_get_pctNoLoadLoss, _set_pctNoLoadLoss) # type: float """ - Percent no load losses at rated excitation voltage. Default is 0. Converts to a resistance in parallel with the magnetizing impedance in each winding. + Percent no load losses at rated excitation voltage. Converts to a resistance in parallel with the magnetizing impedance in each winding. - DSS property name: `%NoLoadLoss`, DSS property index: 27. + Name: `%NoLoadLoss` + Default: 0.0 """ def _get_NormHkVA(self) -> float: @@ -470,7 +508,8 @@ def _set_NormHkVA(self, value: float, flags: enums.SetterFlags = 0): """ Normal maximum kVA rating of H winding (winding 1+2). Usually 100% - 110% of maximum nameplate rating, depending on load shape. Defaults to 110% of kVA rating of Winding 1. - DSS property name: `NormHkVA`, DSS property index: 28. + Name: `NormHkVA` + Units: kVA """ def _get_EmergHkVA(self) -> float: @@ -483,7 +522,8 @@ def _set_EmergHkVA(self, value: float, flags: enums.SetterFlags = 0): """ Emergency (contingency) kVA rating of H winding (winding 1+2). Usually 140% - 150% of maximum nameplate rating, depending on load shape. Defaults to 150% of kVA rating of Winding 1. - DSS property name: `EmergHkVA`, DSS property index: 29. + Name: `EmergHkVA` + Units: kVA """ def _get_Sub(self) -> bool: @@ -494,9 +534,10 @@ def _set_Sub(self, value: bool, flags: enums.SetterFlags = 0): Sub = property(_get_Sub, _set_Sub) # type: bool """ - ={Yes|No} Designates whether this AutoTrans is to be considered a substation.Default is No. + Designates whether this AutoTrans is to be considered a substation. - DSS property name: `Sub`, DSS property index: 30. + Name: `Sub` + Default: False """ def _get_MaxTap(self) -> Float64Array: @@ -507,9 +548,10 @@ def _set_MaxTap(self, value: Float64Array, flags: enums.SetterFlags = 0): MaxTap = property(_get_MaxTap, _set_MaxTap) # type: Float64Array """ - Max per unit tap for the active winding. Default is 1.10 + Max per unit tap for the active winding. - DSS property name: `MaxTap`, DSS property index: 31. + Name: `MaxTap` + Default: [1.1, 1.1] """ def _get_MinTap(self) -> Float64Array: @@ -520,9 +562,10 @@ def _set_MinTap(self, value: Float64Array, flags: enums.SetterFlags = 0): MinTap = property(_get_MinTap, _set_MinTap) # type: Float64Array """ - Min per unit tap for the active winding. Default is 0.90 + Min per unit tap for the active winding. - DSS property name: `MinTap`, DSS property index: 32. + Name: `MinTap` + Default: [0.9, 0.9] """ def _get_NumTaps(self) -> Int32Array: @@ -533,9 +576,10 @@ def _set_NumTaps(self, value: Int32Array, flags: enums.SetterFlags = 0): NumTaps = property(_get_NumTaps, _set_NumTaps) # type: Int32Array """ - Total number of taps between min and max tap. Default is 32 (16 raise and 16 lower taps about the neutral position). The neutral position is not counted. + Total number of taps between min and max tap. Default is 32 (16 raise and 16 lower taps about the neutral position). The neutral position is not counted. - DSS property name: `NumTaps`, DSS property index: 33. + Name: `NumTaps` + Default: [32, 32] """ def _get_SubName(self) -> str: @@ -546,9 +590,9 @@ def _set_SubName(self, value: AnyStr, flags: enums.SetterFlags = 0): SubName = property(_get_SubName, _set_SubName) # type: str """ - Substation Name. Optional. Default is null. If specified, printed on plots + Substation Name. Optional. If specified, printed on plots - DSS property name: `SubName`, DSS property index: 34. + Name: `SubName` """ def _get_pctIMag(self) -> float: @@ -559,9 +603,10 @@ def _set_pctIMag(self, value: float, flags: enums.SetterFlags = 0): pctIMag = property(_get_pctIMag, _set_pctIMag) # type: float """ - Percent magnetizing current. Default=0.0. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". + Percent magnetizing current. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". - DSS property name: `%IMag`, DSS property index: 35. + Name: `%IMag` + Default: 0.0 """ def _get_ppm_Antifloat(self) -> float: @@ -574,7 +619,8 @@ def _set_ppm_Antifloat(self, value: float, flags: enums.SetterFlags = 0): """ Default=1 ppm. Parts per million of AutoTrans winding VA rating connected to ground to protect against accidentally floating a winding without a reference. If positive then the effect is adding a very large reactance to ground. If negative, then a capacitor. - DSS property name: `ppm_Antifloat`, DSS property index: 36. + Name: `ppm_Antifloat` + Default: 1.0 """ def _get_pctRs(self) -> Float64Array: @@ -589,7 +635,8 @@ def _set_pctRs(self, value: Float64Array, flags: enums.SetterFlags = 0): New AutoTrans.T1 buses=[Hibus, lowbus] ~ %Rs=(0.2 0.3) - DSS property name: `%Rs`, DSS property index: 37. + Name: `%Rs` + Default: [0.2, 0.2] """ def _get_Bank(self) -> str: @@ -602,7 +649,9 @@ def _set_Bank(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of the bank this transformer is part of, for CIM, MultiSpeak, and other interfaces. - DSS property name: `Bank`, DSS property index: 38. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `Bank` """ def _get_XRConst(self) -> bool: @@ -613,9 +662,10 @@ def _set_XRConst(self, value: bool, flags: enums.SetterFlags = 0): XRConst = property(_get_XRConst, _set_XRConst) # type: bool """ - ={Yes|No} Default is NO. Signifies whether or not the X/R is assumed constant for harmonic studies. + Signifies whether or not the X/R is assumed constant for harmonic studies. - DSS property name: `XRConst`, DSS property index: 39. + Name: `XRConst` + Default: False """ def _get_LeadLag(self) -> enums.PhaseSequence: @@ -631,7 +681,8 @@ def _set_LeadLag(self, value: Union[AnyStr, int, enums.PhaseSequence], flags: en """ {Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro" - DSS property name: `LeadLag`, DSS property index: 40. + Name: `LeadLag` + Default: Lag """ def _get_LeadLag_str(self) -> str: @@ -644,98 +695,154 @@ def _set_LeadLag_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ {Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro" - DSS property name: `LeadLag`, DSS property index: 40. + Name: `LeadLag` + Default: Lag + """ + + def _get_BHPoints(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 42) + + def _set_BHPoints(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 42, value, flags) + + BHPoints = property(_get_BHPoints, _set_BHPoints) # type: int + """ + Number of points in BH curve expected from `BHCurrent` and `BHFlux` arrays. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHPoints` + Default: 0 + """ + + def _get_BHCurrent(self) -> Float64Array: + return self._get_float64_array(self._lib.Obj_GetFloat64Array, self._ptr, 43) + + def _set_BHCurrent(self, value: Float64Array, flags: enums.SetterFlags = 0): + self._set_float64_array_o(43, value, flags) + + BHCurrent = property(_get_BHCurrent, _set_BHCurrent) # type: Float64Array + """ + Array of current values in per-unit. The array is expected to have the number of entries defined by `BHPoints`. Together with `BHFlux`, they form the BH curve of the transformer. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHCurrent` + """ + + def _get_BHFlux(self) -> Float64Array: + return self._get_float64_array(self._lib.Obj_GetFloat64Array, self._ptr, 44) + + def _set_BHFlux(self, value: Float64Array, flags: enums.SetterFlags = 0): + self._set_float64_array_o(44, value, flags) + + BHFlux = property(_get_BHFlux, _set_BHFlux) # type: Float64Array + """ + Array of flux values in per-unit. The array is expected to have the number of entries defined by `BHPoints`. Together with `BHCurrent`, they form the BH curve of the transformer. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHFlux` """ def _get_NormAmps(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 42) + return self._lib.Obj_GetFloat64(self._ptr, 45) def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 42, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 45, value, flags) NormAmps = property(_get_NormAmps, _set_NormAmps) # type: float """ - Normal rated current. + Normal rated current. Use `NormHkVA` to specify the normal rating for the transformer. - DSS property name: `NormAmps`, DSS property index: 42. + **Read-only** + + Name: `NormAmps` """ def _get_EmergAmps(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 43) + return self._lib.Obj_GetFloat64(self._ptr, 46) def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 43, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 46, value, flags) EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: float """ - Maximum or emerg current. + Maximum or emergency current. Use `EmergHkVA` to specify the normal rating for the transformer. - DSS property name: `EmergAmps`, DSS property index: 43. + **Read-only** + + Name: `EmergAmps` """ def _get_FaultRate(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 44) + return self._lib.Obj_GetFloat64(self._ptr, 47) def _set_FaultRate(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 44, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 47, value, flags) FaultRate = property(_get_FaultRate, _set_FaultRate) # type: float """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 44. + Name: `FaultRate` + Default: 0.007 """ def _get_pctPerm(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 45) + return self._lib.Obj_GetFloat64(self._ptr, 48) def _set_pctPerm(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 45, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 48, value, flags) pctPerm = property(_get_pctPerm, _set_pctPerm) # type: float """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 45. + Name: `pctPerm` + Default: 0.0 """ def _get_Repair(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 46) + return self._lib.Obj_GetFloat64(self._ptr, 49) def _set_Repair(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 46, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 49, value, flags) Repair = property(_get_Repair, _set_Repair) # type: float """ Hours to repair. - DSS property name: `Repair`, DSS property index: 46. + Name: `Repair` + Default: 0.0 """ def _get_BaseFreq(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 47) + return self._lib.Obj_GetFloat64(self._ptr, 50) def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 47, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 50, value, flags) BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: float """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 47. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: - return self._lib.Obj_GetInt32(self._ptr, 48) != 0 + return self._lib.Obj_GetInt32(self._ptr, 51) != 0 def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): - self._lib.Obj_SetInt32(self._ptr, 48, value, flags) + self._lib.Obj_SetInt32(self._ptr, 51, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 48. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -744,9 +851,11 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 49. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_string_o(49, value) + self._set_string_o(52, value) class AutoTransProperties(TypedDict): @@ -784,6 +893,9 @@ class AutoTransProperties(TypedDict): Bank: AnyStr XRConst: bool LeadLag: Union[AnyStr, int, enums.PhaseSequence] + BHPoints: int + BHCurrent: Float64Array + BHFlux: Float64Array NormAmps: float EmergAmps: float FaultRate: float @@ -796,7 +908,7 @@ class AutoTransProperties(TypedDict): class AutoTransBatch(DSSBatch, CircuitElementBatchMixin, PDElementBatchMixin): _cls_name = 'AutoTrans' _obj_cls = AutoTrans - _cls_idx = 41 + _cls_idx = 42 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -833,9 +945,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of phases this AutoTrans. Default is 3. + Number of phases this AutoTrans. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Windings(self) -> BatchInt32ArrayProxy: @@ -846,9 +959,9 @@ def _set_Windings(self, value: Union[int, Int32Array], flags: enums.SetterFlags Windings = property(_get_Windings, _set_Windings) # type: BatchInt32ArrayProxy """ - Number of windings, this AutoTrans. (Also is the number of terminals) Default is 2. This property triggers memory allocation for the AutoTrans and will cause other properties to revert to default values. + Number of windings, this AutoTrans. (Also is the number of terminals) This property triggers memory allocation for the AutoTrans and will cause other properties to revert to default values. - DSS property name: `Windings`, DSS property index: 2. + Name: `Windings` """ def _get_pctR(self) -> List[Float64Array]: @@ -864,7 +977,8 @@ def _set_pctR(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Percent ac resistance this winding. This value is for the power flow model.Is derived from the full load losses in the transformer test report. - DSS property name: `%R`, DSS property index: 9. + Name: `%R` + Default: [0.2, 0.2] """ def _get_RDCOhms(self) -> List[Float64Array]: @@ -880,7 +994,8 @@ def _set_RDCOhms(self, value: Union[Float64Array, List[Float64Array]], flags: en """ Winding dc resistance in OHMS. Specify this for GIC analysis. From transformer test report (divide by number of phases). Defaults to 85% of %R property (the ac value that includes stray losses). - DSS property name: `RDCOhms`, DSS property index: 10. + Name: `RDCOhms` + Default: [5.957027176666669, 0.0881171766666667] """ def _get_Core(self) -> BatchInt32ArrayProxy: @@ -895,9 +1010,10 @@ def _set_Core(self, value: Union[AnyStr, int, enums.CoreType, List[AnyStr], List Core = property(_get_Core, _set_Core) # type: BatchInt32ArrayProxy """ - {Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. Used for GIC analysis in auxiliary programs. Not used inside OpenDSS. + Core Type. Used for GIC analysis in auxiliary programs. Not used inside OpenDSS. - DSS property name: `Core`, DSS property index: 11. + Name: `Core` + Default: shell """ def _get_Core_str(self) -> List[str]: @@ -908,9 +1024,10 @@ def _set_Core_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Core_str = property(_get_Core_str, _set_Core_str) # type: List[str] """ - {Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. Used for GIC analysis in auxiliary programs. Not used inside OpenDSS. + Core Type. Used for GIC analysis in auxiliary programs. Not used inside OpenDSS. - DSS property name: `Core`, DSS property index: 11. + Name: `Core` + Default: shell """ def _get_Buses(self) -> List[List[str]]: @@ -929,7 +1046,7 @@ def _set_Buses(self, value: List[AnyStr], flags: enums.SetterFlags = 0): New AutoTrans.T1 buses=[Hbus, Xbus] - DSS property name: `Buses`, DSS property index: 12. + Name: `Buses` """ def _get_Conns(self) -> List[Int32Array]: @@ -955,7 +1072,8 @@ def _set_Conns(self, value: Union[List[Union[int, enums.AutoTransConnection]], L New AutoTrans.T1 buses=[Hbus, Xbus] ~ conns=(series, wye) - DSS property name: `Conns`, DSS property index: 13. + Name: `Conns` + Default: ['Series', 'Wye'] """ def _get_Conns_str(self) -> List[List[str]]: @@ -970,7 +1088,8 @@ def _set_Conns_str(self, value: AnyStr, flags: enums.SetterFlags = 0): New AutoTrans.T1 buses=[Hbus, Xbus] ~ conns=(series, wye) - DSS property name: `Conns`, DSS property index: 13. + Name: `Conns` + Default: ['Series', 'Wye'] """ def _get_kVs(self) -> List[Float64Array]: @@ -992,7 +1111,8 @@ def _set_kVs(self, value: Union[Float64Array, List[Float64Array]], flags: enums. See kV= property for voltage rules. - DSS property name: `kVs`, DSS property index: 14. + Name: `kVs` + Default: [115.0, 12.47] """ def _get_kVAs(self) -> List[Float64Array]: @@ -1008,7 +1128,8 @@ def _set_kVAs(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Use this to specify the kVA ratings of all windings at once using an array. - DSS property name: `kVAs`, DSS property index: 15. + Name: `kVAs` + Default: [1000.0, 1000.0] """ def _get_Taps(self) -> List[Float64Array]: @@ -1024,7 +1145,8 @@ def _set_Taps(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Use this to specify the p.u. tap of all windings at once using an array. - DSS property name: `Taps`, DSS property index: 16. + Name: `Taps` + Default: [1.0, 1.0] """ def _get_XHX(self) -> BatchFloat64ArrayProxy: @@ -1037,7 +1159,8 @@ def _set_XHX(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Use this to specify the percent reactance, H-L (winding 1 to winding 2). Use for 2- or 3-winding AutoTranss. On the kVA base of winding 1(H-X). - DSS property name: `XHX`, DSS property index: 17. + Name: `XHX` + Default: 10.0 """ def _get_XHT(self) -> BatchFloat64ArrayProxy: @@ -1050,7 +1173,8 @@ def _set_XHT(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Use this to specify the percent reactance, H-T (winding 1 to winding 3). Use for 3-winding AutoTranss only. On the kVA base of winding 1(H-X). - DSS property name: `XHT`, DSS property index: 18. + Name: `XHT` + Default: 35.0 """ def _get_XXT(self) -> BatchFloat64ArrayProxy: @@ -1063,7 +1187,8 @@ def _set_XXT(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Use this to specify the percent reactance, L-T (winding 2 to winding 3). Use for 3-winding AutoTranss only. On the kVA base of winding 1(H-X). - DSS property name: `XXT`, DSS property index: 19. + Name: `XXT` + Default: 30.0 """ def _get_XSCArray(self) -> List[Float64Array]: @@ -1083,7 +1208,8 @@ def _set_XSCArray(self, value: Union[Float64Array, List[Float64Array]], flags: e There will be n(n-1)/2 values, where n=number of windings. - DSS property name: `XSCArray`, DSS property index: 20. + Name: `XSCArray` + Default: [10.0] """ def _get_Thermal(self) -> BatchFloat64ArrayProxy: @@ -1094,9 +1220,13 @@ def _set_Thermal(self, value: Union[float, Float64Array], flags: enums.SetterFla Thermal = property(_get_Thermal, _set_Thermal) # type: BatchFloat64ArrayProxy """ - Thermal time constant of the AutoTrans in hours. Typically about 2. + Thermal time constant of the AutoTrans. Typically about 2. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `Thermal`, DSS property index: 21. + Name: `Thermal` + Units: hour + Default: 2.0 """ def _get_n(self) -> BatchFloat64ArrayProxy: @@ -1109,7 +1239,10 @@ def _set_n(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ n Exponent for thermal properties in IEEE C57. Typically 0.8. - DSS property name: `n`, DSS property index: 22. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `n` + Default: 0.8 """ def _get_m(self) -> BatchFloat64ArrayProxy: @@ -1122,7 +1255,10 @@ def _set_m(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ m Exponent for thermal properties in IEEE C57. Typically 0.9 - 1.0 - DSS property name: `m`, DSS property index: 23. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `m` + Default: 0.8 """ def _get_FLRise(self) -> BatchFloat64ArrayProxy: @@ -1133,9 +1269,13 @@ def _set_FLRise(self, value: Union[float, Float64Array], flags: enums.SetterFlag FLRise = property(_get_FLRise, _set_FLRise) # type: BatchFloat64ArrayProxy """ - Temperature rise, deg C, for full load. Default is 65. + Temperature rise for full load. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `FLRise`, DSS property index: 24. + Name: `FLRise` + Units: °C + Default: 65.0 """ def _get_HSRise(self) -> BatchFloat64ArrayProxy: @@ -1146,9 +1286,13 @@ def _set_HSRise(self, value: Union[float, Float64Array], flags: enums.SetterFlag HSRise = property(_get_HSRise, _set_HSRise) # type: BatchFloat64ArrayProxy """ - Hot spot temperature rise, deg C. Default is 15. + Hot spot temperature rise - DSS property name: `HSRise`, DSS property index: 25. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `HSRise` + Units: °C + Default: 15.0 """ def _get_pctLoadLoss(self) -> BatchFloat64ArrayProxy: @@ -1161,7 +1305,8 @@ def _set_pctLoadLoss(self, value: Union[float, Float64Array], flags: enums.Sette """ Percent load loss at full load. The %R of the High and Low windings (1 and 2) are adjusted to agree at rated kVA loading. - DSS property name: `%LoadLoss`, DSS property index: 26. + Name: `%LoadLoss` + Default: 0.4 """ def _get_pctNoLoadLoss(self) -> BatchFloat64ArrayProxy: @@ -1172,9 +1317,10 @@ def _set_pctNoLoadLoss(self, value: Union[float, Float64Array], flags: enums.Set pctNoLoadLoss = property(_get_pctNoLoadLoss, _set_pctNoLoadLoss) # type: BatchFloat64ArrayProxy """ - Percent no load losses at rated excitation voltage. Default is 0. Converts to a resistance in parallel with the magnetizing impedance in each winding. + Percent no load losses at rated excitation voltage. Converts to a resistance in parallel with the magnetizing impedance in each winding. - DSS property name: `%NoLoadLoss`, DSS property index: 27. + Name: `%NoLoadLoss` + Default: 0.0 """ def _get_NormHkVA(self) -> BatchFloat64ArrayProxy: @@ -1187,7 +1333,8 @@ def _set_NormHkVA(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Normal maximum kVA rating of H winding (winding 1+2). Usually 100% - 110% of maximum nameplate rating, depending on load shape. Defaults to 110% of kVA rating of Winding 1. - DSS property name: `NormHkVA`, DSS property index: 28. + Name: `NormHkVA` + Units: kVA """ def _get_EmergHkVA(self) -> BatchFloat64ArrayProxy: @@ -1200,7 +1347,8 @@ def _set_EmergHkVA(self, value: Union[float, Float64Array], flags: enums.SetterF """ Emergency (contingency) kVA rating of H winding (winding 1+2). Usually 140% - 150% of maximum nameplate rating, depending on load shape. Defaults to 150% of kVA rating of Winding 1. - DSS property name: `EmergHkVA`, DSS property index: 29. + Name: `EmergHkVA` + Units: kVA """ def _get_Sub(self) -> List[bool]: @@ -1208,14 +1356,15 @@ def _get_Sub(self) -> List[bool]: self._get_batch_int32_prop(30) ] - def _set_Sub(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Sub(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(30, value, flags) Sub = property(_get_Sub, _set_Sub) # type: List[bool] """ - ={Yes|No} Designates whether this AutoTrans is to be considered a substation.Default is No. + Designates whether this AutoTrans is to be considered a substation. - DSS property name: `Sub`, DSS property index: 30. + Name: `Sub` + Default: False """ def _get_MaxTap(self) -> List[Float64Array]: @@ -1229,9 +1378,10 @@ def _set_MaxTap(self, value: Union[Float64Array, List[Float64Array]], flags: enu MaxTap = property(_get_MaxTap, _set_MaxTap) # type: List[Float64Array] """ - Max per unit tap for the active winding. Default is 1.10 + Max per unit tap for the active winding. - DSS property name: `MaxTap`, DSS property index: 31. + Name: `MaxTap` + Default: [1.1, 1.1] """ def _get_MinTap(self) -> List[Float64Array]: @@ -1245,9 +1395,10 @@ def _set_MinTap(self, value: Union[Float64Array, List[Float64Array]], flags: enu MinTap = property(_get_MinTap, _set_MinTap) # type: List[Float64Array] """ - Min per unit tap for the active winding. Default is 0.90 + Min per unit tap for the active winding. - DSS property name: `MinTap`, DSS property index: 32. + Name: `MinTap` + Default: [0.9, 0.9] """ def _get_NumTaps(self) -> List[Int32Array]: @@ -1261,9 +1412,10 @@ def _set_NumTaps(self, value: Union[Int32Array, List[Int32Array]], flags: enums. NumTaps = property(_get_NumTaps, _set_NumTaps) # type: List[Int32Array] """ - Total number of taps between min and max tap. Default is 32 (16 raise and 16 lower taps about the neutral position). The neutral position is not counted. + Total number of taps between min and max tap. Default is 32 (16 raise and 16 lower taps about the neutral position). The neutral position is not counted. - DSS property name: `NumTaps`, DSS property index: 33. + Name: `NumTaps` + Default: [32, 32] """ def _get_SubName(self) -> List[str]: @@ -1274,9 +1426,9 @@ def _set_SubName(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl SubName = property(_get_SubName, _set_SubName) # type: List[str] """ - Substation Name. Optional. Default is null. If specified, printed on plots + Substation Name. Optional. If specified, printed on plots - DSS property name: `SubName`, DSS property index: 34. + Name: `SubName` """ def _get_pctIMag(self) -> BatchFloat64ArrayProxy: @@ -1287,9 +1439,10 @@ def _set_pctIMag(self, value: Union[float, Float64Array], flags: enums.SetterFla pctIMag = property(_get_pctIMag, _set_pctIMag) # type: BatchFloat64ArrayProxy """ - Percent magnetizing current. Default=0.0. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". + Percent magnetizing current. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". - DSS property name: `%IMag`, DSS property index: 35. + Name: `%IMag` + Default: 0.0 """ def _get_ppm_Antifloat(self) -> BatchFloat64ArrayProxy: @@ -1302,7 +1455,8 @@ def _set_ppm_Antifloat(self, value: Union[float, Float64Array], flags: enums.Set """ Default=1 ppm. Parts per million of AutoTrans winding VA rating connected to ground to protect against accidentally floating a winding without a reference. If positive then the effect is adding a very large reactance to ground. If negative, then a capacitor. - DSS property name: `ppm_Antifloat`, DSS property index: 36. + Name: `ppm_Antifloat` + Default: 1.0 """ def _get_pctRs(self) -> List[Float64Array]: @@ -1320,7 +1474,8 @@ def _set_pctRs(self, value: Union[Float64Array, List[Float64Array]], flags: enum New AutoTrans.T1 buses=[Hibus, lowbus] ~ %Rs=(0.2 0.3) - DSS property name: `%Rs`, DSS property index: 37. + Name: `%Rs` + Default: [0.2, 0.2] """ def _get_Bank(self) -> List[str]: @@ -1333,7 +1488,9 @@ def _set_Bank(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Name of the bank this transformer is part of, for CIM, MultiSpeak, and other interfaces. - DSS property name: `Bank`, DSS property index: 38. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `Bank` """ def _get_XRConst(self) -> List[bool]: @@ -1341,14 +1498,15 @@ def _get_XRConst(self) -> List[bool]: self._get_batch_int32_prop(39) ] - def _set_XRConst(self, value: bool, flags: enums.SetterFlags = 0): + def _set_XRConst(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(39, value, flags) XRConst = property(_get_XRConst, _set_XRConst) # type: List[bool] """ - ={Yes|No} Default is NO. Signifies whether or not the X/R is assumed constant for harmonic studies. + Signifies whether or not the X/R is assumed constant for harmonic studies. - DSS property name: `XRConst`, DSS property index: 39. + Name: `XRConst` + Default: False """ def _get_LeadLag(self) -> BatchInt32ArrayProxy: @@ -1365,7 +1523,8 @@ def _set_LeadLag(self, value: Union[AnyStr, int, enums.PhaseSequence, List[AnySt """ {Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro" - DSS property name: `LeadLag`, DSS property index: 40. + Name: `LeadLag` + Default: Lag """ def _get_LeadLag_str(self) -> List[str]: @@ -1378,100 +1537,162 @@ def _set_LeadLag_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ {Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro" - DSS property name: `LeadLag`, DSS property index: 40. + Name: `LeadLag` + Default: Lag + """ + + def _get_BHPoints(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 42) + + def _set_BHPoints(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(42, value, flags) + + BHPoints = property(_get_BHPoints, _set_BHPoints) # type: BatchInt32ArrayProxy + """ + Number of points in BH curve expected from `BHCurrent` and `BHFlux` arrays. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHPoints` + Default: 0 + """ + + def _get_BHCurrent(self) -> List[Float64Array]: + return [ + self._get_float64_array(self._lib.Obj_GetFloat64Array, x, 43) + for x in self._unpack() + ] + + def _set_BHCurrent(self, value: Union[Float64Array, List[Float64Array]], flags: enums.SetterFlags = 0): + self._set_batch_float64_array_prop(43, value, flags) + + BHCurrent = property(_get_BHCurrent, _set_BHCurrent) # type: List[Float64Array] + """ + Array of current values in per-unit. The array is expected to have the number of entries defined by `BHPoints`. Together with `BHFlux`, they form the BH curve of the transformer. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHCurrent` + """ + + def _get_BHFlux(self) -> List[Float64Array]: + return [ + self._get_float64_array(self._lib.Obj_GetFloat64Array, x, 44) + for x in self._unpack() + ] + + def _set_BHFlux(self, value: Union[Float64Array, List[Float64Array]], flags: enums.SetterFlags = 0): + self._set_batch_float64_array_prop(44, value, flags) + + BHFlux = property(_get_BHFlux, _set_BHFlux) # type: List[Float64Array] + """ + Array of flux values in per-unit. The array is expected to have the number of entries defined by `BHPoints`. Together with `BHCurrent`, they form the BH curve of the transformer. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHFlux` """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 42) + return BatchFloat64ArrayProxy(self, 45) def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(42, value, flags) + self._set_batch_float64_array(45, value, flags) NormAmps = property(_get_NormAmps, _set_NormAmps) # type: BatchFloat64ArrayProxy """ - Normal rated current. + Normal rated current. Use `NormHkVA` to specify the normal rating for the transformer. + + **Read-only** - DSS property name: `NormAmps`, DSS property index: 42. + Name: `NormAmps` """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 43) + return BatchFloat64ArrayProxy(self, 46) def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(43, value, flags) + self._set_batch_float64_array(46, value, flags) EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: BatchFloat64ArrayProxy """ - Maximum or emerg current. + Maximum or emergency current. Use `EmergHkVA` to specify the normal rating for the transformer. + + **Read-only** - DSS property name: `EmergAmps`, DSS property index: 43. + Name: `EmergAmps` """ def _get_FaultRate(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 44) + return BatchFloat64ArrayProxy(self, 47) def _set_FaultRate(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(44, value, flags) + self._set_batch_float64_array(47, value, flags) FaultRate = property(_get_FaultRate, _set_FaultRate) # type: BatchFloat64ArrayProxy """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 44. + Name: `FaultRate` + Default: 0.007 """ def _get_pctPerm(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 45) + return BatchFloat64ArrayProxy(self, 48) def _set_pctPerm(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(45, value, flags) + self._set_batch_float64_array(48, value, flags) pctPerm = property(_get_pctPerm, _set_pctPerm) # type: BatchFloat64ArrayProxy """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 45. + Name: `pctPerm` + Default: 0.0 """ def _get_Repair(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 46) + return BatchFloat64ArrayProxy(self, 49) def _set_Repair(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(46, value, flags) + self._set_batch_float64_array(49, value, flags) Repair = property(_get_Repair, _set_Repair) # type: BatchFloat64ArrayProxy """ Hours to repair. - DSS property name: `Repair`, DSS property index: 46. + Name: `Repair` + Default: 0.0 """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 47) + return BatchFloat64ArrayProxy(self, 50) def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(47, value, flags) + self._set_batch_float64_array(50, value, flags) BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: BatchFloat64ArrayProxy """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 47. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: return [v != 0 for v in - self._get_batch_int32_prop(48) + self._get_batch_int32_prop(51) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): - self._set_batch_int32_array(48, value, flags) + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(51, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 48. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1480,9 +1701,11 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 49. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_batch_string(49, value, flags) + self._set_batch_string(52, value, flags) class AutoTransBatchProperties(TypedDict): Phases: Union[int, Int32Array] @@ -1519,6 +1742,9 @@ class AutoTransBatchProperties(TypedDict): Bank: Union[AnyStr, List[AnyStr]] XRConst: bool LeadLag: Union[AnyStr, int, enums.PhaseSequence, List[AnyStr], List[int], List[enums.PhaseSequence], Int32Array] + BHPoints: Union[int, Int32Array] + BHCurrent: Float64Array + BHFlux: Float64Array NormAmps: Union[float, Float64Array] EmergAmps: Union[float, Float64Array] FaultRate: Union[float, Float64Array] diff --git a/altdss/Batch.py b/altdss/Batch.py index f60959a..72a5060 100644 --- a/altdss/Batch.py +++ b/altdss/Batch.py @@ -1,9 +1,10 @@ from __future__ import annotations +from collections.abc import Sequence as PySequence, Iterable as PyIterable import numpy as np from typing import Union, List, AnyStr, Optional, Iterator from dss.enums import DSSJSONFlags -from .enums import SetterFlags -from .common import Base, LIST_LIKE, InvalidatedObject +from .enums import SetterFlags, BatchOperation, DSSObjectFlags +from .common import Base, LIST_LIKE, InvalidatedObject, InvalidatedObjectIterator from .types import Float64Array, Int32Array from .DSSObj import DSSObj from .ArrayProxy import BatchFloat64ArrayProxy, BatchInt32ArrayProxy @@ -32,20 +33,20 @@ def FullName(self) -> List[str]: self._check_for_error() return res - def _get_batch_float64_func(self, funcname): - func = self._ffi.addressof(self._api_util.lib_unpatched, funcname) + def _get_batch_float64_func(self, funcname: str): + func = getattr(self._api_util.lib_unpatched, funcname) res = self._get_float64_array(self._lib.Batch_GetFloat64FromFunc, *self._get_ptr_cnt(), func) self._check_for_error() return res - def _get_batch_float64_int32_func(self, funcname, funcArg: int): - func = self._ffi.addressof(self._api_util.lib_unpatched, funcname) + def _get_batch_float64_int32_func(self, funcname: str, funcArg: int): + func = getattr(self._api_util.lib_unpatched, funcname) res = self._get_float64_array(self._lib.Batch_GetFloat64FromFunc2, *self._get_ptr_cnt(), func, funcArg) self._check_for_error() return res - def _get_batch_int32_func(self, funcname): - func = self._ffi.addressof(self._api_util.lib_unpatched, funcname) + def _get_batch_int32_func(self, funcname: str): + func = getattr(self._api_util.lib_unpatched, funcname) res = self._get_int32_array(self._lib.Batch_GetInt32FromFunc, *self._get_ptr_cnt(), func) self._check_for_error() return res @@ -58,15 +59,18 @@ def _unpack(self): return self._ffi.unpack(*self._get_ptr_cnt()) def _dispose_batch(self, batch_ptr): - if batch_ptr != self._ffi.NULL: + if batch_ptr: self._lib.Batch_Dispose(batch_ptr) def _invalidate_ptr(self): self._pointer = InvalidatedObject - def _wrap_ptr(self, ptrptr, countptr): - if ptrptr != self._ffi.NULL: - self._pointer = self._ffi.gc(ptrptr[0], self._dispose_batch) + def _wrap_ptr(self, ptrptr, countptr, api_dispose=True): + if ptrptr: + if api_dispose: + self._pointer = self._ffi.gc(ptrptr[0], self._dispose_batch) + else: + self._pointer = ptrptr[0] else: self._pointer = self._ffi.NULL @@ -100,6 +104,9 @@ def __call__(self): return res + def __repr__(self): + return f'<{self.__class__.__name__}: {len(self)} items>' + def to_list(self): return self() @@ -216,7 +223,7 @@ def __init__(self, api_util, **kwargs): self._sync_cls_idx = kwargs.pop('sync_cls_idx', False) new_batch_args = kwargs.keys() & {'new_names', 'new_count', } - existing_batch_args = kwargs.keys() & {'from_func', 'sync_cls_idx', 'idx', 're', '_clone_from'} + existing_batch_args = kwargs.keys() & {'from_func', 'sync_cls_idx', 'idx', 're', '_clone_from', 'names', 'objs'} if len(new_batch_args) > 1: raise ValueError("Multiple ways to create a batch of new elements were provided.") @@ -272,7 +279,7 @@ def __init__(self, api_util, **kwargs): self._check_for_error() return - # Create from specified function, regexp, or list of indices? + # Create from specified function, regexp, or list of indices/names/objs? from_func = kwargs.pop('from_func', None) if from_func is not None: @@ -302,7 +309,75 @@ def __init__(self, api_util, **kwargs): self._check_for_error() self._filter(**kwargs) return - + + names = kwargs.pop('names', None) + if names is not None: + names = tuple(names) + if not isinstance(names[0], (str, bytes)): + raise ValueError("A sequence of strings was expected in the `names` keyword argument.") + + obj_ptrs = [] + codec = self._api_util.codec + ctx = self._api_util.ctx + for name in names: + if not isinstance(name, bytes): + name = name.encode(codec) + + ptr = self._lib.Obj_GetHandleByName(ctx, self._cls_idx, name) + if not ptr: + raise ValueError('Could not find object by name "{}".'.format(name)) + + obj_ptrs.append(ptr) + + self._pointer = self._ffi.gc(self._ffi.new('void*[]', obj_ptrs), self._ffi.release) + self._count = len(obj_ptrs) + self._ptrptr[0] = self._pointer + self._countptr[0] = self._count + self._countptr[1] = self._count + return + + objs = kwargs.pop('objs', None) + if objs is not None and isinstance(objs, PySequence): + objs = tuple(objs) + if not isinstance(objs[0], DSSObj): + raise ValueError("A sequence or iterator of `DSSObj` was expected in the `objs` keyword argument.") + + if any(obj._cls_idx != self._cls_idx for obj in objs): + raise ValueError("A uniform sequence of objects (all of the same type) was expected. The type must also match with the Batch type.") + + self._pointer = self._ffi.gc(self._ffi.new('void*[]', [obj._ptr for obj in objs]), self._ffi.release) + self._count = len(objs) + self._ptrptr[0] = self._pointer + self._countptr[0] = self._count + self._countptr[1] = self._count + return + + if objs is not None and isinstance(objs, PyIterable): + # For iterables, we only grab the pointers, no need to convert to objects + obj_ptrs = [] + it_objs = iter(objs) + + while True: + try: + obj = next(it_objs) + if not isinstance(obj, DSSObj): + raise ValueError("A sequence or iterator of `DSSObj` was expected in the `objs` keyword argument.") + + if obj._cls_idx != self._cls_idx: + raise ValueError("A uniform sequence of objects (all of the same type) was expected. The type must also match with the Batch type.") + + obj_ptrs.append(obj._ptr) + + except StopIteration: + break + + self._pointer = self._ffi.gc(self._ffi.new('void*[]', obj_ptrs), self._ffi.release) + self._count = len(obj_ptrs) + self._ptrptr[0] = self._pointer + self._countptr[0] = self._count + self._countptr[1] = self._count + return + # Apply filters on the base collection self._filter(_existing=False, **kwargs) @@ -333,6 +408,7 @@ def end_edit(self, num_changes: int = 1) -> None: self._lib.Batch_EndEdit(*self._get_ptr_cnt(), num_changes) self._check_for_error() + def _get_ptr_cnt(self): if self._sync_cls_idx: self._pointer = self._lib.Obj_GetListPointer(self._api_util.ctx, self._sync_cls_idx) @@ -340,10 +416,22 @@ def _get_ptr_cnt(self): return (self._pointer, self._count) + def __iter__(self): for ptr in self._unpack(): yield self._obj_cls(self._api_util, ptr) + + def iterate(self) -> Iterator[DSSObj]: + it_obj = self._obj_cls(self._api_util, InvalidatedObjectIterator) + it_obj._is_iterator = True + for ptr in self._unpack(): + it_obj._ptr = ptr + yield it_obj + + it_obj._ptr = InvalidatedObjectIterator + + def __getitem__(self, idx0) -> DSSObj: '''Get element at 0-based index of the batch pointer array''' if idx0 >= len(self) or idx0 < 0: @@ -353,6 +441,7 @@ def __getitem__(self, idx0) -> DSSObj: ptr = _pointer[idx0] return self._obj_cls(self._api_util, ptr) + def _set_batch_float64_array(self, idx: int, value: Union[BatchFloat64ArrayProxy, float, List[float], Float64Array], flags: SetterFlags = 0): if isinstance(value, (BatchFloat64ArrayProxy, BatchInt32ArrayProxy)): if self is value._batch and value._idx == idx: @@ -366,7 +455,7 @@ def _set_batch_float64_array(self, idx: int, value: Union[BatchFloat64ArrayProxy self._lib.Batch_Float64( *ptr_cnt, idx, - self._lib.BatchOperation_Set, + BatchOperation.Set, value, flags ) @@ -379,7 +468,7 @@ def _set_batch_float64_array(self, idx: int, value: Union[BatchFloat64ArrayProxy self._lib.Batch_Float64Array( *ptr_cnt, idx, - self._lib.BatchOperation_Set, + BatchOperation.Set, data_ptr, flags ) @@ -398,7 +487,7 @@ def _set_batch_int32_array(self, idx: int, value: Union[BatchInt32ArrayProxy, in self._lib.Batch_Int32( *ptr_cnt, idx, - self._lib.BatchOperation_Set, + BatchOperation.Set, value, flags ) @@ -411,7 +500,7 @@ def _set_batch_int32_array(self, idx: int, value: Union[BatchInt32ArrayProxy, in self._lib.Batch_Int32Array( *ptr_cnt, idx, - self._lib.BatchOperation_Set, + BatchOperation.Set, data_ptr, flags ) @@ -440,13 +529,13 @@ def _get_batch_float_prop(self, index): return self._get_float64_array(self._lib.Batch_GetFloat64, *self._get_ptr_cnt(), index) def _get_batch_float_prop_as_list(self, index): - return self._api_util.get_float64_array2(self._lib.Batch_GetFloat64, *self._get_ptr_cnt(), index) + return self._lib.get_float64_array2(self._lib.Batch_GetFloat64, *self._get_ptr_cnt(), index) def _get_batch_int32_prop(self, index): return self._get_int32_array(self._lib.Batch_GetInt32, *self._get_ptr_cnt(), index) def _get_batch_int32_prop_as_list(self, index): - return self._api_util.get_int32_array2(self._lib.Batch_GetInt32, *self._get_ptr_cnt(), index) + return self._lib.get_int32_array2(self._lib.Batch_GetInt32, *self._get_ptr_cnt(), index) def _get_batch_str_prop(self, index): return self._get_string_array(self._lib.Batch_GetString, *self._get_ptr_cnt(), index) @@ -670,7 +759,7 @@ def _edit(self, props): if cnt == 0: return - if not (self._lib.Obj_GetFlags(ptr[0]) and self._lib.DSSObjectFlags_Editing): + if not (self._lib.Obj_GetFlags(ptr[0]) and DSSObjectFlags.Editing): self._lib.Batch_BeginEdit(ptr, cnt) self._check_for_error() diff --git a/altdss/Bus.py b/altdss/Bus.py index 3efc130..2fcd477 100644 --- a/altdss/Bus.py +++ b/altdss/Bus.py @@ -1,9 +1,10 @@ -# Copyright (c) 2023-2024 Paulo Meira -# Copyright (c) 2023-2024 DSS-Extensions contributors +# Copyright (c) 2023-2026 Paulo Meira +# Copyright (c) 2023-2026 DSS-Extensions contributors from typing import Union, Iterator, List from dss.enums import DSSJSONFlags from .types import Float64Array, Int32Array, ComplexArray -from .common import Base, InvalidatedBus +from .common import Base, InvalidatedBus, InvalidatedBusIterator +from .CircuitElement import CircuitElementBatch from .PCElement import PCElementBatch from .PDElement import PDElementBatch from .Load import LoadBatch @@ -20,24 +21,33 @@ class Bus: '_get_string', '_api_util', '__weakref__', + '_is_iterator', ) def _invalidate_ptr(self): self._ptr = InvalidatedBus def __init__(self, api_util, ptr): - self._get_float64_array = api_util.get_float64_array - self._get_fcomplex128_array = api_util.get_fcomplex128_array - self._get_fcomplex128_simple = api_util.get_fcomplex128_simple - self._get_int32_array = api_util.get_int32_array - self._get_string = api_util.get_string - self._lib = api_util.lib + lib = self._lib = api_util.lib self._ptr = ptr self._api_util = api_util - api_util.track_bus(self) + + self._get_float64_array = lib.get_float64_array + self._get_fcomplex128_array = lib.get_fcomplex128_array + self._get_fcomplex128_simple = lib.get_fcomplex128_simple + self._get_int32_array = lib.get_int32_array + self._get_string = api_util.get_string + self._is_iterator = False + if ptr is not InvalidatedBusIterator: + api_util.track_bus(self) + def __repr__(self): - return f'' + if not self._is_iterator: + return f'' + + return f'<(Iterator) Bus.{self.Name}>' + def GetUniqueNodeNumber(self, startNumber: int) -> int: ''' @@ -397,12 +407,24 @@ def Lines(self) -> LineBatch: '''Batch of line objects connected to this bus.''' return LineBatch(self._api_util, from_func=(self._lib.Alt_Bus_Get_Lines, self._ptr)) - def PCElements(self) -> PCElementBatch: - '''Batch of all PC elements connected to this bus.''' - return PCElementBatch(self._lib.Alt_Bus_Get_PCElements, self, copy_safe=True) + def PCElements(self) -> CircuitElementBatch: + ''' + Batch of all power conversion (PC) elements connected to this bus. + + This also includes shunt Capacitors/Reactors. + + Original COM help: https://opendss.epri.com/AllPCEatBus.html + ''' + return CircuitElementBatch(self._lib.Alt_Bus_Get_PCElements, self, copy_safe=True) def PDElements(self) -> PDElementBatch: - '''Batch of all PD elements connected to this bus.''' + ''' + Batch of all power delivery (PD) elements connected to this bus. + + This excludes shunt Capacitors/Reactors. + + Original COM help: https://opendss.epri.com/AllPDEatBus1.html + ''' return PDElementBatch(self._lib.Alt_Bus_Get_PDElements, self, copy_safe=True) def to_json(self, options: Union[int, DSSJSONFlags] = 0): @@ -444,14 +466,14 @@ def _busbatch_float64(self, fname: str): return self._get_float64_array( self._lib.Alt_BusBatch_GetFloat64FromFunc, *self._get_ptr_cnt(), - self._api_util.ffi.addressof(self._api_util.lib_unpatched, fname) + getattr(self._api_util.lib_unpatched, fname) ) def _busbatch_int32(self, fname: str): return self._get_int32_array( self._lib.Alt_BusBatch_GetInt32FromFunc, *self._get_ptr_cnt(), - self._api_util.ffi.addressof(self._api_util.lib_unpatched, fname) + getattr(self._api_util.lib_unpatched, fname) ) def X(self) -> Float64Array: @@ -526,10 +548,22 @@ def __len__(self) -> int: '''Total number of buses in this batch.''' return self._cnt + def __repr__(self): + return f'<{self.__class__.__name__}: {len(self)} items>' + def __iter__(self) -> Iterator[Bus]: for ptr in self._unpack(): yield Bus(self._api_util, ptr) + def iterate(self) -> Iterator[Bus]: + it_obj = Bus(self._api_util, InvalidatedBusIterator) + it_obj._is_iterator = True + for ptr in self._unpack(): + it_obj._ptr = ptr + yield it_obj + + it_obj._ptr = InvalidatedBusIterator + def to_json(self, options: Union[int, DSSJSONFlags] = 0): ''' Returns the data of the buses in this batch as a JSON-encoded string. @@ -586,4 +620,4 @@ def Name(self) -> List[str]: ''' Array of strings containing names of all buses in circuit. ''' - return self._check_for_error(self._get_string_array(self._lib.Circuit_Get_AllBusNames)) + return self._lib.Circuit_Get_AllBusNames() diff --git a/altdss/CNData.py b/altdss/CNData.py index 1a4d1cf..5c1301d 100644 --- a/altdss/CNData.py +++ b/altdss/CNData.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -16,51 +16,53 @@ class CNData(DSSObj): _cls_idx = 10 _cls_int_idx = { 1, - 11, - 13, - 15, - 19, + 5, + 12, + 14, + 16, + 20, } _cls_float_idx = { 2, 3, 4, - 5, 6, 7, 8, 9, 10, - 12, - 14, - 16, + 11, + 13, + 15, 17, 18, - 21, + 19, + 22, } _cls_prop_idx = { 'k': 1, 'diastrand': 2, 'gmrstrand': 3, 'rstrand': 4, - 'epsr': 5, - 'inslayer': 6, - 'diains': 7, - 'diacable': 8, - 'rdc': 9, - 'rac': 10, - 'runits': 11, - 'gmrac': 12, - 'gmrunits': 13, - 'radius': 14, - 'radunits': 15, - 'normamps': 16, - 'emergamps': 17, - 'diam': 18, - 'seasons': 19, - 'ratings': 20, - 'capradius': 21, - 'like': 22, + 'semiconlayer': 5, + 'epsr': 6, + 'inslayer': 7, + 'diains': 8, + 'diacable': 9, + 'rdc': 10, + 'rac': 11, + 'runits': 12, + 'gmrac': 13, + 'gmrunits': 14, + 'radius': 15, + 'radunits': 16, + 'normamps': 17, + 'emergamps': 18, + 'diam': 19, + 'seasons': 20, + 'ratings': 21, + 'capradius': 22, + 'like': 23, } @@ -89,9 +91,10 @@ def _set_k(self, value: int, flags: enums.SetterFlags = 0): k = property(_get_k, _set_k) # type: int """ - Number of concentric neutral strands; default is 2 + Number of concentric neutral strands - DSS property name: `k`, DSS property index: 1. + Name: `k` + Default: 2 """ def _get_DiaStrand(self) -> float: @@ -102,9 +105,9 @@ def _set_DiaStrand(self, value: float, flags: enums.SetterFlags = 0): DiaStrand = property(_get_DiaStrand, _set_DiaStrand) # type: float """ - Diameter of a concentric neutral strand; same units as core conductor radius; no default. + Diameter of a concentric neutral strand; same units as core conductor radius. - DSS property name: `DiaStrand`, DSS property index: 2. + Name: `DiaStrand` """ def _get_GMRStrand(self) -> float: @@ -115,9 +118,9 @@ def _set_GMRStrand(self, value: float, flags: enums.SetterFlags = 0): GMRStrand = property(_get_GMRStrand, _set_GMRStrand) # type: float """ - Geometric mean radius of a concentric neutral strand; same units as core conductor GMR; defaults to 0.7788 * CN strand radius. + Geometric mean radius of a concentric neutral strand; same units as core conductor GMR; defaults to $0.7788 × DiaStrand$. - DSS property name: `GMRStrand`, DSS property index: 3. + Name: `GMRStrand` """ def _get_RStrand(self) -> float: @@ -128,107 +131,125 @@ def _set_RStrand(self, value: float, flags: enums.SetterFlags = 0): RStrand = property(_get_RStrand, _set_RStrand) # type: float """ - AC resistance of a concentric neutral strand; same units as core conductor resistance; no default. + AC resistance of a concentric neutral strand; same units as core conductor resistance. + + Name: `RStrand` + Units: Ω/[length_unit] + """ + + def _get_SemiconLayer(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 5) != 0 + + def _set_SemiconLayer(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 5, value, flags) + + SemiconLayer = property(_get_SemiconLayer, _set_SemiconLayer) # type: bool + """ + Existence of a semicon layer between the insulation layer and the concentric neutral strands. Affects calculation of shunt self admittances. - DSS property name: `RStrand`, DSS property index: 4. + Name: `SemiconLayer` + Default: True """ def _get_EpsR(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 5) + return self._lib.Obj_GetFloat64(self._ptr, 6) def _set_EpsR(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 5, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 6, value, flags) EpsR = property(_get_EpsR, _set_EpsR) # type: float """ - Insulation layer relative permittivity; default is 2.3. + Insulation layer relative permittivity. - DSS property name: `EpsR`, DSS property index: 5. + Name: `EpsR` + Default: 2.3 """ def _get_InsLayer(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 6) + return self._lib.Obj_GetFloat64(self._ptr, 7) def _set_InsLayer(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 6, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 7, value, flags) InsLayer = property(_get_InsLayer, _set_InsLayer) # type: float """ - Insulation layer thickness; same units as radius; no default. With DiaIns, establishes inner radius for capacitance calculation. + Insulation layer thickness; same units as radius. With DiaIns, establishes inner radius for capacitance calculation. - DSS property name: `InsLayer`, DSS property index: 6. + Name: `InsLayer` """ def _get_DiaIns(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 7) + return self._lib.Obj_GetFloat64(self._ptr, 8) def _set_DiaIns(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 7, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 8, value, flags) DiaIns = property(_get_DiaIns, _set_DiaIns) # type: float """ - Diameter over insulation layer; same units as radius; no default. Establishes outer radius for capacitance calculation. + Diameter over insulation layer; same units as radius. Establishes outer radius for capacitance calculation. - DSS property name: `DiaIns`, DSS property index: 7. + Name: `DiaIns` """ def _get_DiaCable(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 8) + return self._lib.Obj_GetFloat64(self._ptr, 9) def _set_DiaCable(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 8, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 9, value, flags) DiaCable = property(_get_DiaCable, _set_DiaCable) # type: float """ - Diameter over cable; same units as radius; no default. + Diameter over cable; same units as radius. - DSS property name: `DiaCable`, DSS property index: 8. + Name: `DiaCable` """ def _get_RDC(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 9) + return self._lib.Obj_GetFloat64(self._ptr, 10) def _set_RDC(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 9, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 10, value, flags) RDC = property(_get_RDC, _set_RDC) # type: float """ - dc Resistance, ohms per unit length (see Runits). Defaults to Rac/1.02 if not specified. + DC resistance, ohms per unit length (see `Runits`). Defaults to $Rac/1.02$ if not specified. - DSS property name: `RDC`, DSS property index: 9. + Name: `RDC` + Units: Ω/[length_unit] """ def _get_RAC(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 10) + return self._lib.Obj_GetFloat64(self._ptr, 11) def _set_RAC(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 10, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 11, value, flags) RAC = property(_get_RAC, _set_RAC) # type: float """ - Resistance at 60 Hz per unit length. Defaults to 1.02*Rdc if not specified. + Resistance at 60 Hz per unit length. Defaults to $1.02 × Rdc$ if not specified. - DSS property name: `RAC`, DSS property index: 10. + Name: `RAC` """ def _get_RUnits(self) -> enums.LengthUnit: - return enums.LengthUnit(self._lib.Obj_GetInt32(self._ptr, 11)) + return enums.LengthUnit(self._lib.Obj_GetInt32(self._ptr, 12)) def _set_RUnits(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enums.SetterFlags = 0): if not isinstance(value, int): - self._set_string_o(11, value, flags) + self._set_string_o(12, value, flags) return - self._lib.Obj_SetInt32(self._ptr, 11, value, flags) + self._lib.Obj_SetInt32(self._ptr, 12, value, flags) RUnits = property(_get_RUnits, _set_RUnits) # type: enums.LengthUnit """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 11. + Name: `RUnits` + Default: none """ def _get_RUnits_str(self) -> str: - return self._get_prop_string(11) + return self._get_prop_string(12) def _set_RUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): self._set_RUnits(value, flags) @@ -237,170 +258,176 @@ def _set_RUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 11. + Name: `RUnits` + Default: none """ def _get_GMRAC(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 12) + return self._lib.Obj_GetFloat64(self._ptr, 13) def _set_GMRAC(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 12, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 13, value, flags) GMRAC = property(_get_GMRAC, _set_GMRAC) # type: float """ - GMR at 60 Hz. Defaults to .7788*radius if not specified. + GMR at 60 Hz. Defaults to $0.7788 × radius$ if not specified. - DSS property name: `GMRAC`, DSS property index: 12. + Name: `GMRAC` """ def _get_GMRUnits(self) -> enums.LengthUnit: - return enums.LengthUnit(self._lib.Obj_GetInt32(self._ptr, 13)) + return enums.LengthUnit(self._lib.Obj_GetInt32(self._ptr, 14)) def _set_GMRUnits(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enums.SetterFlags = 0): if not isinstance(value, int): - self._set_string_o(13, value, flags) + self._set_string_o(14, value, flags) return - self._lib.Obj_SetInt32(self._ptr, 13, value, flags) + self._lib.Obj_SetInt32(self._ptr, 14, value, flags) GMRUnits = property(_get_GMRUnits, _set_GMRUnits) # type: enums.LengthUnit """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 13. + Name: `GMRUnits` + Default: none """ def _get_GMRUnits_str(self) -> str: - return self._get_prop_string(13) + return self._get_prop_string(14) def _set_GMRUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): self._set_GMRUnits(value, flags) GMRUnits_str = property(_get_GMRUnits_str, _set_GMRUnits_str) # type: str """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 13. + Name: `GMRUnits` + Default: none """ def _get_Radius(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 14) + return self._lib.Obj_GetFloat64(self._ptr, 15) def _set_Radius(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 14, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 15, value, flags) Radius = property(_get_Radius, _set_Radius) # type: float """ Outside radius of conductor. Defaults to GMR/0.7788 if not specified. - DSS property name: `Radius`, DSS property index: 14. + Name: `Radius` """ def _get_RadUnits(self) -> enums.LengthUnit: - return enums.LengthUnit(self._lib.Obj_GetInt32(self._ptr, 15)) + return enums.LengthUnit(self._lib.Obj_GetInt32(self._ptr, 16)) def _set_RadUnits(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enums.SetterFlags = 0): if not isinstance(value, int): - self._set_string_o(15, value, flags) + self._set_string_o(16, value, flags) return - self._lib.Obj_SetInt32(self._ptr, 15, value, flags) + self._lib.Obj_SetInt32(self._ptr, 16, value, flags) RadUnits = property(_get_RadUnits, _set_RadUnits) # type: enums.LengthUnit """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 15. + Name: `RadUnits` + Default: none """ def _get_RadUnits_str(self) -> str: - return self._get_prop_string(15) + return self._get_prop_string(16) def _set_RadUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): self._set_RadUnits(value, flags) RadUnits_str = property(_get_RadUnits_str, _set_RadUnits_str) # type: str """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 15. + Name: `RadUnits` + Default: none """ def _get_NormAmps(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 16) + return self._lib.Obj_GetFloat64(self._ptr, 17) def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 16, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 17, value, flags) NormAmps = property(_get_NormAmps, _set_NormAmps) # type: float """ - Normal ampacity, amperes. Defaults to Emergency amps/1.5 if not specified. + Normal ampacity, amperes. Defaults to $EmergAmps / 1.5$ if not specified. - DSS property name: `NormAmps`, DSS property index: 16. + Name: `NormAmps` """ def _get_EmergAmps(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 17) + return self._lib.Obj_GetFloat64(self._ptr, 18) def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 17, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 18, value, flags) EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: float """ - Emergency ampacity, amperes. Defaults to 1.5 * Normal Amps if not specified. + Emergency ampacity, amperes. Defaults to $1.5 × NormAmps$ if not specified. - DSS property name: `EmergAmps`, DSS property index: 17. + Name: `EmergAmps` """ def _get_Diam(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 18) + return self._lib.Obj_GetFloat64(self._ptr, 19) def _set_Diam(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 18, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 19, value, flags) Diam = property(_get_Diam, _set_Diam) # type: float """ Diameter; Alternative method for entering radius. - DSS property name: `Diam`, DSS property index: 18. + Name: `Diam` """ def _get_Seasons(self) -> int: - return self._lib.Obj_GetInt32(self._ptr, 19) + return self._lib.Obj_GetInt32(self._ptr, 20) def _set_Seasons(self, value: int, flags: enums.SetterFlags = 0): - self._lib.Obj_SetInt32(self._ptr, 19, value, flags) + self._lib.Obj_SetInt32(self._ptr, 20, value, flags) Seasons = property(_get_Seasons, _set_Seasons) # type: int """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 19. + Name: `Seasons` """ def _get_Ratings(self) -> Float64Array: - return self._get_float64_array(self._lib.Obj_GetFloat64Array, self._ptr, 20) + return self._get_float64_array(self._lib.Obj_GetFloat64Array, self._ptr, 21) def _set_Ratings(self, value: Float64Array, flags: enums.SetterFlags = 0): - self._set_float64_array_o(20, value, flags) + self._set_float64_array_o(21, value, flags) Ratings = property(_get_Ratings, _set_Ratings) # type: Float64Array """ An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. - DSS property name: `Ratings`, DSS property index: 20. + Name: `Ratings` + Default: [-1.0] """ def _get_CapRadius(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 21) + return self._lib.Obj_GetFloat64(self._ptr, 22) def _set_CapRadius(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 21, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 22, value, flags) CapRadius = property(_get_CapRadius, _set_CapRadius) # type: float """ Equivalent conductor radius for capacitance calcs. Specify this for bundled conductors. Defaults to same value as radius. Define Diam or Radius property first. - DSS property name: `CapRadius`, DSS property index: 21. + Name: `CapRadius` """ def Like(self, value: AnyStr): @@ -409,9 +436,11 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 22. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_string_o(22, value) + self._set_string_o(23, value) class CNDataProperties(TypedDict): @@ -419,6 +448,7 @@ class CNDataProperties(TypedDict): DiaStrand: float GMRStrand: float RStrand: float + SemiconLayer: bool EpsR: float InsLayer: float DiaIns: float @@ -474,9 +504,10 @@ def _set_k(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): k = property(_get_k, _set_k) # type: BatchInt32ArrayProxy """ - Number of concentric neutral strands; default is 2 + Number of concentric neutral strands - DSS property name: `k`, DSS property index: 1. + Name: `k` + Default: 2 """ def _get_DiaStrand(self) -> BatchFloat64ArrayProxy: @@ -487,9 +518,9 @@ def _set_DiaStrand(self, value: Union[float, Float64Array], flags: enums.SetterF DiaStrand = property(_get_DiaStrand, _set_DiaStrand) # type: BatchFloat64ArrayProxy """ - Diameter of a concentric neutral strand; same units as core conductor radius; no default. + Diameter of a concentric neutral strand; same units as core conductor radius. - DSS property name: `DiaStrand`, DSS property index: 2. + Name: `DiaStrand` """ def _get_GMRStrand(self) -> BatchFloat64ArrayProxy: @@ -500,9 +531,9 @@ def _set_GMRStrand(self, value: Union[float, Float64Array], flags: enums.SetterF GMRStrand = property(_get_GMRStrand, _set_GMRStrand) # type: BatchFloat64ArrayProxy """ - Geometric mean radius of a concentric neutral strand; same units as core conductor GMR; defaults to 0.7788 * CN strand radius. + Geometric mean radius of a concentric neutral strand; same units as core conductor GMR; defaults to $0.7788 × DiaStrand$. - DSS property name: `GMRStrand`, DSS property index: 3. + Name: `GMRStrand` """ def _get_RStrand(self) -> BatchFloat64ArrayProxy: @@ -513,108 +544,128 @@ def _set_RStrand(self, value: Union[float, Float64Array], flags: enums.SetterFla RStrand = property(_get_RStrand, _set_RStrand) # type: BatchFloat64ArrayProxy """ - AC resistance of a concentric neutral strand; same units as core conductor resistance; no default. + AC resistance of a concentric neutral strand; same units as core conductor resistance. + + Name: `RStrand` + Units: Ω/[length_unit] + """ + + def _get_SemiconLayer(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(5) + ] + + def _set_SemiconLayer(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(5, value, flags) + + SemiconLayer = property(_get_SemiconLayer, _set_SemiconLayer) # type: List[bool] + """ + Existence of a semicon layer between the insulation layer and the concentric neutral strands. Affects calculation of shunt self admittances. - DSS property name: `RStrand`, DSS property index: 4. + Name: `SemiconLayer` + Default: True """ def _get_EpsR(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 5) + return BatchFloat64ArrayProxy(self, 6) def _set_EpsR(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(5, value, flags) + self._set_batch_float64_array(6, value, flags) EpsR = property(_get_EpsR, _set_EpsR) # type: BatchFloat64ArrayProxy """ - Insulation layer relative permittivity; default is 2.3. + Insulation layer relative permittivity. - DSS property name: `EpsR`, DSS property index: 5. + Name: `EpsR` + Default: 2.3 """ def _get_InsLayer(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 6) + return BatchFloat64ArrayProxy(self, 7) def _set_InsLayer(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(6, value, flags) + self._set_batch_float64_array(7, value, flags) InsLayer = property(_get_InsLayer, _set_InsLayer) # type: BatchFloat64ArrayProxy """ - Insulation layer thickness; same units as radius; no default. With DiaIns, establishes inner radius for capacitance calculation. + Insulation layer thickness; same units as radius. With DiaIns, establishes inner radius for capacitance calculation. - DSS property name: `InsLayer`, DSS property index: 6. + Name: `InsLayer` """ def _get_DiaIns(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 7) + return BatchFloat64ArrayProxy(self, 8) def _set_DiaIns(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(7, value, flags) + self._set_batch_float64_array(8, value, flags) DiaIns = property(_get_DiaIns, _set_DiaIns) # type: BatchFloat64ArrayProxy """ - Diameter over insulation layer; same units as radius; no default. Establishes outer radius for capacitance calculation. + Diameter over insulation layer; same units as radius. Establishes outer radius for capacitance calculation. - DSS property name: `DiaIns`, DSS property index: 7. + Name: `DiaIns` """ def _get_DiaCable(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 8) + return BatchFloat64ArrayProxy(self, 9) def _set_DiaCable(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(8, value, flags) + self._set_batch_float64_array(9, value, flags) DiaCable = property(_get_DiaCable, _set_DiaCable) # type: BatchFloat64ArrayProxy """ - Diameter over cable; same units as radius; no default. + Diameter over cable; same units as radius. - DSS property name: `DiaCable`, DSS property index: 8. + Name: `DiaCable` """ def _get_RDC(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 9) + return BatchFloat64ArrayProxy(self, 10) def _set_RDC(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(9, value, flags) + self._set_batch_float64_array(10, value, flags) RDC = property(_get_RDC, _set_RDC) # type: BatchFloat64ArrayProxy """ - dc Resistance, ohms per unit length (see Runits). Defaults to Rac/1.02 if not specified. + DC resistance, ohms per unit length (see `Runits`). Defaults to $Rac/1.02$ if not specified. - DSS property name: `RDC`, DSS property index: 9. + Name: `RDC` + Units: Ω/[length_unit] """ def _get_RAC(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 10) + return BatchFloat64ArrayProxy(self, 11) def _set_RAC(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(10, value, flags) + self._set_batch_float64_array(11, value, flags) RAC = property(_get_RAC, _set_RAC) # type: BatchFloat64ArrayProxy """ - Resistance at 60 Hz per unit length. Defaults to 1.02*Rdc if not specified. + Resistance at 60 Hz per unit length. Defaults to $1.02 × Rdc$ if not specified. - DSS property name: `RAC`, DSS property index: 10. + Name: `RAC` """ def _get_RUnits(self) -> BatchInt32ArrayProxy: - return BatchInt32ArrayProxy(self, 11) + return BatchInt32ArrayProxy(self, 12) def _set_RUnits(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], List[int], List[enums.LengthUnit], Int32Array], flags: enums.SetterFlags = 0): if isinstance(value, (str, bytes)) or (isinstance(value, LIST_LIKE) and isinstance(value[0], (str, bytes))): - self._set_batch_string(11, value, flags) + self._set_batch_string(12, value, flags) return - self._set_batch_int32_array(11, value, flags) + self._set_batch_int32_array(12, value, flags) RUnits = property(_get_RUnits, _set_RUnits) # type: BatchInt32ArrayProxy """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 11. + Name: `RUnits` + Default: none """ def _get_RUnits_str(self) -> List[str]: - return self._get_batch_str_prop(11) + return self._get_batch_str_prop(12) def _set_RUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): self._set_RUnits(value, flags) @@ -623,175 +674,181 @@ def _set_RUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 11. + Name: `RUnits` + Default: none """ def _get_GMRAC(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 12) + return BatchFloat64ArrayProxy(self, 13) def _set_GMRAC(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(12, value, flags) + self._set_batch_float64_array(13, value, flags) GMRAC = property(_get_GMRAC, _set_GMRAC) # type: BatchFloat64ArrayProxy """ - GMR at 60 Hz. Defaults to .7788*radius if not specified. + GMR at 60 Hz. Defaults to $0.7788 × radius$ if not specified. - DSS property name: `GMRAC`, DSS property index: 12. + Name: `GMRAC` """ def _get_GMRUnits(self) -> BatchInt32ArrayProxy: - return BatchInt32ArrayProxy(self, 13) + return BatchInt32ArrayProxy(self, 14) def _set_GMRUnits(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], List[int], List[enums.LengthUnit], Int32Array], flags: enums.SetterFlags = 0): if isinstance(value, (str, bytes)) or (isinstance(value, LIST_LIKE) and isinstance(value[0], (str, bytes))): - self._set_batch_string(13, value, flags) + self._set_batch_string(14, value, flags) return - self._set_batch_int32_array(13, value, flags) + self._set_batch_int32_array(14, value, flags) GMRUnits = property(_get_GMRUnits, _set_GMRUnits) # type: BatchInt32ArrayProxy """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 13. + Name: `GMRUnits` + Default: none """ def _get_GMRUnits_str(self) -> List[str]: - return self._get_batch_str_prop(13) + return self._get_batch_str_prop(14) def _set_GMRUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): self._set_GMRUnits(value, flags) GMRUnits_str = property(_get_GMRUnits_str, _set_GMRUnits_str) # type: List[str] """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 13. + Name: `GMRUnits` + Default: none """ def _get_Radius(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 14) + return BatchFloat64ArrayProxy(self, 15) def _set_Radius(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(14, value, flags) + self._set_batch_float64_array(15, value, flags) Radius = property(_get_Radius, _set_Radius) # type: BatchFloat64ArrayProxy """ Outside radius of conductor. Defaults to GMR/0.7788 if not specified. - DSS property name: `Radius`, DSS property index: 14. + Name: `Radius` """ def _get_RadUnits(self) -> BatchInt32ArrayProxy: - return BatchInt32ArrayProxy(self, 15) + return BatchInt32ArrayProxy(self, 16) def _set_RadUnits(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], List[int], List[enums.LengthUnit], Int32Array], flags: enums.SetterFlags = 0): if isinstance(value, (str, bytes)) or (isinstance(value, LIST_LIKE) and isinstance(value[0], (str, bytes))): - self._set_batch_string(15, value, flags) + self._set_batch_string(16, value, flags) return - self._set_batch_int32_array(15, value, flags) + self._set_batch_int32_array(16, value, flags) RadUnits = property(_get_RadUnits, _set_RadUnits) # type: BatchInt32ArrayProxy """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 15. + Name: `RadUnits` + Default: none """ def _get_RadUnits_str(self) -> List[str]: - return self._get_batch_str_prop(15) + return self._get_batch_str_prop(16) def _set_RadUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): self._set_RadUnits(value, flags) RadUnits_str = property(_get_RadUnits_str, _set_RadUnits_str) # type: List[str] """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 15. + Name: `RadUnits` + Default: none """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 16) + return BatchFloat64ArrayProxy(self, 17) def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(16, value, flags) + self._set_batch_float64_array(17, value, flags) NormAmps = property(_get_NormAmps, _set_NormAmps) # type: BatchFloat64ArrayProxy """ - Normal ampacity, amperes. Defaults to Emergency amps/1.5 if not specified. + Normal ampacity, amperes. Defaults to $EmergAmps / 1.5$ if not specified. - DSS property name: `NormAmps`, DSS property index: 16. + Name: `NormAmps` """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 17) + return BatchFloat64ArrayProxy(self, 18) def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(17, value, flags) + self._set_batch_float64_array(18, value, flags) EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: BatchFloat64ArrayProxy """ - Emergency ampacity, amperes. Defaults to 1.5 * Normal Amps if not specified. + Emergency ampacity, amperes. Defaults to $1.5 × NormAmps$ if not specified. - DSS property name: `EmergAmps`, DSS property index: 17. + Name: `EmergAmps` """ def _get_Diam(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 18) + return BatchFloat64ArrayProxy(self, 19) def _set_Diam(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(18, value, flags) + self._set_batch_float64_array(19, value, flags) Diam = property(_get_Diam, _set_Diam) # type: BatchFloat64ArrayProxy """ Diameter; Alternative method for entering radius. - DSS property name: `Diam`, DSS property index: 18. + Name: `Diam` """ def _get_Seasons(self) -> BatchInt32ArrayProxy: - return BatchInt32ArrayProxy(self, 19) + return BatchInt32ArrayProxy(self, 20) def _set_Seasons(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): - self._set_batch_int32_array(19, value, flags) + self._set_batch_int32_array(20, value, flags) Seasons = property(_get_Seasons, _set_Seasons) # type: BatchInt32ArrayProxy """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 19. + Name: `Seasons` """ def _get_Ratings(self) -> List[Float64Array]: return [ - self._get_float64_array(self._lib.Obj_GetFloat64Array, x, 20) + self._get_float64_array(self._lib.Obj_GetFloat64Array, x, 21) for x in self._unpack() ] def _set_Ratings(self, value: Union[Float64Array, List[Float64Array]], flags: enums.SetterFlags = 0): - self._set_batch_float64_array_prop(20, value, flags) + self._set_batch_float64_array_prop(21, value, flags) Ratings = property(_get_Ratings, _set_Ratings) # type: List[Float64Array] """ An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. - DSS property name: `Ratings`, DSS property index: 20. + Name: `Ratings` + Default: [-1.0] """ def _get_CapRadius(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 21) + return BatchFloat64ArrayProxy(self, 22) def _set_CapRadius(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(21, value, flags) + self._set_batch_float64_array(22, value, flags) CapRadius = property(_get_CapRadius, _set_CapRadius) # type: BatchFloat64ArrayProxy """ Equivalent conductor radius for capacitance calcs. Specify this for bundled conductors. Defaults to same value as radius. Define Diam or Radius property first. - DSS property name: `CapRadius`, DSS property index: 21. + Name: `CapRadius` """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -800,15 +857,18 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 22. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_batch_string(22, value, flags) + self._set_batch_string(23, value, flags) class CNDataBatchProperties(TypedDict): k: Union[int, Int32Array] DiaStrand: Union[float, Float64Array] GMRStrand: Union[float, Float64Array] RStrand: Union[float, Float64Array] + SemiconLayer: bool EpsR: Union[float, Float64Array] InsLayer: Union[float, Float64Array] DiaIns: Union[float, Float64Array] diff --git a/altdss/CapControl.py b/altdss/CapControl.py index a15c53a..6b8fbf1 100644 --- a/altdss/CapControl.py +++ b/altdss/CapControl.py @@ -99,7 +99,7 @@ def _set_Element_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Full object name of the circuit element, typically a line or transformer, to which the capacitor control's PT and/or CT are connected.There is no default; must be specified. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Element(self) -> DSSObj: @@ -116,7 +116,7 @@ def _set_Element(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlags = """ Full object name of the circuit element, typically a line or transformer, to which the capacitor control's PT and/or CT are connected.There is no default; must be specified. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Terminal(self) -> int: @@ -127,9 +127,10 @@ def _set_Terminal(self, value: int, flags: enums.SetterFlags = 0): Terminal = property(_get_Terminal, _set_Terminal) # type: int """ - Number of the terminal of the circuit element to which the CapControl is connected. 1 or 2, typically. Default is 1. + Number of the terminal of the circuit element to which the CapControl is connected. 1 or 2, typically. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_Capacitor_str(self) -> str: @@ -144,7 +145,7 @@ def _set_Capacitor_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Capacitor=cap1 - DSS property name: `Capacitor`, DSS property index: 3. + Name: `Capacitor` """ def _get_Capacitor(self) -> CapacitorObj: @@ -163,7 +164,7 @@ def _set_Capacitor(self, value: Union[AnyStr, CapacitorObj], flags: enums.Setter Capacitor=cap1 - DSS property name: `Capacitor`, DSS property index: 3. + Name: `Capacitor` """ def _get_Type(self) -> enums.CapControlType: @@ -177,9 +178,10 @@ def _set_Type(self, value: Union[AnyStr, int, enums.CapControlType], flags: enum Type = property(_get_Type, _set_Type) # type: enums.CapControlType """ - {Current | Voltage | kvar | PF | Time | Follow} Control type. Specify the ONsetting and OFFsetting appropriately with the type of control. (See help for ONsetting) + Control type. Specify the ONsetting and OFFsetting appropriately with the type of control. (See help for ONsetting) - DSS property name: `Type`, DSS property index: 4. + Name: `Type` + Default: Current """ def _get_Type_str(self) -> str: @@ -190,9 +192,10 @@ def _set_Type_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Type_str = property(_get_Type_str, _set_Type_str) # type: str """ - {Current | Voltage | kvar | PF | Time | Follow} Control type. Specify the ONsetting and OFFsetting appropriately with the type of control. (See help for ONsetting) + Control type. Specify the ONsetting and OFFsetting appropriately with the type of control. (See help for ONsetting) - DSS property name: `Type`, DSS property index: 4. + Name: `Type` + Default: Current """ def _get_PTRatio(self) -> float: @@ -203,9 +206,10 @@ def _set_PTRatio(self, value: float, flags: enums.SetterFlags = 0): PTRatio = property(_get_PTRatio, _set_PTRatio) # type: float """ - Ratio of the PT that converts the monitored voltage to the control voltage. Default is 60. If the capacitor is Wye, the 1st phase line-to-neutral voltage is monitored. Else, the line-to-line voltage (1st - 2nd phase) is monitored. + Ratio of the PT that converts the monitored voltage to the control voltage. If the capacitor is Wye, the 1st phase line-to-neutral voltage is monitored. Else, the line-to-line voltage (1st - 2nd phase) is monitored. - DSS property name: `PTRatio`, DSS property index: 5. + Name: `PTRatio` + Default: 60.0 """ def _get_CTRatio(self) -> float: @@ -218,7 +222,8 @@ def _set_CTRatio(self, value: float, flags: enums.SetterFlags = 0): """ Ratio of the CT from line amps to control ampere setting for current and kvar control types. - DSS property name: `CTRatio`, DSS property index: 6. + Name: `CTRatio` + Default: 60.0 """ def _get_OnSetting(self) -> float: @@ -240,7 +245,8 @@ def _set_OnSetting(self, value: float, flags: enums.SetterFlags = 0): Time: Hrs from Midnight as a floating point number (decimal). 7:30am would be entered as 7.5. Follow: Follows a loadshape (ControlSignal) to determine when to turn ON/OFF the capacitor. If the value is different than 0 the capacitor will connect to the grid, otherwise, it will be disconnected. - DSS property name: `OnSetting`, DSS property index: 7. + Name: `OnSetting` + Default: 300.0 """ def _get_OffSetting(self) -> float: @@ -253,7 +259,8 @@ def _set_OffSetting(self, value: float, flags: enums.SetterFlags = 0): """ Value at which the control arms to switch the capacitor OFF. (See help for ONsetting)For Time control, is OK to have Off time the next day ( < On time) - DSS property name: `OffSetting`, DSS property index: 8. + Name: `OffSetting` + Default: 200.0 """ def _get_Delay(self) -> float: @@ -266,7 +273,9 @@ def _set_Delay(self, value: float, flags: enums.SetterFlags = 0): """ Time delay, in seconds, from when the control is armed before it sends out the switching command to turn ON. The control may reset before the action actually occurs. This is used to determine which capacity 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: 9. + Name: `Delay` + Units: s + Default: 15.0 """ def _get_VoltOverride(self) -> bool: @@ -277,9 +286,10 @@ def _set_VoltOverride(self, value: bool, flags: enums.SetterFlags = 0): VoltOverride = property(_get_VoltOverride, _set_VoltOverride) # type: bool """ - {Yes | No} Default is No. Switch to indicate whether VOLTAGE OVERRIDE is to be considered. Vmax and Vmin must be set to reasonable values if this property is Yes. + Switch to indicate whether VOLTAGE OVERRIDE is to be considered. Vmax and Vmin must be set to reasonable values if this property is Yes. - DSS property name: `VoltOverride`, DSS property index: 10. + Name: `VoltOverride` + Default: False """ def _get_VMax(self) -> float: @@ -290,9 +300,11 @@ def _set_VMax(self, value: float, flags: enums.SetterFlags = 0): VMax = property(_get_VMax, _set_VMax) # type: float """ - Maximum voltage, in volts. If the voltage across the capacitor divided by the PTRATIO is greater than this voltage, the capacitor will switch OFF regardless of other control settings. Default is 126 (goes with a PT ratio of 60 for 12.47 kV system). + Maximum voltage. If the voltage across the capacitor divided by the PTRATIO is greater than this voltage, the capacitor will switch OFF regardless of other control settings. Default is 126 (goes with a PT ratio of 60 for 12.47 kV system). - DSS property name: `VMax`, DSS property index: 11. + Name: `VMax` + Units: V + Default: 126.0 """ def _get_VMin(self) -> float: @@ -303,9 +315,11 @@ def _set_VMin(self, value: float, flags: enums.SetterFlags = 0): VMin = property(_get_VMin, _set_VMin) # type: float """ - Minimum voltage, in volts. If the voltage across the capacitor divided by the PTRATIO is less than this voltage, the capacitor will switch ON regardless of other control settings. Default is 115 (goes with a PT ratio of 60 for 12.47 kV system). + Minimum voltage. If the voltage across the capacitor divided by the PTRATIO is less than this voltage, the capacitor will switch ON regardless of other control settings. Default is 115 (goes with a PT ratio of 60 for 12.47 kV system). - DSS property name: `VMin`, DSS property index: 12. + Name: `VMin` + Units: V + Default: 115.0 """ def _get_DelayOff(self) -> float: @@ -316,9 +330,11 @@ def _set_DelayOff(self, value: float, flags: enums.SetterFlags = 0): DelayOff = property(_get_DelayOff, _set_DelayOff) # type: float """ - Time delay, in seconds, for control to turn OFF when present state is ON. Default is 15. + Time delay for control to turn OFF when present state is ON. - DSS property name: `DelayOff`, DSS property index: 13. + Name: `DelayOff` + Units: s + Default: 15.0 """ def _get_DeadTime(self) -> float: @@ -329,9 +345,11 @@ def _set_DeadTime(self, value: float, flags: enums.SetterFlags = 0): DeadTime = property(_get_DeadTime, _set_DeadTime) # type: float """ - Dead time after capacitor is turned OFF before it can be turned back ON. Default is 300 sec. + Dead time after capacitor is turned OFF before it can be turned back ON. - DSS property name: `DeadTime`, DSS property index: 14. + Name: `DeadTime` + Units: s + Default: 300.0 """ def _get_CTPhase(self) -> Union[enums.MonitoredPhase, int]: @@ -349,9 +367,10 @@ def _set_CTPhase(self, value: Union[AnyStr, int, enums.MonitoredPhase], flags: e CTPhase = property(_get_CTPhase, _set_CTPhase) # type: enums.MonitoredPhase """ - Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. + Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. - DSS property name: `CTPhase`, DSS property index: 15. + Name: `CTPhase` + Default: 1 """ def _get_CTPhase_str(self) -> str: @@ -362,9 +381,10 @@ def _set_CTPhase_str(self, value: AnyStr, flags: enums.SetterFlags = 0): CTPhase_str = property(_get_CTPhase_str, _set_CTPhase_str) # type: str """ - Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. + Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. - DSS property name: `CTPhase`, DSS property index: 15. + Name: `CTPhase` + Default: 1 """ def _get_PTPhase(self) -> Union[enums.MonitoredPhase, int]: @@ -382,9 +402,10 @@ def _set_PTPhase(self, value: Union[AnyStr, int, enums.MonitoredPhase], flags: e PTPhase = property(_get_PTPhase, _set_PTPhase) # type: enums.MonitoredPhase """ - Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. + Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. - DSS property name: `PTPhase`, DSS property index: 16. + Name: `PTPhase` + Default: 1 """ def _get_PTPhase_str(self) -> str: @@ -395,9 +416,10 @@ def _set_PTPhase_str(self, value: AnyStr, flags: enums.SetterFlags = 0): PTPhase_str = property(_get_PTPhase_str, _set_PTPhase_str) # type: str """ - Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. + Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. - DSS property name: `PTPhase`, DSS property index: 16. + Name: `PTPhase` + Default: 1 """ def _get_VBus(self) -> str: @@ -410,7 +432,7 @@ def _set_VBus(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of bus to use for voltage override function. Default is bus at monitored terminal. Sometimes it is useful to monitor a bus in another location to emulate various DMS control algorithms. - DSS property name: `VBus`, DSS property index: 17. + Name: `VBus` """ def _get_EventLog(self) -> bool: @@ -421,9 +443,10 @@ def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): EventLog = property(_get_EventLog, _set_EventLog) # type: bool """ - {Yes/True | No/False*} Default is NO for CapControl. Log control actions to Eventlog. + Log control actions to Eventlog. - DSS property name: `EventLog`, DSS property index: 18. + Name: `EventLog` + Default: False """ def _get_UserModel(self) -> str: @@ -436,7 +459,7 @@ def _set_UserModel(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of DLL containing user-written CapControl model, overriding the default model. Set to "none" to negate previous setting. - DSS property name: `UserModel`, DSS property index: 19. + Name: `UserModel` """ def _get_UserData(self) -> str: @@ -449,7 +472,7 @@ def _set_UserData(self, value: AnyStr, flags: enums.SetterFlags = 0): """ String (in quotes or parentheses if necessary) that gets passed to the user-written CapControl model Edit function for defining the data required for that model. - DSS property name: `UserData`, DSS property index: 20. + Name: `UserData` """ def _get_pctMinkvar(self) -> float: @@ -460,16 +483,18 @@ def _set_pctMinkvar(self, value: float, flags: enums.SetterFlags = 0): pctMinkvar = property(_get_pctMinkvar, _set_pctMinkvar) # type: float """ - For PF control option, min percent of total bank kvar at which control will close capacitor switch. Default = 50. + For PF control option, min percent of total bank kvar at which control will close capacitor switch. - DSS property name: `pctMinkvar`, DSS property index: 21. + Name: `pctMinkvar` + Default: 50.0 """ def Reset(self, value: bool = True, flags: enums.SetterFlags = 0): """ - {Yes | No} If Yes, forces Reset of this CapControl. + If Yes, forces Reset of this CapControl. - DSS property name: `Reset`, DSS property index: 22. + Name: `Reset` + Default: False """ self._lib.Obj_SetInt32(self._ptr, 22, value, flags) @@ -483,7 +508,7 @@ def _set_ControlSignal_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Load shape used for controlling the connection/disconnection of the capacitor to the grid, when the load shape is DIFFERENT than ZERO (0) the capacitor will be ON and connected to the grid. Otherwise, if the load shape value is EQUAL to ZERO (0) the capacitor bank will be OFF and disconnected from the grid. - DSS property name: `ControlSignal`, DSS property index: 23. + Name: `ControlSignal` """ def _get_ControlSignal(self) -> LoadShape: @@ -500,7 +525,7 @@ def _set_ControlSignal(self, value: Union[AnyStr, LoadShape], flags: enums.Sette """ Load shape used for controlling the connection/disconnection of the capacitor to the grid, when the load shape is DIFFERENT than ZERO (0) the capacitor will be ON and connected to the grid. Otherwise, if the load shape value is EQUAL to ZERO (0) the capacitor bank will be OFF and disconnected from the grid. - DSS property name: `ControlSignal`, DSS property index: 23. + Name: `ControlSignal` """ def _get_BaseFreq(self) -> float: @@ -513,7 +538,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 24. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -524,9 +550,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 25. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -535,7 +562,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 26. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(26, value) @@ -609,7 +638,7 @@ def _set_Element_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett """ Full object name of the circuit element, typically a line or transformer, to which the capacitor control's PT and/or CT are connected.There is no default; must be specified. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Element(self) -> List[DSSObj]: @@ -622,7 +651,7 @@ def _set_Element(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSObj]], """ Full object name of the circuit element, typically a line or transformer, to which the capacitor control's PT and/or CT are connected.There is no default; must be specified. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Terminal(self) -> BatchInt32ArrayProxy: @@ -633,9 +662,10 @@ def _set_Terminal(self, value: Union[int, Int32Array], flags: enums.SetterFlags Terminal = property(_get_Terminal, _set_Terminal) # type: BatchInt32ArrayProxy """ - Number of the terminal of the circuit element to which the CapControl is connected. 1 or 2, typically. Default is 1. + Number of the terminal of the circuit element to which the CapControl is connected. 1 or 2, typically. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_Capacitor_str(self) -> List[str]: @@ -650,7 +680,7 @@ def _set_Capacitor_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Se Capacitor=cap1 - DSS property name: `Capacitor`, DSS property index: 3. + Name: `Capacitor` """ def _get_Capacitor(self) -> List[CapacitorObj]: @@ -665,7 +695,7 @@ def _set_Capacitor(self, value: Union[AnyStr, CapacitorObj, List[AnyStr], List[C Capacitor=cap1 - DSS property name: `Capacitor`, DSS property index: 3. + Name: `Capacitor` """ def _get_Type(self) -> BatchInt32ArrayProxy: @@ -680,9 +710,10 @@ def _set_Type(self, value: Union[AnyStr, int, enums.CapControlType, List[AnyStr] Type = property(_get_Type, _set_Type) # type: BatchInt32ArrayProxy """ - {Current | Voltage | kvar | PF | Time | Follow} Control type. Specify the ONsetting and OFFsetting appropriately with the type of control. (See help for ONsetting) + Control type. Specify the ONsetting and OFFsetting appropriately with the type of control. (See help for ONsetting) - DSS property name: `Type`, DSS property index: 4. + Name: `Type` + Default: Current """ def _get_Type_str(self) -> List[str]: @@ -693,9 +724,10 @@ def _set_Type_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Type_str = property(_get_Type_str, _set_Type_str) # type: List[str] """ - {Current | Voltage | kvar | PF | Time | Follow} Control type. Specify the ONsetting and OFFsetting appropriately with the type of control. (See help for ONsetting) + Control type. Specify the ONsetting and OFFsetting appropriately with the type of control. (See help for ONsetting) - DSS property name: `Type`, DSS property index: 4. + Name: `Type` + Default: Current """ def _get_PTRatio(self) -> BatchFloat64ArrayProxy: @@ -706,9 +738,10 @@ def _set_PTRatio(self, value: Union[float, Float64Array], flags: enums.SetterFla PTRatio = property(_get_PTRatio, _set_PTRatio) # type: BatchFloat64ArrayProxy """ - Ratio of the PT that converts the monitored voltage to the control voltage. Default is 60. If the capacitor is Wye, the 1st phase line-to-neutral voltage is monitored. Else, the line-to-line voltage (1st - 2nd phase) is monitored. + Ratio of the PT that converts the monitored voltage to the control voltage. If the capacitor is Wye, the 1st phase line-to-neutral voltage is monitored. Else, the line-to-line voltage (1st - 2nd phase) is monitored. - DSS property name: `PTRatio`, DSS property index: 5. + Name: `PTRatio` + Default: 60.0 """ def _get_CTRatio(self) -> BatchFloat64ArrayProxy: @@ -721,7 +754,8 @@ def _set_CTRatio(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Ratio of the CT from line amps to control ampere setting for current and kvar control types. - DSS property name: `CTRatio`, DSS property index: 6. + Name: `CTRatio` + Default: 60.0 """ def _get_OnSetting(self) -> BatchFloat64ArrayProxy: @@ -743,7 +777,8 @@ def _set_OnSetting(self, value: Union[float, Float64Array], flags: enums.SetterF Time: Hrs from Midnight as a floating point number (decimal). 7:30am would be entered as 7.5. Follow: Follows a loadshape (ControlSignal) to determine when to turn ON/OFF the capacitor. If the value is different than 0 the capacitor will connect to the grid, otherwise, it will be disconnected. - DSS property name: `OnSetting`, DSS property index: 7. + Name: `OnSetting` + Default: 300.0 """ def _get_OffSetting(self) -> BatchFloat64ArrayProxy: @@ -756,7 +791,8 @@ def _set_OffSetting(self, value: Union[float, Float64Array], flags: enums.Setter """ Value at which the control arms to switch the capacitor OFF. (See help for ONsetting)For Time control, is OK to have Off time the next day ( < On time) - DSS property name: `OffSetting`, DSS property index: 8. + Name: `OffSetting` + Default: 200.0 """ def _get_Delay(self) -> BatchFloat64ArrayProxy: @@ -769,7 +805,9 @@ def _set_Delay(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Time delay, in seconds, from when the control is armed before it sends out the switching command to turn ON. The control may reset before the action actually occurs. This is used to determine which capacity 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: 9. + Name: `Delay` + Units: s + Default: 15.0 """ def _get_VoltOverride(self) -> List[bool]: @@ -777,14 +815,15 @@ def _get_VoltOverride(self) -> List[bool]: self._get_batch_int32_prop(10) ] - def _set_VoltOverride(self, value: bool, flags: enums.SetterFlags = 0): + def _set_VoltOverride(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(10, value, flags) VoltOverride = property(_get_VoltOverride, _set_VoltOverride) # type: List[bool] """ - {Yes | No} Default is No. Switch to indicate whether VOLTAGE OVERRIDE is to be considered. Vmax and Vmin must be set to reasonable values if this property is Yes. + Switch to indicate whether VOLTAGE OVERRIDE is to be considered. Vmax and Vmin must be set to reasonable values if this property is Yes. - DSS property name: `VoltOverride`, DSS property index: 10. + Name: `VoltOverride` + Default: False """ def _get_VMax(self) -> BatchFloat64ArrayProxy: @@ -795,9 +834,11 @@ def _set_VMax(self, value: Union[float, Float64Array], flags: enums.SetterFlags VMax = property(_get_VMax, _set_VMax) # type: BatchFloat64ArrayProxy """ - Maximum voltage, in volts. If the voltage across the capacitor divided by the PTRATIO is greater than this voltage, the capacitor will switch OFF regardless of other control settings. Default is 126 (goes with a PT ratio of 60 for 12.47 kV system). + Maximum voltage. If the voltage across the capacitor divided by the PTRATIO is greater than this voltage, the capacitor will switch OFF regardless of other control settings. Default is 126 (goes with a PT ratio of 60 for 12.47 kV system). - DSS property name: `VMax`, DSS property index: 11. + Name: `VMax` + Units: V + Default: 126.0 """ def _get_VMin(self) -> BatchFloat64ArrayProxy: @@ -808,9 +849,11 @@ def _set_VMin(self, value: Union[float, Float64Array], flags: enums.SetterFlags VMin = property(_get_VMin, _set_VMin) # type: BatchFloat64ArrayProxy """ - Minimum voltage, in volts. If the voltage across the capacitor divided by the PTRATIO is less than this voltage, the capacitor will switch ON regardless of other control settings. Default is 115 (goes with a PT ratio of 60 for 12.47 kV system). + Minimum voltage. If the voltage across the capacitor divided by the PTRATIO is less than this voltage, the capacitor will switch ON regardless of other control settings. Default is 115 (goes with a PT ratio of 60 for 12.47 kV system). - DSS property name: `VMin`, DSS property index: 12. + Name: `VMin` + Units: V + Default: 115.0 """ def _get_DelayOff(self) -> BatchFloat64ArrayProxy: @@ -821,9 +864,11 @@ def _set_DelayOff(self, value: Union[float, Float64Array], flags: enums.SetterFl DelayOff = property(_get_DelayOff, _set_DelayOff) # type: BatchFloat64ArrayProxy """ - Time delay, in seconds, for control to turn OFF when present state is ON. Default is 15. + Time delay for control to turn OFF when present state is ON. - DSS property name: `DelayOff`, DSS property index: 13. + Name: `DelayOff` + Units: s + Default: 15.0 """ def _get_DeadTime(self) -> BatchFloat64ArrayProxy: @@ -834,9 +879,11 @@ def _set_DeadTime(self, value: Union[float, Float64Array], flags: enums.SetterFl DeadTime = property(_get_DeadTime, _set_DeadTime) # type: BatchFloat64ArrayProxy """ - Dead time after capacitor is turned OFF before it can be turned back ON. Default is 300 sec. + Dead time after capacitor is turned OFF before it can be turned back ON. - DSS property name: `DeadTime`, DSS property index: 14. + Name: `DeadTime` + Units: s + Default: 300.0 """ def _get_CTPhase(self) -> BatchInt32ArrayProxy: @@ -851,9 +898,10 @@ def _set_CTPhase(self, value: Union[AnyStr, int, enums.MonitoredPhase, List[AnyS CTPhase = property(_get_CTPhase, _set_CTPhase) # type: BatchInt32ArrayProxy """ - Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. + Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. - DSS property name: `CTPhase`, DSS property index: 15. + Name: `CTPhase` + Default: 1 """ def _get_CTPhase_str(self) -> List[str]: @@ -864,9 +912,10 @@ def _set_CTPhase_str(self, value: AnyStr, flags: enums.SetterFlags = 0): CTPhase_str = property(_get_CTPhase_str, _set_CTPhase_str) # type: List[str] """ - Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. + Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. - DSS property name: `CTPhase`, DSS property index: 15. + Name: `CTPhase` + Default: 1 """ def _get_PTPhase(self) -> BatchInt32ArrayProxy: @@ -881,9 +930,10 @@ def _set_PTPhase(self, value: Union[AnyStr, int, enums.MonitoredPhase, List[AnyS PTPhase = property(_get_PTPhase, _set_PTPhase) # type: BatchInt32ArrayProxy """ - Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. + Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. - DSS property name: `PTPhase`, DSS property index: 16. + Name: `PTPhase` + Default: 1 """ def _get_PTPhase_str(self) -> List[str]: @@ -894,9 +944,10 @@ def _set_PTPhase_str(self, value: AnyStr, flags: enums.SetterFlags = 0): PTPhase_str = property(_get_PTPhase_str, _set_PTPhase_str) # type: List[str] """ - Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. + Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default. - DSS property name: `PTPhase`, DSS property index: 16. + Name: `PTPhase` + Default: 1 """ def _get_VBus(self) -> List[str]: @@ -909,7 +960,7 @@ def _set_VBus(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Name of bus to use for voltage override function. Default is bus at monitored terminal. Sometimes it is useful to monitor a bus in another location to emulate various DMS control algorithms. - DSS property name: `VBus`, DSS property index: 17. + Name: `VBus` """ def _get_EventLog(self) -> List[bool]: @@ -917,14 +968,15 @@ def _get_EventLog(self) -> List[bool]: self._get_batch_int32_prop(18) ] - def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): + def _set_EventLog(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(18, value, flags) EventLog = property(_get_EventLog, _set_EventLog) # type: List[bool] """ - {Yes/True | No/False*} Default is NO for CapControl. Log control actions to Eventlog. + Log control actions to Eventlog. - DSS property name: `EventLog`, DSS property index: 18. + Name: `EventLog` + Default: False """ def _get_UserModel(self) -> List[str]: @@ -937,7 +989,7 @@ def _set_UserModel(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ Name of DLL containing user-written CapControl model, overriding the default model. Set to "none" to negate previous setting. - DSS property name: `UserModel`, DSS property index: 19. + Name: `UserModel` """ def _get_UserData(self) -> List[str]: @@ -950,7 +1002,7 @@ def _set_UserData(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ String (in quotes or parentheses if necessary) that gets passed to the user-written CapControl model Edit function for defining the data required for that model. - DSS property name: `UserData`, DSS property index: 20. + Name: `UserData` """ def _get_pctMinkvar(self) -> BatchFloat64ArrayProxy: @@ -961,16 +1013,18 @@ def _set_pctMinkvar(self, value: Union[float, Float64Array], flags: enums.Setter pctMinkvar = property(_get_pctMinkvar, _set_pctMinkvar) # type: BatchFloat64ArrayProxy """ - For PF control option, min percent of total bank kvar at which control will close capacitor switch. Default = 50. + For PF control option, min percent of total bank kvar at which control will close capacitor switch. - DSS property name: `pctMinkvar`, DSS property index: 21. + Name: `pctMinkvar` + Default: 50.0 """ def Reset(self, value: Union[bool, List[bool]] = True, flags: enums.SetterFlags = 0): """ - {Yes | No} If Yes, forces Reset of this CapControl. + If Yes, forces Reset of this CapControl. - DSS property name: `Reset`, DSS property index: 22. + Name: `Reset` + Default: False """ self._set_batch_int32_array(22, value, flags) @@ -984,7 +1038,7 @@ def _set_ControlSignal_str(self, value: Union[AnyStr, List[AnyStr]], flags: enum """ Load shape used for controlling the connection/disconnection of the capacitor to the grid, when the load shape is DIFFERENT than ZERO (0) the capacitor will be ON and connected to the grid. Otherwise, if the load shape value is EQUAL to ZERO (0) the capacitor bank will be OFF and disconnected from the grid. - DSS property name: `ControlSignal`, DSS property index: 23. + Name: `ControlSignal` """ def _get_ControlSignal(self) -> List[LoadShape]: @@ -997,7 +1051,7 @@ def _set_ControlSignal(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[ """ Load shape used for controlling the connection/disconnection of the capacitor to the grid, when the load shape is DIFFERENT than ZERO (0) the capacitor will be ON and connected to the grid. Otherwise, if the load shape value is EQUAL to ZERO (0) the capacitor bank will be OFF and disconnected from the grid. - DSS property name: `ControlSignal`, DSS property index: 23. + Name: `ControlSignal` """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -1010,7 +1064,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 24. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -1018,14 +1073,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(25) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(25, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 25. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1034,7 +1090,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 26. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(26, value, flags) diff --git a/altdss/Capacitor.py b/altdss/Capacitor.py index ab4132b..c24353c 100644 --- a/altdss/Capacitor.py +++ b/altdss/Capacitor.py @@ -91,7 +91,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): If only one bus specified, Bus2 will default to this bus, Node 0, and the capacitor will be a Yg shunt bank. - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> str: @@ -106,7 +106,7 @@ def _set_Bus2(self, value: AnyStr, flags: enums.SetterFlags = 0): Not necessary to specify for delta (LL) connection. - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_Phases(self) -> int: @@ -119,7 +119,8 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): """ Number of phases. - DSS property name: `Phases`, DSS property index: 3. + Name: `Phases` + Default: 3 """ def _get_kvar(self) -> Float64Array: @@ -132,7 +133,9 @@ def _set_kvar(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Total kvar, if one step, or ARRAY of kvar ratings for each step. Evenly divided among phases. See rules for NUMSTEPS. - DSS property name: `kvar`, DSS property index: 4. + Name: `kvar` + Units: kvar + Default: [1200.0] """ def _get_kV(self) -> float: @@ -145,7 +148,9 @@ def _set_kV(self, value: float, flags: enums.SetterFlags = 0): """ For 2, 3-phase, kV phase-phase. Otherwise specify actual can rating. - DSS property name: `kV`, DSS property index: 5. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_Conn(self) -> enums.Connection: @@ -161,7 +166,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection], flags: enums.Se """ ={wye | delta |LN |LL} Default is wye, which is equivalent to LN - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> str: @@ -174,7 +180,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={wye | delta |LN |LL} Default is wye, which is equivalent to LN - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Wye """ def _get_CMatrix(self) -> Float64Array: @@ -185,13 +192,14 @@ def _set_CMatrix(self, value: Float64Array, flags: enums.SetterFlags = 0): CMatrix = property(_get_CMatrix, _set_CMatrix) # type: Float64Array """ - Nodal cap. matrix, lower triangle, microfarads, of the following form: + Nodal cap. matrix, lower triangle, of the following form: cmatrix="c11 | -c21 c22 | -c31 -c32 c33" All steps are assumed the same if this property is used. - DSS property name: `CMatrix`, DSS property index: 7. + Name: `CMatrix` + Units: μF """ def _get_Cuf(self) -> Float64Array: @@ -202,10 +210,11 @@ def _set_Cuf(self, value: Float64Array, flags: enums.SetterFlags = 0): Cuf = property(_get_Cuf, _set_Cuf) # type: Float64Array """ - ARRAY of Capacitance, each phase, for each step, microfarads. + ARRAY of Capacitance, each phase, for each step. See Rules for NumSteps. - DSS property name: `Cuf`, DSS property index: 8. + Name: `Cuf` + Units: μF """ def _get_R(self) -> Float64Array: @@ -216,9 +225,10 @@ def _set_R(self, value: Float64Array, flags: enums.SetterFlags = 0): R = property(_get_R, _set_R) # type: Float64Array """ - ARRAY of series resistance in each phase (line), ohms. Default is 0.0 + ARRAY of series resistance in each phase (line), ohms. - DSS property name: `R`, DSS property index: 9. + Name: `R` + Default: [0.0] """ def _get_XL(self) -> Float64Array: @@ -229,9 +239,10 @@ def _set_XL(self, value: Float64Array, flags: enums.SetterFlags = 0): XL = property(_get_XL, _set_XL) # type: Float64Array """ - ARRAY of series inductive reactance(s) in each phase (line) for filter, ohms at base frequency. Use this OR "h" property to define filter. Default is 0.0. + ARRAY of series inductive reactance(s) in each phase (line) for filter, ohms at base frequency. Use this OR "h" property to define filter. - DSS property name: `XL`, DSS property index: 10. + Name: `XL` + Default: [0.0] """ def _get_Harm(self) -> Float64Array: @@ -244,7 +255,8 @@ def _set_Harm(self, value: Float64Array, flags: enums.SetterFlags = 0): """ ARRAY of harmonics to which each step is tuned. Zero is interpreted as meaning zero reactance (no filter). Default is zero. - DSS property name: `Harm`, DSS property index: 11. + Name: `Harm` + Default: [0.0] """ def _get_NumSteps(self) -> int: @@ -255,9 +267,9 @@ def _set_NumSteps(self, value: int, flags: enums.SetterFlags = 0): NumSteps = property(_get_NumSteps, _set_NumSteps) # type: int """ - Number of steps in this capacitor bank. Default = 1. Forces reallocation of the capacitance, reactor, and states array. Rules: If this property was previously =1, the value in the kvar property is divided equally among the steps. The kvar property does not need to be reset if that is accurate. If the Cuf or Cmatrix property was used previously, all steps are set to the value of the first step. The states property is set to all steps on. All filter steps are set to the same harmonic. If this property was previously >1, the arrays are reallocated, but no values are altered. You must SUBSEQUENTLY assign all array properties. + Number of steps in this capacitor bank. Forces reallocation of the capacitance, reactor, and states array. Rules: If this property was previously =1, the value in the kvar property is divided equally among the steps. The kvar property does not need to be reset if that is accurate. If the Cuf or Cmatrix property was used previously, all steps are set to the value of the first step. The states property is set to all steps on. All filter steps are set to the same harmonic. If this property was previously >1, the arrays are reallocated, but no values are altered. You must SUBSEQUENTLY assign all array properties. - DSS property name: `NumSteps`, DSS property index: 12. + Name: `NumSteps` """ def _get_States(self) -> Int32Array: @@ -270,7 +282,8 @@ def _set_States(self, value: Int32Array, flags: enums.SetterFlags = 0): """ ARRAY of integers {1|0} states representing the state of each step (on|off). Defaults to 1 when reallocated (on). Capcontrol will modify this array as it turns steps on or off. - DSS property name: `States`, DSS property index: 13. + Name: `States` + Default: [1] """ def _get_NormAmps(self) -> float: @@ -283,7 +296,8 @@ def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): """ Normal rated current. Defaults to 180% of per-phase rated current. - DSS property name: `NormAmps`, DSS property index: 14. + Name: `NormAmps` + Default: 75.00460594123444 """ def _get_EmergAmps(self) -> float: @@ -296,7 +310,8 @@ def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): """ Maximum or emerg current. Defaults to 180% of per-phase rated current. - DSS property name: `EmergAmps`, DSS property index: 15. + Name: `EmergAmps` + Default: 100.00614125497927 """ def _get_FaultRate(self) -> float: @@ -309,7 +324,8 @@ def _set_FaultRate(self, value: float, flags: enums.SetterFlags = 0): """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 16. + Name: `FaultRate` + Default: 0.0005 """ def _get_pctPerm(self) -> float: @@ -322,7 +338,8 @@ def _set_pctPerm(self, value: float, flags: enums.SetterFlags = 0): """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 17. + Name: `pctPerm` + Default: 100.0 """ def _get_Repair(self) -> float: @@ -335,7 +352,8 @@ def _set_Repair(self, value: float, flags: enums.SetterFlags = 0): """ Hours to repair. - DSS property name: `Repair`, DSS property index: 18. + Name: `Repair` + Default: 3.0 """ def _get_BaseFreq(self) -> float: @@ -348,7 +366,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 19. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -359,9 +378,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 20. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -370,7 +390,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 21. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(21, value) @@ -444,7 +466,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags If only one bus specified, Bus2 will default to this bus, Node 0, and the capacitor will be a Yg shunt bank. - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> List[str]: @@ -459,7 +481,7 @@ def _set_Bus2(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags Not necessary to specify for delta (LL) connection. - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -472,7 +494,8 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of phases. - DSS property name: `Phases`, DSS property index: 3. + Name: `Phases` + Default: 3 """ def _get_kvar(self) -> List[Float64Array]: @@ -488,7 +511,9 @@ def _set_kvar(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Total kvar, if one step, or ARRAY of kvar ratings for each step. Evenly divided among phases. See rules for NUMSTEPS. - DSS property name: `kvar`, DSS property index: 4. + Name: `kvar` + Units: kvar + Default: [1200.0] """ def _get_kV(self) -> BatchFloat64ArrayProxy: @@ -501,7 +526,9 @@ def _set_kV(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ For 2, 3-phase, kV phase-phase. Otherwise specify actual can rating. - DSS property name: `kV`, DSS property index: 5. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_Conn(self) -> BatchInt32ArrayProxy: @@ -518,7 +545,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection, List[AnyStr], Li """ ={wye | delta |LN |LL} Default is wye, which is equivalent to LN - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> List[str]: @@ -531,7 +559,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={wye | delta |LN |LL} Default is wye, which is equivalent to LN - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Wye """ def _get_CMatrix(self) -> List[Float64Array]: @@ -545,13 +574,14 @@ def _set_CMatrix(self, value: Union[Float64Array, List[Float64Array]], flags: en CMatrix = property(_get_CMatrix, _set_CMatrix) # type: List[Float64Array] """ - Nodal cap. matrix, lower triangle, microfarads, of the following form: + Nodal cap. matrix, lower triangle, of the following form: cmatrix="c11 | -c21 c22 | -c31 -c32 c33" All steps are assumed the same if this property is used. - DSS property name: `CMatrix`, DSS property index: 7. + Name: `CMatrix` + Units: μF """ def _get_Cuf(self) -> List[Float64Array]: @@ -565,10 +595,11 @@ def _set_Cuf(self, value: Union[Float64Array, List[Float64Array]], flags: enums. Cuf = property(_get_Cuf, _set_Cuf) # type: List[Float64Array] """ - ARRAY of Capacitance, each phase, for each step, microfarads. + ARRAY of Capacitance, each phase, for each step. See Rules for NumSteps. - DSS property name: `Cuf`, DSS property index: 8. + Name: `Cuf` + Units: μF """ def _get_R(self) -> List[Float64Array]: @@ -582,9 +613,10 @@ def _set_R(self, value: Union[Float64Array, List[Float64Array]], flags: enums.Se R = property(_get_R, _set_R) # type: List[Float64Array] """ - ARRAY of series resistance in each phase (line), ohms. Default is 0.0 + ARRAY of series resistance in each phase (line), ohms. - DSS property name: `R`, DSS property index: 9. + Name: `R` + Default: [0.0] """ def _get_XL(self) -> List[Float64Array]: @@ -598,9 +630,10 @@ def _set_XL(self, value: Union[Float64Array, List[Float64Array]], flags: enums.S XL = property(_get_XL, _set_XL) # type: List[Float64Array] """ - ARRAY of series inductive reactance(s) in each phase (line) for filter, ohms at base frequency. Use this OR "h" property to define filter. Default is 0.0. + ARRAY of series inductive reactance(s) in each phase (line) for filter, ohms at base frequency. Use this OR "h" property to define filter. - DSS property name: `XL`, DSS property index: 10. + Name: `XL` + Default: [0.0] """ def _get_Harm(self) -> List[Float64Array]: @@ -616,7 +649,8 @@ def _set_Harm(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ ARRAY of harmonics to which each step is tuned. Zero is interpreted as meaning zero reactance (no filter). Default is zero. - DSS property name: `Harm`, DSS property index: 11. + Name: `Harm` + Default: [0.0] """ def _get_NumSteps(self) -> BatchInt32ArrayProxy: @@ -627,9 +661,9 @@ def _set_NumSteps(self, value: Union[int, Int32Array], flags: enums.SetterFlags NumSteps = property(_get_NumSteps, _set_NumSteps) # type: BatchInt32ArrayProxy """ - Number of steps in this capacitor bank. Default = 1. Forces reallocation of the capacitance, reactor, and states array. Rules: If this property was previously =1, the value in the kvar property is divided equally among the steps. The kvar property does not need to be reset if that is accurate. If the Cuf or Cmatrix property was used previously, all steps are set to the value of the first step. The states property is set to all steps on. All filter steps are set to the same harmonic. If this property was previously >1, the arrays are reallocated, but no values are altered. You must SUBSEQUENTLY assign all array properties. + Number of steps in this capacitor bank. Forces reallocation of the capacitance, reactor, and states array. Rules: If this property was previously =1, the value in the kvar property is divided equally among the steps. The kvar property does not need to be reset if that is accurate. If the Cuf or Cmatrix property was used previously, all steps are set to the value of the first step. The states property is set to all steps on. All filter steps are set to the same harmonic. If this property was previously >1, the arrays are reallocated, but no values are altered. You must SUBSEQUENTLY assign all array properties. - DSS property name: `NumSteps`, DSS property index: 12. + Name: `NumSteps` """ def _get_States(self) -> List[Int32Array]: @@ -645,7 +679,8 @@ def _set_States(self, value: Union[Int32Array, List[Int32Array]], flags: enums.S """ ARRAY of integers {1|0} states representing the state of each step (on|off). Defaults to 1 when reallocated (on). Capcontrol will modify this array as it turns steps on or off. - DSS property name: `States`, DSS property index: 13. + Name: `States` + Default: [1] """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: @@ -658,7 +693,8 @@ def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Normal rated current. Defaults to 180% of per-phase rated current. - DSS property name: `NormAmps`, DSS property index: 14. + Name: `NormAmps` + Default: 75.00460594123444 """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: @@ -671,7 +707,8 @@ def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterF """ Maximum or emerg current. Defaults to 180% of per-phase rated current. - DSS property name: `EmergAmps`, DSS property index: 15. + Name: `EmergAmps` + Default: 100.00614125497927 """ def _get_FaultRate(self) -> BatchFloat64ArrayProxy: @@ -684,7 +721,8 @@ def _set_FaultRate(self, value: Union[float, Float64Array], flags: enums.SetterF """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 16. + Name: `FaultRate` + Default: 0.0005 """ def _get_pctPerm(self) -> BatchFloat64ArrayProxy: @@ -697,7 +735,8 @@ def _set_pctPerm(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 17. + Name: `pctPerm` + Default: 100.0 """ def _get_Repair(self) -> BatchFloat64ArrayProxy: @@ -710,7 +749,8 @@ def _set_Repair(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Hours to repair. - DSS property name: `Repair`, DSS property index: 18. + Name: `Repair` + Default: 3.0 """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -723,7 +763,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 19. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -731,14 +772,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(20) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(20, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 20. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -747,7 +789,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 21. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(21, value, flags) diff --git a/altdss/CircuitElement.py b/altdss/CircuitElement.py index 33eb199..f40fd62 100644 --- a/altdss/CircuitElement.py +++ b/altdss/CircuitElement.py @@ -142,7 +142,7 @@ def HasVoltControl(self) -> bool: ''' return self._lib.Alt_CE_Get_HasVoltControl(self._ptr) != 0 - def IsOpen(self, terminal: int, phase: int) -> bool: + def IsOpen(self, terminal: int, phase: int = 0) -> bool: ''' Returns true if the specified terminal and phase are open. @@ -150,14 +150,14 @@ def IsOpen(self, terminal: int, phase: int) -> bool: ''' return self._lib.Alt_CE_IsOpen(self._ptr, terminal, phase) != 0 - def MaxCurrent(self, terminal: int) -> float: + def MaxCurrent(self, terminal: int = -1) -> float: ''' Returns the maximum current (magnitude) at the specified terminal. Use -1 as terminal to get the value across all terminals. ''' return self._lib.Alt_CE_MaxCurrent(self._ptr, terminal) - def Open(self, terminal: int, phase: int) -> None: + def Open(self, terminal: int, phase: int = 0) -> None: ''' Open the specified terminal and phase, if non-zero, or all conductors at the terminal. @@ -165,7 +165,7 @@ def Open(self, terminal: int, phase: int) -> None: ''' self._lib.Alt_CE_Open(self._ptr, terminal, phase) - def Close(self, terminal: int, phase: int) -> None: + def Close(self, terminal: int, phase: int = 0) -> None: ''' Close the specified terminal and phase, if non-zero, or all conductors at the terminal. @@ -191,7 +191,9 @@ def NodeRef(self) -> Int32Array: def ComplexSeqVoltages(self) -> ComplexArray: ''' - Complex double array of Sequence Voltage for all terminals of active circuit element. + Complex array of sequence voltages for all terminals of this circuit element. + + Each column represents a terminal. Original COM help: https://opendss.epri.com/CplxSeqVoltages1.html ''' @@ -199,7 +201,9 @@ def ComplexSeqVoltages(self) -> ComplexArray: def ComplexSeqCurrents(self) -> ComplexArray: ''' - Complex double array of Sequence Currents for all conductors of all terminals of active circuit element. + Complex array of sequence currents for all terminals of this circuit element. + + Each column represents a terminal. Original COM help: https://opendss.epri.com/CplxSeqCurrents.html ''' @@ -213,6 +217,14 @@ def Currents(self) -> ComplexArray: ''' return self._get_fcomplex128_array(self._lib.Alt_CE_Get_Currents, self._ptr) + def CurrentsMagAng(self) -> Float64Array: + ''' + Currents in magnitude, angle (degrees) format as a array of doubles. + + Original COM help: https://opendss.epri.com/CurrentsMagAng.html + ''' + return self._get_float64_array(self._lib.Alt_CE_Get_CurrentsMagAng, self._ptr) + def Voltages(self) -> ComplexArray: ''' Complex array of voltages at terminals @@ -257,13 +269,17 @@ def SeqPowers(self) -> ComplexArray: ''' Complex array of sequence powers (kW, kvar) into each 3-phase terminal + Each column represents a terminal. + Original COM help: https://opendss.epri.com/SeqPowers.html ''' return self._get_fcomplex128_array(self._lib.Alt_CE_Get_SeqPowers, self._ptr) def SeqVoltages(self) -> Float64Array: ''' - Double array of symmetrical component voltages (magnitudes only) at each 3-phase terminal + Array of symmetrical component voltages (magnitudes only) at each 3-phase terminal + + Each column represents a terminal. Original COM help: https://opendss.epri.com/SeqVoltages1.html ''' @@ -295,7 +311,7 @@ def VoltagesMagAng(self) -> Float64Array: def TotalPowers(self) -> ComplexArray: ''' - Returns an array with the total powers (complex, kVA) at ALL terminals of the active circuit element. + Returns an array with the total powers (complex, kVA) at ALL terminals of this circuit element. Original COM help: https://opendss.epri.com/TotalPowers.html ''' @@ -377,7 +393,7 @@ def OCPDeviceType(self) -> List[OCPDevType]: OCPDevType(val) for val in self._get_batch_int32_func("Alt_CE_Get_OCPDeviceType") ] - def MaxCurrent(self, terminal: int) -> Float64Array: + def MaxCurrent(self, terminal: int = -1) -> 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. @@ -453,6 +469,8 @@ def SeqPowers(self) -> ComplexArray: ''' Complex array of sequence powers (kW, kvar) into each 3-phase terminal of each element + Each column represents a terminal. + Original COM help: https://opendss.epri.com/SeqPowers.html ''' return self._get_fcomplex128_array(self._lib.Alt_CEBatch_Get_SeqPowers, *self._get_ptr_cnt()) @@ -461,17 +479,21 @@ def SeqCurrents(self) -> Float64Array: ''' Array of symmetrical component currents (magnitudes only) into each 3-phase terminal of each element + Each column represents a terminal. + Original COM help: https://opendss.epri.com/SeqCurrents.html ''' return self._get_float64_array(self._lib.Alt_CEBatch_Get_SeqCurrents, *self._get_ptr_cnt()) def ComplexSeqCurrents(self) -> ComplexArray: ''' - Complex double array of Sequence Currents for all conductors of all terminals of active circuit element. + Complex array of sequence currents for all terminals of the elements in the batch. + + Each column represents a terminal. Original COM help: https://opendss.epri.com/CplxSeqCurrents.html ''' - return self._get_float64_array(self._lib.Alt_CEBatch_Get_ComplexSeqCurrents, *self._get_ptr_cnt()) + return self._get_fcomplex128_array(self._lib.Alt_CEBatch_Get_ComplexSeqCurrents, *self._get_ptr_cnt()) def Currents(self) -> ComplexArray: ''' @@ -499,7 +521,9 @@ def Voltages(self) -> ComplexArray: def SeqVoltages(self) -> Float64Array: ''' - Double array of symmetrical component voltages (magnitudes only) at each 3-phase terminal + Array of symmetrical component voltages (magnitudes only) at each 3-phase terminal + + Each column represents a terminal. Original COM help: https://opendss.epri.com/SeqVoltages1.html ''' @@ -515,7 +539,9 @@ def VoltagesMagAng(self) -> Float64Array: def ComplexSeqVoltages(self) -> ComplexArray: ''' - Complex double array of Sequence Voltage for all terminals of active circuit element. + Complex array of sequence voltages for all terminals of the circuit elements in the batch. + + Each column represents a terminal. Original COM help: https://opendss.epri.com/CplxSeqVoltages1.html ''' diff --git a/altdss/ControlQueue.py b/altdss/ControlQueue.py index 562e31e..603851f 100644 --- a/altdss/ControlQueue.py +++ b/altdss/ControlQueue.py @@ -15,55 +15,120 @@ class IControlQueue(Base): ] def ClearActions(self): - self._check_for_error(self._lib.CtrlQueue_ClearActions()) + ''' + Clear all actions from the Control Proxy's Action List (they are popped off the list). + + Original COM help: https://opendss.epri.com/ClearActions.html + ''' + self._lib.CtrlQueue_ClearActions() def ClearQueue(self): - self._check_for_error(self._lib.CtrlQueue_ClearQueue()) + ''' + Clear the control queue. + + Original COM help: https://opendss.epri.com/ClearQueue.html + ''' + self._lib.CtrlQueue_ClearQueue() - def Delete(self, ActionHandle): - self._check_for_error(self._lib.CtrlQueue_Delete(ActionHandle)) + def Delete(self, ActionHandle: int): + ''' + Delete an Action from the DSS Control Queue by the handle that is returned when the action is added. + + (The Push function returns the handle.) + + Original COM help: https://opendss.epri.com/Delete.html + ''' + self._lib.CtrlQueue_Delete(ActionHandle) def DoAllQueue(self): - self._check_for_error(self._lib.CtrlQueue_DoAllQueue()) + ''' + Execute all actions currently on the Control Queue. + + Side effect: clears the queue. + + Original COM help: https://opendss.epri.com/DoAllQueue.html + ''' + self._lib.CtrlQueue_DoAllQueue() def Show(self): - self._check_for_error(self._lib.CtrlQueue_Show()) + ''' + Export the queue to a CSV table and show it. + + Original COM help: https://opendss.epri.com/Show.html + ''' + self._lib.CtrlQueue_Show() @property def ActionCode(self) -> int: - '''Code for the active action. Long integer code to tell the control device what to do''' - return self._check_for_error(self._lib.CtrlQueue_Get_ActionCode()) + ''' + Code for the active action. Integer code to tell the control device what to do. + + Use this to determine what the user-defined controls are supposed to do. + It can be any 32-bit integer of the user's choosing and is the same value that the control pushed onto the control queue earlier. + + Original COM help: https://opendss.epri.com/ActionCode.html + ''' + return self._lib.CtrlQueue_Get_ActionCode() @property def DeviceHandle(self) -> int: - '''Handle (User defined) to device that must act on the pending action.''' - return self._check_for_error(self._lib.CtrlQueue_Get_DeviceHandle()) + ''' + Handle (User defined) to device that must act on the pending action. + + The user-written code driving the interface may support more than one + control element as necessary to perform the simulation. This handle is + an index returned to the user program that lets the program know which + control is to perform the active action. + + Original COM help: https://opendss.epri.com/DeviceHandle.html + ''' + return self._lib.CtrlQueue_Get_DeviceHandle() @property def NumActions(self) -> int: - '''Number of Actions on the current actionlist (that have been popped off the control queue by CheckControlActions)''' - return self._check_for_error(self._lib.CtrlQueue_Get_NumActions()) + ''' + Number of Actions on the current action list (that have been popped off the control queue by CheckControlActions) + + Original COM help: https://opendss.epri.com/NumActions.html + ''' + return self._lib.CtrlQueue_Get_NumActions() + + def Push(self, Hour: int, Seconds: float, ActionCode: int, DeviceHandle: int) -> int: + ''' + Push a control action onto the DSS control queue by time, action code, and device handle (user defined). Returns Control Queue handle. - def Push(self, Hour: int, Seconds: float, ActionCode: int, DeviceHandle: int): - '''Push a control action onto the DSS control queue by time, action code, and device handle (user defined). Returns Control Queue handle.''' - return self._check_for_error(self._lib.CtrlQueue_Push(Hour, Seconds, ActionCode, DeviceHandle)) + Original COM help: https://opendss.epri.com/Push.html + ''' + return self._lib.CtrlQueue_Push(Hour, Seconds, ActionCode, DeviceHandle) @property def PopAction(self) -> int: - '''Pops next action off the action list and makes it the active action. Returns zero if none.''' - return self._check_for_error(self._lib.CtrlQueue_Get_PopAction()) + ''' + Pops next action off the action list and makes it the active action. Returns zero if none. + + Original COM help: https://opendss.epri.com/PopAction.html + ''' + return self._lib.CtrlQueue_Get_PopAction() @property def Queue(self) -> List[str]: - '''Array of strings containing the entire queue in CSV format''' - return self._check_for_error(self._get_string_array(self._lib.CtrlQueue_Get_Queue)) + ''' + Array of strings containing the entire queue in CSV format + + Original COM help: https://opendss.epri.com/Queue.html + ''' + return self._lib.CtrlQueue_Get_Queue() @property def QueueSize(self) -> int: - '''Number of items on the OpenDSS control Queue''' - return self._check_for_error(self._lib.CtrlQueue_Get_QueueSize()) + ''' + Number of items on the OpenDSS control Queue + + Original COM help: https://opendss.epri.com/QueueSize.html + ''' + return self._lib.CtrlQueue_Get_QueueSize() def SetAction(self, index: int): '''Set the active action by index''' - self._check_for_error(self._lib.CtrlQueue_Set_Action(index)) + self._lib.CtrlQueue_Set_Action(index) diff --git a/altdss/DSSObj.py b/altdss/DSSObj.py index 3b246d3..4ad92b8 100644 --- a/altdss/DSSObj.py +++ b/altdss/DSSObj.py @@ -1,8 +1,8 @@ from __future__ import annotations import numpy as np from dss.enums import DSSJSONFlags -from .enums import SetterFlags -from .common import Base, LIST_LIKE, InvalidatedObject +from .enums import SetterFlags, DSSObjectFlags +from .common import Base, LIST_LIKE, InvalidatedObject, InvalidatedObjectIterator from .types import Float64Array, Int32Array from typing import Union, List, AnyStr, Optional import pandas as pd @@ -19,6 +19,7 @@ class DSSObj(Base): '_ffi', '_get_int32_list', '__weakref__', + '_is_iterator', ] _extra_slots = [] @@ -26,8 +27,10 @@ def __init__(self, api_util, ptr): Base.__init__(self, api_util) self._ptr = ptr self._ffi = api_util.ffi - self._get_int32_list = api_util.get_int32_array2 - api_util.track_obj(self) + self._get_int32_list = self._lib.get_int32_array2 + self._is_iterator = False + if ptr is not InvalidatedObjectIterator: + api_util.track_obj(self) def _invalidate_ptr(self): self._ptr = InvalidatedObject @@ -99,7 +102,10 @@ def __repr__(self): # if propseq: # vals.append(f'{self._properties_by_idx[propidx][0]}={self[propidx]}') - return f'<{self._cls_name}.{self.Name}>'# {" ".join(vals)}' + if not self._is_iterator: + return f'<{self._cls_name}.{self.Name}>'# {" ".join(vals)}' + + return f'<(Iterator) {self._cls_name}.{self.Name}>'# {" ".join(vals)}' @property def Name(self) -> str: @@ -284,7 +290,7 @@ def end_edit(self, num_changes: int = 1) -> None: self._check_for_error() def _edit(self, props): - if not (self._lib.Obj_GetFlags(self._ptr) and self._lib.DSSObjectFlags_Editing): + if not (self._lib.Obj_GetFlags(self._ptr) and DSSObjectFlags.Editing): self._lib.Obj_BeginEdit(self._ptr) self._check_for_error() @@ -391,7 +397,7 @@ def _batch_new_aux(self, names: Optional[List[AnyStr]] = None, df = None, count: return IDSSObj.batch_new(self, names, count, begin_edit) - def new(self, name: str, begin_edit=True, activate=False): #TODO: rename/remove to avoid confusion + def _create_new(self, name: str, begin_edit=True, activate=False): _name = name if not isinstance(name, bytes): name = name.encode(self._api_util.codec) @@ -408,7 +414,11 @@ def new(self, name: str, begin_edit=True, activate=False): #TODO: rename/remove self._check_for_error() raise ValueError('Could not create object "{}".'.format(_name)) - return self._obj_cls(self._api_util, ptr) + mapper = self._api_util._map_objs + if mapper is True: + return self._obj_cls(self._api_util, ptr) + elif mapper: + return mapper._map_obj(self._obj_cls, ptr) def _new(self, name: AnyStr, begin_edit=None, activate=False, props=None): @@ -416,7 +426,7 @@ def _new(self, name: AnyStr, begin_edit=None, activate=False, props=None): Internal/aux. function used by the descendant classes (which provide typing info) to create the objects. ''' if props: - obj = IDSSObj.new(self, name, True, activate) + obj = IDSSObj._create_new(self, name, True, activate) try: for k, v in props.items(): setattr(obj, k, v) @@ -429,7 +439,7 @@ def _new(self, name: AnyStr, begin_edit=None, activate=False, props=None): if begin_edit is None: begin_edit = True # Assumes the user wants to edit the properties outside. - return IDSSObj.new(self, name, begin_edit, activate) + return IDSSObj._create_new(self, name, begin_edit, activate) def find(self, name_or_idx: Union[AnyStr, int]) -> DSSObj: @@ -440,18 +450,19 @@ def find(self, name_or_idx: Union[AnyStr, int]) -> DSSObj: if isinstance(name_or_idx, int): ptr = lib.Obj_GetHandleByIdx(self._api_util.ctx, self.cls_idx, name_or_idx + 1) - if ptr == self._api_util.ffi.NULL: + if not ptr: raise ValueError('Could not find object by index "{}".'.format(name_or_idx)) else: if not isinstance(name_or_idx, bytes): name_or_idx = name_or_idx.encode(self._api_util.codec) ptr = lib.Obj_GetHandleByName(self._api_util.ctx, self.cls_idx, name_or_idx) - if ptr == self._api_util.ffi.NULL: + if not ptr: raise ValueError('Could not find object by name "{}".'.format(name_or_idx)) return self._obj_cls(self._api_util, ptr) + def __len__(self) -> int: return self._lib.Obj_GetCount(self._api_util.ctx, self.cls_idx) diff --git a/altdss/DynamicExp.py b/altdss/DynamicExp.py index 9d43e38..c963daf 100644 --- a/altdss/DynamicExp.py +++ b/altdss/DynamicExp.py @@ -59,7 +59,8 @@ def _set_NVariables(self, value: int, flags: enums.SetterFlags = 0): """ (Int) Number of state variables to be considered in the differential equation. - DSS property name: `NVariables`, DSS property index: 1. + Name: `NVariables` + Default: 0 """ def _get_VarNames(self) -> List[str]: @@ -74,7 +75,7 @@ def _set_VarNames(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ ([String]) Array of strings with the names of the state variables. - DSS property name: `VarNames`, DSS property index: 2. + Name: `VarNames` """ def _get_Var(self) -> str: @@ -87,7 +88,7 @@ def _set_Var(self, value: AnyStr, flags: enums.SetterFlags = 0): """ (String) Activates the state variable using the given name. - DSS property name: `Var`, DSS property index: 3. + Name: `Var` """ def _get_VarIdx(self) -> int: @@ -100,7 +101,9 @@ def _set_VarIdx(self, value: int, flags: enums.SetterFlags = 0): """ (Int) read-only, returns the index of the active state variable. - DSS property name: `VarIdx`, DSS property index: 4. + **Read-only** + + Name: `VarIdx` """ def _get_Expression(self) -> str: @@ -115,7 +118,7 @@ def _set_Expression(self, value: AnyStr, flags: enums.SetterFlags = 0): expression="[w dt = 1 M / (P_m D*w - P_e -) *]" - DSS property name: `Expression`, DSS property index: 5. + Name: `Expression` """ def _get_Domain(self) -> enums.DynamicExpDomain: @@ -131,7 +134,8 @@ def _set_Domain(self, value: Union[AnyStr, int, enums.DynamicExpDomain], flags: """ It is the domain for which the equation is defined, it can be one of [time*, dq]. By deafult, dynamic epxressions are defined in the time domain. - DSS property name: `Domain`, DSS property index: 6. + Name: `Domain` + Default: Time """ def _get_Domain_str(self) -> str: @@ -144,14 +148,19 @@ def _set_Domain_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ It is the domain for which the equation is defined, it can be one of [time*, dq]. By deafult, dynamic epxressions are defined in the time domain. - DSS property name: `Domain`, DSS property index: 6. + Name: `Domain` + Default: Time """ def Like(self, value: AnyStr): """ - DynamicExp.like + Make like another object, e.g.: + + New Capacitor.C2 like=c1 ... + + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 - DSS property name: `Like`, DSS property index: 7. + Name: `Like` """ self._set_string_o(7, value) @@ -203,7 +212,8 @@ def _set_NVariables(self, value: Union[int, Int32Array], flags: enums.SetterFlag """ (Int) Number of state variables to be considered in the differential equation. - DSS property name: `NVariables`, DSS property index: 1. + Name: `NVariables` + Default: 0 """ def _get_VarNames(self) -> List[List[str]]: @@ -220,7 +230,7 @@ def _set_VarNames(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ ([String]) Array of strings with the names of the state variables. - DSS property name: `VarNames`, DSS property index: 2. + Name: `VarNames` """ def _get_Var(self) -> List[str]: @@ -233,7 +243,7 @@ def _set_Var(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ (String) Activates the state variable using the given name. - DSS property name: `Var`, DSS property index: 3. + Name: `Var` """ def _get_VarIdx(self) -> BatchInt32ArrayProxy: @@ -246,7 +256,9 @@ def _set_VarIdx(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ (Int) read-only, returns the index of the active state variable. - DSS property name: `VarIdx`, DSS property index: 4. + **Read-only** + + Name: `VarIdx` """ def _get_Expression(self) -> List[str]: @@ -261,7 +273,7 @@ def _set_Expression(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette expression="[w dt = 1 M / (P_m D*w - P_e -) *]" - DSS property name: `Expression`, DSS property index: 5. + Name: `Expression` """ def _get_Domain(self) -> BatchInt32ArrayProxy: @@ -278,7 +290,8 @@ def _set_Domain(self, value: Union[AnyStr, int, enums.DynamicExpDomain, List[Any """ It is the domain for which the equation is defined, it can be one of [time*, dq]. By deafult, dynamic epxressions are defined in the time domain. - DSS property name: `Domain`, DSS property index: 6. + Name: `Domain` + Default: Time """ def _get_Domain_str(self) -> List[str]: @@ -291,14 +304,19 @@ def _set_Domain_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ It is the domain for which the equation is defined, it can be one of [time*, dq]. By deafult, dynamic epxressions are defined in the time domain. - DSS property name: `Domain`, DSS property index: 6. + Name: `Domain` + Default: Time """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): """ - DynamicExp.like + Make like another object, e.g.: + + New Capacitor.C2 like=c1 ... + + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 - DSS property name: `Like`, DSS property index: 7. + Name: `Like` """ self._set_batch_string(7, value, flags) diff --git a/altdss/ESPVLControl.py b/altdss/ESPVLControl.py index 778dd8f..07b1e9b 100644 --- a/altdss/ESPVLControl.py +++ b/altdss/ESPVLControl.py @@ -14,7 +14,7 @@ class ESPVLControl(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'ESPVLControl' - _cls_idx = 38 + _cls_idx = 39 _cls_int_idx = { 2, 3, @@ -71,9 +71,9 @@ def _set_Element_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Element_str = property(_get_Element_str, _set_Element_str) # type: str """ - Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; must be specified. + Full object name of the circuit element, typically a line or transformer, which the control is monitoring. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Element(self) -> DSSObj: @@ -88,9 +88,9 @@ def _set_Element(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlags = Element = property(_get_Element, _set_Element) # type: DSSObj """ - Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; must be specified. + Full object name of the circuit element, typically a line or transformer, which the control is monitoring. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Terminal(self) -> int: @@ -101,9 +101,10 @@ def _set_Terminal(self, value: int, flags: enums.SetterFlags = 0): Terminal = property(_get_Terminal, _set_Terminal) # type: int """ - Number of the terminal of the circuit element to which the ESPVLControl control is connected. 1 or 2, typically. Default is 1. Make sure you have the direction on the power matching the sign of kWLimit. + Number of the terminal of the circuit element to which the ESPVLControl control is connected. 1 or 2, typically. Make sure you have the direction on the power matching the sign of kWLimit. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_Type(self) -> enums.ESPVLControlType: @@ -119,7 +120,8 @@ def _set_Type(self, value: Union[AnyStr, int, enums.ESPVLControlType], flags: en """ Type of controller. 1= System Controller; 2= Local controller. - DSS property name: `Type`, DSS property index: 3. + Name: `Type` + Default: None """ def _get_Type_str(self) -> str: @@ -132,7 +134,8 @@ def _set_Type_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Type of controller. 1= System Controller; 2= Local controller. - DSS property name: `Type`, DSS property index: 3. + Name: `Type` + Default: None """ def _get_kWBand(self) -> float: @@ -145,7 +148,8 @@ def _set_kWBand(self, value: float, flags: enums.SetterFlags = 0): """ Bandwidth (kW) of the dead band around the target limit.No dispatch changes are attempted if the power in the monitored terminal stays within this band. - DSS property name: `kWBand`, DSS property index: 4. + Name: `kWBand` + Default: 100.0 """ def _get_kvarLimit(self) -> float: @@ -158,7 +162,8 @@ def _set_kvarLimit(self, value: float, flags: enums.SetterFlags = 0): """ Max kvar to be delivered through the element. Uses same dead band as kW. - DSS property name: `kvarLimit`, DSS property index: 5. + Name: `kvarLimit` + Default: 4000.0 """ def _get_LocalControlList(self) -> List[str]: @@ -173,7 +178,7 @@ def _set_LocalControlList(self, value: List[AnyStr], flags: enums.SetterFlags = """ Array list of ESPVLControl local controller objects to be dispatched by System Controller. If not specified, all ESPVLControl devices with type=local in the circuit not attached to another controller are assumed to be part of this controller's fleet. - DSS property name: `LocalControlList`, DSS property index: 6. + Name: `LocalControlList` """ def _get_LocalControlWeights(self) -> Float64Array: @@ -186,7 +191,7 @@ def _set_LocalControlWeights(self, value: Float64Array, flags: enums.SetterFlags """ Array of proportional weights corresponding to each ESPVLControl local controller in the LocalControlList. - DSS property name: `LocalControlWeights`, DSS property index: 7. + Name: `LocalControlWeights` """ def _get_PVSystemList(self) -> List[str]: @@ -201,7 +206,7 @@ def _set_PVSystemList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Array list of PVSystem objects to be dispatched by a Local Controller. - DSS property name: `PVSystemList`, DSS property index: 8. + Name: `PVSystemList` """ def _get_PVSystemWeights(self) -> Float64Array: @@ -214,7 +219,7 @@ def _set_PVSystemWeights(self, value: Float64Array, flags: enums.SetterFlags = 0 """ Array of proportional weights corresponding to each PVSystem in the PVSystemList. - DSS property name: `PVSystemWeights`, DSS property index: 9. + Name: `PVSystemWeights` """ def _get_StorageList(self) -> List[str]: @@ -229,7 +234,7 @@ def _set_StorageList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Array list of Storage objects to be dispatched by Local Controller. - DSS property name: `StorageList`, DSS property index: 10. + Name: `StorageList` """ def _get_StorageWeights(self) -> Float64Array: @@ -242,7 +247,7 @@ def _set_StorageWeights(self, value: Float64Array, flags: enums.SetterFlags = 0) """ Array of proportional weights corresponding to each Storage object in the StorageControlList. - DSS property name: `StorageWeights`, DSS property index: 11. + Name: `StorageWeights` """ def _get_BaseFreq(self) -> float: @@ -255,7 +260,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 12. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -266,9 +272,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 13. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -277,7 +284,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 14. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(14, value) @@ -301,7 +310,7 @@ class ESPVLControlProperties(TypedDict): class ESPVLControlBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'ESPVLControl' _obj_cls = ESPVLControl - _cls_idx = 38 + _cls_idx = 39 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -337,9 +346,9 @@ def _set_Element_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett Element_str = property(_get_Element_str, _set_Element_str) # type: List[str] """ - Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; must be specified. + Full object name of the circuit element, typically a line or transformer, which the control is monitoring. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Element(self) -> List[DSSObj]: @@ -350,9 +359,9 @@ def _set_Element(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSObj]], Element = property(_get_Element, _set_Element) # type: List[DSSObj] """ - Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; must be specified. + Full object name of the circuit element, typically a line or transformer, which the control is monitoring. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Terminal(self) -> BatchInt32ArrayProxy: @@ -363,9 +372,10 @@ def _set_Terminal(self, value: Union[int, Int32Array], flags: enums.SetterFlags Terminal = property(_get_Terminal, _set_Terminal) # type: BatchInt32ArrayProxy """ - Number of the terminal of the circuit element to which the ESPVLControl control is connected. 1 or 2, typically. Default is 1. Make sure you have the direction on the power matching the sign of kWLimit. + Number of the terminal of the circuit element to which the ESPVLControl control is connected. 1 or 2, typically. Make sure you have the direction on the power matching the sign of kWLimit. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_Type(self) -> BatchInt32ArrayProxy: @@ -382,7 +392,8 @@ def _set_Type(self, value: Union[AnyStr, int, enums.ESPVLControlType, List[AnySt """ Type of controller. 1= System Controller; 2= Local controller. - DSS property name: `Type`, DSS property index: 3. + Name: `Type` + Default: None """ def _get_Type_str(self) -> List[str]: @@ -395,7 +406,8 @@ def _set_Type_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Type of controller. 1= System Controller; 2= Local controller. - DSS property name: `Type`, DSS property index: 3. + Name: `Type` + Default: None """ def _get_kWBand(self) -> BatchFloat64ArrayProxy: @@ -408,7 +420,8 @@ def _set_kWBand(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Bandwidth (kW) of the dead band around the target limit.No dispatch changes are attempted if the power in the monitored terminal stays within this band. - DSS property name: `kWBand`, DSS property index: 4. + Name: `kWBand` + Default: 100.0 """ def _get_kvarLimit(self) -> BatchFloat64ArrayProxy: @@ -421,7 +434,8 @@ def _set_kvarLimit(self, value: Union[float, Float64Array], flags: enums.SetterF """ Max kvar to be delivered through the element. Uses same dead band as kW. - DSS property name: `kvarLimit`, DSS property index: 5. + Name: `kvarLimit` + Default: 4000.0 """ def _get_LocalControlList(self) -> List[List[str]]: @@ -438,7 +452,7 @@ def _set_LocalControlList(self, value: List[AnyStr], flags: enums.SetterFlags = """ Array list of ESPVLControl local controller objects to be dispatched by System Controller. If not specified, all ESPVLControl devices with type=local in the circuit not attached to another controller are assumed to be part of this controller's fleet. - DSS property name: `LocalControlList`, DSS property index: 6. + Name: `LocalControlList` """ def _get_LocalControlWeights(self) -> List[Float64Array]: @@ -454,7 +468,7 @@ def _set_LocalControlWeights(self, value: Union[Float64Array, List[Float64Array] """ Array of proportional weights corresponding to each ESPVLControl local controller in the LocalControlList. - DSS property name: `LocalControlWeights`, DSS property index: 7. + Name: `LocalControlWeights` """ def _get_PVSystemList(self) -> List[List[str]]: @@ -471,7 +485,7 @@ def _set_PVSystemList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Array list of PVSystem objects to be dispatched by a Local Controller. - DSS property name: `PVSystemList`, DSS property index: 8. + Name: `PVSystemList` """ def _get_PVSystemWeights(self) -> List[Float64Array]: @@ -487,7 +501,7 @@ def _set_PVSystemWeights(self, value: Union[Float64Array, List[Float64Array]], f """ Array of proportional weights corresponding to each PVSystem in the PVSystemList. - DSS property name: `PVSystemWeights`, DSS property index: 9. + Name: `PVSystemWeights` """ def _get_StorageList(self) -> List[List[str]]: @@ -504,7 +518,7 @@ def _set_StorageList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Array list of Storage objects to be dispatched by Local Controller. - DSS property name: `StorageList`, DSS property index: 10. + Name: `StorageList` """ def _get_StorageWeights(self) -> List[Float64Array]: @@ -520,7 +534,7 @@ def _set_StorageWeights(self, value: Union[Float64Array, List[Float64Array]], fl """ Array of proportional weights corresponding to each Storage object in the StorageControlList. - DSS property name: `StorageWeights`, DSS property index: 11. + Name: `StorageWeights` """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -533,7 +547,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 12. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -541,14 +556,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(13) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(13, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 13. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -557,7 +573,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 14. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(14, value, flags) diff --git a/altdss/EnergyMeter.py b/altdss/EnergyMeter.py index d5be438..489f5ff 100644 --- a/altdss/EnergyMeter.py +++ b/altdss/EnergyMeter.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -13,10 +13,23 @@ from .CircuitElement import CircuitElementBatchMixin, CircuitElementMixin from .PCElement import ElementHasRegistersMixin +from .AutoTrans import AutoTrans +from .Capacitor import Capacitor +from .Line import Line +from .Reactor import Reactor +from .Transformer import Transformer +PDElement = Union[ + AutoTrans, + Capacitor, + Line, + Reactor, + Transformer, +] + class EnergyMeter(DSSObj, CircuitElementMixin, EnergyMeterObjMixin, ElementHasRegistersMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + EnergyMeterObjMixin._extra_slots + ElementHasRegistersMixin._extra_slots _cls_name = 'EnergyMeter' - _cls_idx = 48 + _cls_idx = 49 _cls_int_idx = { 2, 9, @@ -105,24 +118,26 @@ def _set_Element_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name (Full Object name) of element to which the monitor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` + Default: Vsource.source """ - def _get_Element(self) -> DSSObj: + def _get_Element(self) -> PDElement: return self._get_obj(1, None) - def _set_Element(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlags = 0): + def _set_Element(self, value: Union[AnyStr, PDElement], flags: enums.SetterFlags = 0): if isinstance(value, DSSObj) or value is None: self._set_obj(1, value, flags) return self._set_string_o(1, value, flags) - Element = property(_get_Element, _set_Element) # type: DSSObj + Element = property(_get_Element, _set_Element) # type: PDElement """ Name (Full Object name) of element to which the monitor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` + Default: Vsource.source """ def _get_Terminal(self) -> int: @@ -135,7 +150,8 @@ def _set_Terminal(self, value: int, flags: enums.SetterFlags = 0): """ Number of the terminal of the circuit element to which the monitor is connected. 1 or 2, typically. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def Action(self, value: Union[AnyStr, int, enums.EnergyMeterAction], flags: enums.SetterFlags = 0): @@ -151,7 +167,7 @@ def Action(self, value: Union[AnyStr, int, enums.EnergyMeterAction], flags: enum (Z)onedump = Dump names of elements in meter zone to a file File name is "Zone_metername.csv". - DSS property name: `Action`, DSS property index: 3. + Name: `Action` """ if isinstance(value, int): self._lib.Obj_SetInt32(self._ptr, 3, value, flags) @@ -195,16 +211,17 @@ def _set_Option(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Enter a string ARRAY of any combination of the following. Options processed left-to-right: - (E)xcess : (default) UE/EEN is estimate of energy over capacity + (E)xcess : UE/EEN is estimate of energy over capacity (T)otal : UE/EEN is total energy after capacity exceeded - (R)adial : (default) Treats zone as a radial circuit + (R)adial : Treats zone as a radial circuit (M)esh : Treats zone as meshed network (not radial). - (C)ombined : (default) Load UE/EEN computed from combination of overload and undervoltage. + (C)ombined : Load UE/EEN computed from combination of overload and undervoltage. (V)oltage : Load UE/EEN computed based on voltage only. Example: option=(E, R) - DSS property name: `Option`, DSS property index: 4. + Name: `Option` + Default: ['E', 'R', 'C'] """ def _get_kVANormal(self) -> float: @@ -217,7 +234,8 @@ def _set_kVANormal(self, value: float, flags: enums.SetterFlags = 0): """ Upper limit on kVA load in the zone, Normal configuration. Default is 0.0 (ignored). Overrides limits on individual lines for overload EEN. With "LocalOnly=Yes" option, uses only load in metered branch. - DSS property name: `kVANormal`, DSS property index: 5. + Name: `kVANormal` + Default: 0.0 """ def _get_kVAEmerg(self) -> float: @@ -230,7 +248,8 @@ def _set_kVAEmerg(self, value: float, flags: enums.SetterFlags = 0): """ Upper limit on kVA load in the zone, Emergency configuration. Default is 0.0 (ignored). Overrides limits on individual lines for overload UE. With "LocalOnly=Yes" option, uses only load in metered branch. - DSS property name: `kVAEmerg`, DSS property index: 6. + Name: `kVAEmerg` + Default: 0.0 """ def _get_PeakCurrent(self) -> Float64Array: @@ -241,9 +260,10 @@ def _set_PeakCurrent(self, value: Float64Array, flags: enums.SetterFlags = 0): PeakCurrent = property(_get_PeakCurrent, _set_PeakCurrent) # type: Float64Array """ - ARRAY of current magnitudes representing the peak currents measured at this location for the load allocation function. Default is (400, 400, 400). Enter one current for each phase + ARRAY of current magnitudes representing the peak currents measured at this location for the load allocation function. Enter one current for each phase - DSS property name: `PeakCurrent`, DSS property index: 7. + Name: `PeakCurrent` + Default: [400.0, 400.0, 400.0] """ def _get_ZoneList(self) -> List[str]: @@ -256,12 +276,12 @@ def _set_ZoneList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): ZoneList = property(_get_ZoneList, _set_ZoneList) # type: List[str] """ - ARRAY of full element names for this meter's zone. Default is for meter to find it's own zone. If specified, DSS uses this list instead. Can access the names in a single-column text file. Examples: + ARRAY of full element names for this meter's zone. Default is for meter to find its own zone. If specified, DSS uses this list instead. Can access the names in a single-column text file. Examples: zonelist=[line.L1, transformer.T1, Line.L3] zonelist=(file=branchlist.txt) - DSS property name: `ZoneList`, DSS property index: 8. + Name: `ZoneList` """ def _get_LocalOnly(self) -> bool: @@ -272,9 +292,10 @@ def _set_LocalOnly(self, value: bool, flags: enums.SetterFlags = 0): LocalOnly = property(_get_LocalOnly, _set_LocalOnly) # type: bool """ - {Yes | No} Default is NO. If Yes, meter considers only the monitored element for EEN and UE calcs. Uses whole zone for losses. + If Yes, meter considers only the monitored element for EEN and UE calcs. Uses whole zone for losses. - DSS property name: `LocalOnly`, DSS property index: 9. + Name: `LocalOnly` + Default: False """ def _get_Mask(self) -> Float64Array: @@ -287,7 +308,8 @@ def _set_Mask(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Mask for adding registers whenever all meters are totalized. Array of floating point numbers representing the multiplier to be used for summing each register from this meter. Default = (1, 1, 1, 1, ... ). You only have to enter as many as are changed (positional). Useful when two meters monitor same energy, etc. - DSS property name: `Mask`, DSS property index: 10. + Name: `Mask` + Default: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] """ def _get_Losses(self) -> bool: @@ -298,9 +320,10 @@ def _set_Losses(self, value: bool, flags: enums.SetterFlags = 0): Losses = property(_get_Losses, _set_Losses) # type: bool """ - {Yes | No} Default is YES. Compute Zone losses. If NO, then no losses at all are computed. + Compute Zone losses. If NO, then no losses at all are computed. - DSS property name: `Losses`, DSS property index: 11. + Name: `Losses` + Default: True """ def _get_LineLosses(self) -> bool: @@ -311,9 +334,10 @@ def _set_LineLosses(self, value: bool, flags: enums.SetterFlags = 0): LineLosses = property(_get_LineLosses, _set_LineLosses) # type: bool """ - {Yes | No} Default is YES. Compute Line losses. If NO, then none of the losses are computed. + Compute Line losses. If NO, then none of the losses are computed. - DSS property name: `LineLosses`, DSS property index: 12. + Name: `LineLosses` + Default: True """ def _get_XfmrLosses(self) -> bool: @@ -324,9 +348,10 @@ def _set_XfmrLosses(self, value: bool, flags: enums.SetterFlags = 0): XfmrLosses = property(_get_XfmrLosses, _set_XfmrLosses) # type: bool """ - {Yes | No} Default is YES. Compute Transformer losses. If NO, transformers are ignored in loss calculations. + Compute Transformer losses. If NO, transformers are ignored in loss calculations. - DSS property name: `XfmrLosses`, DSS property index: 13. + Name: `XfmrLosses` + Default: True """ def _get_SeqLosses(self) -> bool: @@ -337,9 +362,10 @@ def _set_SeqLosses(self, value: bool, flags: enums.SetterFlags = 0): SeqLosses = property(_get_SeqLosses, _set_SeqLosses) # type: bool """ - {Yes | No} Default is YES. Compute Sequence losses in lines and segregate by line mode losses and zero mode losses. + Compute Sequence losses in lines and segregate by line mode losses and zero mode losses. - DSS property name: `SeqLosses`, DSS property index: 14. + Name: `SeqLosses` + Default: True """ def _get_ThreePhaseLosses(self) -> bool: @@ -350,9 +376,10 @@ def _set_ThreePhaseLosses(self, value: bool, flags: enums.SetterFlags = 0): ThreePhaseLosses = property(_get_ThreePhaseLosses, _set_ThreePhaseLosses) # type: bool """ - {Yes | No} Default is YES. Compute Line losses and segregate by 3-phase and other (1- and 2-phase) line losses. + Compute Line losses and segregate by 3-phase and other (1- and 2-phase) line losses. - DSS property name: `3PhaseLosses`, DSS property index: 15. + Name: `3PhaseLosses` + Default: True """ def _get_VBaseLosses(self) -> bool: @@ -363,9 +390,10 @@ def _set_VBaseLosses(self, value: bool, flags: enums.SetterFlags = 0): VBaseLosses = property(_get_VBaseLosses, _set_VBaseLosses) # type: bool """ - {Yes | No} Default is YES. Compute losses and segregate by voltage base. If NO, then voltage-based tabulation is not reported. + Compute losses and segregate by voltage base. If NO, then voltage-based tabulation is not reported. - DSS property name: `VBaseLosses`, DSS property index: 16. + Name: `VBaseLosses` + Default: True """ def _get_PhaseVoltageReport(self) -> bool: @@ -376,9 +404,10 @@ def _set_PhaseVoltageReport(self, value: bool, flags: enums.SetterFlags = 0): PhaseVoltageReport = property(_get_PhaseVoltageReport, _set_PhaseVoltageReport) # type: bool """ - {Yes | No} Default is NO. Report min, max, and average phase voltages for the zone and tabulate by voltage base. Demand Intervals must be turned on (Set Demand=true) and voltage bases must be defined for this property to take effect. Result is in a separate report file. + Report min, max, and average phase voltages for the zone and tabulate by voltage base. Demand Intervals must be turned on (Set Demand=true) and voltage bases must be defined for this property to take effect. Result is in a separate report file. - DSS property name: `PhaseVoltageReport`, DSS property index: 17. + Name: `PhaseVoltageReport` + Default: False """ def _get_Int_Rate(self) -> float: @@ -391,7 +420,8 @@ def _set_Int_Rate(self, value: float, flags: enums.SetterFlags = 0): """ Average number of annual interruptions for head of the meter zone (source side of zone or feeder). - DSS property name: `Int_Rate`, DSS property index: 18. + Name: `Int_Rate` + Default: 0.0 """ def _get_Int_Duration(self) -> float: @@ -404,7 +434,8 @@ def _set_Int_Duration(self, value: float, flags: enums.SetterFlags = 0): """ Average annual duration, in hr, of interruptions for head of the meter zone (source side of zone or feeder). - DSS property name: `Int_Duration`, DSS property index: 19. + Name: `Int_Duration` + Default: 0.0 """ def _get_SAIFI(self) -> float: @@ -415,9 +446,11 @@ def _set_SAIFI(self, value: float, flags: enums.SetterFlags = 0): SAIFI = property(_get_SAIFI, _set_SAIFI) # type: float """ - (Read only) Makes SAIFI result available via return on query (? energymeter.myMeter.SAIFI. + Makes SAIFI result available via return on query (? energymeter.myMeter.SAIFI. + + **Read-only** - DSS property name: `SAIFI`, DSS property index: 20. + Name: `SAIFI` """ def _get_SAIFIkW(self) -> float: @@ -428,9 +461,11 @@ def _set_SAIFIkW(self, value: float, flags: enums.SetterFlags = 0): SAIFIkW = property(_get_SAIFIkW, _set_SAIFIkW) # type: float """ - (Read only) Makes SAIFIkW result available via return on query (? energymeter.myMeter.SAIFIkW. + Makes SAIFIkW result available via return on query (? energymeter.myMeter.SAIFIkW. + + **Read-only** - DSS property name: `SAIFIkW`, DSS property index: 21. + Name: `SAIFIkW` """ def _get_SAIDI(self) -> float: @@ -441,9 +476,11 @@ def _set_SAIDI(self, value: float, flags: enums.SetterFlags = 0): SAIDI = property(_get_SAIDI, _set_SAIDI) # type: float """ - (Read only) Makes SAIDI result available via return on query (? energymeter.myMeter.SAIDI. + Makes SAIDI result available via return on query (? energymeter.myMeter.SAIDI. - DSS property name: `SAIDI`, DSS property index: 22. + **Read-only** + + Name: `SAIDI` """ def _get_CAIDI(self) -> float: @@ -454,9 +491,11 @@ def _set_CAIDI(self, value: float, flags: enums.SetterFlags = 0): CAIDI = property(_get_CAIDI, _set_CAIDI) # type: float """ - (Read only) Makes CAIDI result available via return on query (? energymeter.myMeter.CAIDI. + Makes CAIDI result available via return on query (? energymeter.myMeter.CAIDI. + + **Read-only** - DSS property name: `CAIDI`, DSS property index: 23. + Name: `CAIDI` """ def _get_CustInterrupts(self) -> float: @@ -467,9 +506,11 @@ def _set_CustInterrupts(self, value: float, flags: enums.SetterFlags = 0): CustInterrupts = property(_get_CustInterrupts, _set_CustInterrupts) # type: float """ - (Read only) Makes Total Customer Interrupts value result available via return on query (? energymeter.myMeter.CustInterrupts. + Makes Total Customer Interrupts value result available via return on query (? energymeter.myMeter.CustInterrupts. + + **Read-only** - DSS property name: `CustInterrupts`, DSS property index: 24. + Name: `CustInterrupts` """ def _get_BaseFreq(self) -> float: @@ -482,7 +523,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 25. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -493,9 +535,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 26. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -504,13 +547,15 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 27. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(27, value) class EnergyMeterProperties(TypedDict): - Element: Union[AnyStr, DSSObj] + Element: Union[AnyStr, PDElement] Terminal: int Action: Union[AnyStr, int, enums.EnergyMeterAction] Option: List[AnyStr] @@ -541,7 +586,7 @@ class EnergyMeterProperties(TypedDict): class EnergyMeterBatch(DSSBatch, CircuitElementBatchMixin, EnergyMeterBatchMixin): _cls_name = 'EnergyMeter' _obj_cls = EnergyMeter - _cls_idx = 48 + _cls_idx = 49 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -580,20 +625,22 @@ def _set_Element_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett """ Name (Full Object name) of element to which the monitor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` + Default: Vsource.source """ - def _get_Element(self) -> List[DSSObj]: + def _get_Element(self) -> List[PDElement]: return self._get_batch_obj_prop(1) - def _set_Element(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSObj]], flags: enums.SetterFlags = 0): + def _set_Element(self, value: Union[AnyStr, PDElement, List[AnyStr], List[PDElement]], flags: enums.SetterFlags = 0): self._set_batch_obj_prop(1, value, flags) - Element = property(_get_Element, _set_Element) # type: List[DSSObj] + Element = property(_get_Element, _set_Element) # type: List[PDElement] """ Name (Full Object name) of element to which the monitor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` + Default: Vsource.source """ def _get_Terminal(self) -> BatchInt32ArrayProxy: @@ -606,7 +653,8 @@ def _set_Terminal(self, value: Union[int, Int32Array], flags: enums.SetterFlags """ Number of the terminal of the circuit element to which the monitor is connected. 1 or 2, typically. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def Action(self, value: Union[AnyStr, int, enums.EnergyMeterAction], flags: enums.SetterFlags = 0): @@ -622,7 +670,7 @@ def Action(self, value: Union[AnyStr, int, enums.EnergyMeterAction], flags: enum (Z)onedump = Dump names of elements in meter zone to a file File name is "Zone_metername.csv". - DSS property name: `Action`, DSS property index: 3. + Name: `Action` """ if isinstance(value, (bytes, str)) or (isinstance(value, LIST_LIKE) and len(value) > 0 and isinstance(value[0], (bytes, str))): self._set_batch_string(3, value, flags) @@ -667,16 +715,17 @@ def _set_Option(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Enter a string ARRAY of any combination of the following. Options processed left-to-right: - (E)xcess : (default) UE/EEN is estimate of energy over capacity + (E)xcess : UE/EEN is estimate of energy over capacity (T)otal : UE/EEN is total energy after capacity exceeded - (R)adial : (default) Treats zone as a radial circuit + (R)adial : Treats zone as a radial circuit (M)esh : Treats zone as meshed network (not radial). - (C)ombined : (default) Load UE/EEN computed from combination of overload and undervoltage. + (C)ombined : Load UE/EEN computed from combination of overload and undervoltage. (V)oltage : Load UE/EEN computed based on voltage only. Example: option=(E, R) - DSS property name: `Option`, DSS property index: 4. + Name: `Option` + Default: ['E', 'R', 'C'] """ def _get_kVANormal(self) -> BatchFloat64ArrayProxy: @@ -689,7 +738,8 @@ def _set_kVANormal(self, value: Union[float, Float64Array], flags: enums.SetterF """ Upper limit on kVA load in the zone, Normal configuration. Default is 0.0 (ignored). Overrides limits on individual lines for overload EEN. With "LocalOnly=Yes" option, uses only load in metered branch. - DSS property name: `kVANormal`, DSS property index: 5. + Name: `kVANormal` + Default: 0.0 """ def _get_kVAEmerg(self) -> BatchFloat64ArrayProxy: @@ -702,7 +752,8 @@ def _set_kVAEmerg(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Upper limit on kVA load in the zone, Emergency configuration. Default is 0.0 (ignored). Overrides limits on individual lines for overload UE. With "LocalOnly=Yes" option, uses only load in metered branch. - DSS property name: `kVAEmerg`, DSS property index: 6. + Name: `kVAEmerg` + Default: 0.0 """ def _get_PeakCurrent(self) -> List[Float64Array]: @@ -716,9 +767,10 @@ def _set_PeakCurrent(self, value: Union[Float64Array, List[Float64Array]], flags PeakCurrent = property(_get_PeakCurrent, _set_PeakCurrent) # type: List[Float64Array] """ - ARRAY of current magnitudes representing the peak currents measured at this location for the load allocation function. Default is (400, 400, 400). Enter one current for each phase + ARRAY of current magnitudes representing the peak currents measured at this location for the load allocation function. Enter one current for each phase - DSS property name: `PeakCurrent`, DSS property index: 7. + Name: `PeakCurrent` + Default: [400.0, 400.0, 400.0] """ def _get_ZoneList(self) -> List[List[str]]: @@ -733,12 +785,12 @@ def _set_ZoneList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): ZoneList = property(_get_ZoneList, _set_ZoneList) # type: List[List[str]] """ - ARRAY of full element names for this meter's zone. Default is for meter to find it's own zone. If specified, DSS uses this list instead. Can access the names in a single-column text file. Examples: + ARRAY of full element names for this meter's zone. Default is for meter to find its own zone. If specified, DSS uses this list instead. Can access the names in a single-column text file. Examples: zonelist=[line.L1, transformer.T1, Line.L3] zonelist=(file=branchlist.txt) - DSS property name: `ZoneList`, DSS property index: 8. + Name: `ZoneList` """ def _get_LocalOnly(self) -> List[bool]: @@ -746,14 +798,15 @@ def _get_LocalOnly(self) -> List[bool]: self._get_batch_int32_prop(9) ] - def _set_LocalOnly(self, value: bool, flags: enums.SetterFlags = 0): + def _set_LocalOnly(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(9, value, flags) LocalOnly = property(_get_LocalOnly, _set_LocalOnly) # type: List[bool] """ - {Yes | No} Default is NO. If Yes, meter considers only the monitored element for EEN and UE calcs. Uses whole zone for losses. + If Yes, meter considers only the monitored element for EEN and UE calcs. Uses whole zone for losses. - DSS property name: `LocalOnly`, DSS property index: 9. + Name: `LocalOnly` + Default: False """ def _get_Mask(self) -> List[Float64Array]: @@ -769,7 +822,8 @@ def _set_Mask(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Mask for adding registers whenever all meters are totalized. Array of floating point numbers representing the multiplier to be used for summing each register from this meter. Default = (1, 1, 1, 1, ... ). You only have to enter as many as are changed (positional). Useful when two meters monitor same energy, etc. - DSS property name: `Mask`, DSS property index: 10. + Name: `Mask` + Default: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] """ def _get_Losses(self) -> List[bool]: @@ -777,14 +831,15 @@ def _get_Losses(self) -> List[bool]: self._get_batch_int32_prop(11) ] - def _set_Losses(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Losses(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(11, value, flags) Losses = property(_get_Losses, _set_Losses) # type: List[bool] """ - {Yes | No} Default is YES. Compute Zone losses. If NO, then no losses at all are computed. + Compute Zone losses. If NO, then no losses at all are computed. - DSS property name: `Losses`, DSS property index: 11. + Name: `Losses` + Default: True """ def _get_LineLosses(self) -> List[bool]: @@ -792,14 +847,15 @@ def _get_LineLosses(self) -> List[bool]: self._get_batch_int32_prop(12) ] - def _set_LineLosses(self, value: bool, flags: enums.SetterFlags = 0): + def _set_LineLosses(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(12, value, flags) LineLosses = property(_get_LineLosses, _set_LineLosses) # type: List[bool] """ - {Yes | No} Default is YES. Compute Line losses. If NO, then none of the losses are computed. + Compute Line losses. If NO, then none of the losses are computed. - DSS property name: `LineLosses`, DSS property index: 12. + Name: `LineLosses` + Default: True """ def _get_XfmrLosses(self) -> List[bool]: @@ -807,14 +863,15 @@ def _get_XfmrLosses(self) -> List[bool]: self._get_batch_int32_prop(13) ] - def _set_XfmrLosses(self, value: bool, flags: enums.SetterFlags = 0): + def _set_XfmrLosses(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(13, value, flags) XfmrLosses = property(_get_XfmrLosses, _set_XfmrLosses) # type: List[bool] """ - {Yes | No} Default is YES. Compute Transformer losses. If NO, transformers are ignored in loss calculations. + Compute Transformer losses. If NO, transformers are ignored in loss calculations. - DSS property name: `XfmrLosses`, DSS property index: 13. + Name: `XfmrLosses` + Default: True """ def _get_SeqLosses(self) -> List[bool]: @@ -822,14 +879,15 @@ def _get_SeqLosses(self) -> List[bool]: self._get_batch_int32_prop(14) ] - def _set_SeqLosses(self, value: bool, flags: enums.SetterFlags = 0): + def _set_SeqLosses(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(14, value, flags) SeqLosses = property(_get_SeqLosses, _set_SeqLosses) # type: List[bool] """ - {Yes | No} Default is YES. Compute Sequence losses in lines and segregate by line mode losses and zero mode losses. + Compute Sequence losses in lines and segregate by line mode losses and zero mode losses. - DSS property name: `SeqLosses`, DSS property index: 14. + Name: `SeqLosses` + Default: True """ def _get_ThreePhaseLosses(self) -> List[bool]: @@ -837,14 +895,15 @@ def _get_ThreePhaseLosses(self) -> List[bool]: self._get_batch_int32_prop(15) ] - def _set_ThreePhaseLosses(self, value: bool, flags: enums.SetterFlags = 0): + def _set_ThreePhaseLosses(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(15, value, flags) ThreePhaseLosses = property(_get_ThreePhaseLosses, _set_ThreePhaseLosses) # type: List[bool] """ - {Yes | No} Default is YES. Compute Line losses and segregate by 3-phase and other (1- and 2-phase) line losses. + Compute Line losses and segregate by 3-phase and other (1- and 2-phase) line losses. - DSS property name: `3PhaseLosses`, DSS property index: 15. + Name: `3PhaseLosses` + Default: True """ def _get_VBaseLosses(self) -> List[bool]: @@ -852,14 +911,15 @@ def _get_VBaseLosses(self) -> List[bool]: self._get_batch_int32_prop(16) ] - def _set_VBaseLosses(self, value: bool, flags: enums.SetterFlags = 0): + def _set_VBaseLosses(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(16, value, flags) VBaseLosses = property(_get_VBaseLosses, _set_VBaseLosses) # type: List[bool] """ - {Yes | No} Default is YES. Compute losses and segregate by voltage base. If NO, then voltage-based tabulation is not reported. + Compute losses and segregate by voltage base. If NO, then voltage-based tabulation is not reported. - DSS property name: `VBaseLosses`, DSS property index: 16. + Name: `VBaseLosses` + Default: True """ def _get_PhaseVoltageReport(self) -> List[bool]: @@ -867,14 +927,15 @@ def _get_PhaseVoltageReport(self) -> List[bool]: self._get_batch_int32_prop(17) ] - def _set_PhaseVoltageReport(self, value: bool, flags: enums.SetterFlags = 0): + def _set_PhaseVoltageReport(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(17, value, flags) PhaseVoltageReport = property(_get_PhaseVoltageReport, _set_PhaseVoltageReport) # type: List[bool] """ - {Yes | No} Default is NO. Report min, max, and average phase voltages for the zone and tabulate by voltage base. Demand Intervals must be turned on (Set Demand=true) and voltage bases must be defined for this property to take effect. Result is in a separate report file. + Report min, max, and average phase voltages for the zone and tabulate by voltage base. Demand Intervals must be turned on (Set Demand=true) and voltage bases must be defined for this property to take effect. Result is in a separate report file. - DSS property name: `PhaseVoltageReport`, DSS property index: 17. + Name: `PhaseVoltageReport` + Default: False """ def _get_Int_Rate(self) -> BatchFloat64ArrayProxy: @@ -887,7 +948,8 @@ def _set_Int_Rate(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Average number of annual interruptions for head of the meter zone (source side of zone or feeder). - DSS property name: `Int_Rate`, DSS property index: 18. + Name: `Int_Rate` + Default: 0.0 """ def _get_Int_Duration(self) -> BatchFloat64ArrayProxy: @@ -900,7 +962,8 @@ def _set_Int_Duration(self, value: Union[float, Float64Array], flags: enums.Sett """ Average annual duration, in hr, of interruptions for head of the meter zone (source side of zone or feeder). - DSS property name: `Int_Duration`, DSS property index: 19. + Name: `Int_Duration` + Default: 0.0 """ def _get_SAIFI(self) -> BatchFloat64ArrayProxy: @@ -911,9 +974,11 @@ def _set_SAIFI(self, value: Union[float, Float64Array], flags: enums.SetterFlags SAIFI = property(_get_SAIFI, _set_SAIFI) # type: BatchFloat64ArrayProxy """ - (Read only) Makes SAIFI result available via return on query (? energymeter.myMeter.SAIFI. + Makes SAIFI result available via return on query (? energymeter.myMeter.SAIFI. + + **Read-only** - DSS property name: `SAIFI`, DSS property index: 20. + Name: `SAIFI` """ def _get_SAIFIkW(self) -> BatchFloat64ArrayProxy: @@ -924,9 +989,11 @@ def _set_SAIFIkW(self, value: Union[float, Float64Array], flags: enums.SetterFla SAIFIkW = property(_get_SAIFIkW, _set_SAIFIkW) # type: BatchFloat64ArrayProxy """ - (Read only) Makes SAIFIkW result available via return on query (? energymeter.myMeter.SAIFIkW. + Makes SAIFIkW result available via return on query (? energymeter.myMeter.SAIFIkW. + + **Read-only** - DSS property name: `SAIFIkW`, DSS property index: 21. + Name: `SAIFIkW` """ def _get_SAIDI(self) -> BatchFloat64ArrayProxy: @@ -937,9 +1004,11 @@ def _set_SAIDI(self, value: Union[float, Float64Array], flags: enums.SetterFlags SAIDI = property(_get_SAIDI, _set_SAIDI) # type: BatchFloat64ArrayProxy """ - (Read only) Makes SAIDI result available via return on query (? energymeter.myMeter.SAIDI. + Makes SAIDI result available via return on query (? energymeter.myMeter.SAIDI. - DSS property name: `SAIDI`, DSS property index: 22. + **Read-only** + + Name: `SAIDI` """ def _get_CAIDI(self) -> BatchFloat64ArrayProxy: @@ -950,9 +1019,11 @@ def _set_CAIDI(self, value: Union[float, Float64Array], flags: enums.SetterFlags CAIDI = property(_get_CAIDI, _set_CAIDI) # type: BatchFloat64ArrayProxy """ - (Read only) Makes CAIDI result available via return on query (? energymeter.myMeter.CAIDI. + Makes CAIDI result available via return on query (? energymeter.myMeter.CAIDI. + + **Read-only** - DSS property name: `CAIDI`, DSS property index: 23. + Name: `CAIDI` """ def _get_CustInterrupts(self) -> BatchFloat64ArrayProxy: @@ -963,9 +1034,11 @@ def _set_CustInterrupts(self, value: Union[float, Float64Array], flags: enums.Se CustInterrupts = property(_get_CustInterrupts, _set_CustInterrupts) # type: BatchFloat64ArrayProxy """ - (Read only) Makes Total Customer Interrupts value result available via return on query (? energymeter.myMeter.CustInterrupts. + Makes Total Customer Interrupts value result available via return on query (? energymeter.myMeter.CustInterrupts. + + **Read-only** - DSS property name: `CustInterrupts`, DSS property index: 24. + Name: `CustInterrupts` """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -978,7 +1051,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 25. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -986,14 +1060,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(26) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(26, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 26. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1002,12 +1077,14 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 27. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(27, value, flags) class EnergyMeterBatchProperties(TypedDict): - Element: Union[AnyStr, DSSObj, List[AnyStr], List[DSSObj]] + Element: Union[AnyStr, PDElement, List[AnyStr], List[PDElement]] Terminal: Union[int, Int32Array] Action: Union[AnyStr, int, enums.EnergyMeterAction] Option: List[AnyStr] diff --git a/altdss/EnergyMeterExtras.py b/altdss/EnergyMeterExtras.py index 5524ea2..9623e90 100644 --- a/altdss/EnergyMeterExtras.py +++ b/altdss/EnergyMeterExtras.py @@ -212,18 +212,17 @@ def CloseDIFiles(self): Users are required to close the DI files at the end of a run, either using this function or the `CloseDI` DSS command. ''' - self._check_for_error(self._lib.Meters_CloseAllDIFiles()) + self._lib.Meters_CloseAllDIFiles() def OpenDIFiles(self): '''Open Demand Interval (DI) files''' - self._check_for_error(self._lib.Meters_OpenAllDIFiles()) + self._lib.Meters_OpenAllDIFiles() def DIFilesAreOpen(self) -> bool: '''Indicates if Demand Interval (DI) files have been properly opened.''' - return self._check_for_error(self._lib.Meters_Get_DIFilesAreOpen()) != 0 + return self._lib.Meters_Get_DIFilesAreOpen() def Totals(self) -> Float64Array: '''Returns the totals of all registers of all meters''' - self._check_for_error(self._lib.Meters_Get_Totals_GR()) - return self._get_float64_gr_array() + return self._lib.Meters_Get_Totals_GR() diff --git a/altdss/Error.py b/altdss/Error.py index 0b3a993..c9d3e67 100644 --- a/altdss/Error.py +++ b/altdss/Error.py @@ -18,7 +18,7 @@ def Description(self) -> str: Original COM help: https://opendss.epri.com/Description1.html ''' - return self._get_string(self._lib.Error_Get_Description()) + return self._lib.Error_Get_Description() @property def Number(self) -> int: @@ -34,9 +34,9 @@ def EarlyAbort(self) -> bool: ''' EarlyAbort controls whether all errors halts the DSS script processing (Compile/Redirect), defaults to True. - (API Extension) + **(API Extension)** ''' - return self._lib.Error_Get_EarlyAbort() != 0 + return self._lib.Error_Get_EarlyAbort() @EarlyAbort.setter def EarlyAbort(self, Value: bool): @@ -63,9 +63,9 @@ def ExtendedErrors(self) -> bool: The current default state is ON. For compatibility, the user can turn it off to restore the previous behavior. - (API Extension) + **(API Extension)** ''' - return self._lib.Error_Get_ExtendedErrors() != 0 + return self._lib.Error_Get_ExtendedErrors() @ExtendedErrors.setter def ExtendedErrors(self, Value: bool): @@ -89,10 +89,16 @@ def UseExceptions(self) -> bool: **WARNING:** This is a global setting, affects all DSS instances from DSS-Python, OpenDSSDirect.py and AltDSS. - (API Extension) + **(API Extension)** """ return Base._use_exceptions @UseExceptions.setter def UseExceptions(self, value: bool): Base._enable_exceptions(value) + _UseExceptions = 1 + if value: + self._api_util.settings_ptr[0] = self._api_util.settings_ptr[0] | _UseExceptions + else: + self._api_util.settings_ptr[0] = self._api_util.settings_ptr[0] & ~_UseExceptions + diff --git a/altdss/ExpControl.py b/altdss/ExpControl.py index 1f90232..82ff680 100644 --- a/altdss/ExpControl.py +++ b/altdss/ExpControl.py @@ -13,7 +13,7 @@ class ExpControl(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'ExpControl' - _cls_idx = 43 + _cls_idx = 44 _cls_int_idx = { 10, 12, @@ -87,7 +87,7 @@ def _set_PVSystemList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): If not specified, all PVSystems in the circuit are assumed to be controlled by this ExpControl. - DSS property name: `PVSystemList`, DSS property index: 1. + Name: `PVSystemList` """ def _get_VReg(self) -> float: @@ -98,11 +98,12 @@ def _set_VReg(self, value: float, flags: enums.SetterFlags = 0): VReg = property(_get_VReg, _set_VReg) # type: float """ - Per-unit voltage at which reactive power is zero; defaults to 1.0. + Per-unit voltage at which reactive power is zero. This may dynamically self-adjust when VregTau > 0, limited by VregMin and VregMax.If input as 0, Vreg will be initialized from a snapshot solution with no inverter Q.The equilibrium point of reactive power is also affected by Qbias - DSS property name: `VReg`, DSS property index: 2. + Name: `VReg` + Default: 1.0 """ def _get_Slope(self) -> float: @@ -113,11 +114,12 @@ def _set_Slope(self, value: float, flags: enums.SetterFlags = 0): Slope = property(_get_Slope, _set_Slope) # type: float """ - Per-unit reactive power injection / per-unit voltage deviation from Vreg; defaults to 50. + Per-unit reactive power injection / per-unit voltage deviation from Vreg. Unlike InvControl, base reactive power is constant at the inverter kva rating. - DSS property name: `Slope`, DSS property index: 3. + Name: `Slope` + Default: 50.0 """ def _get_VRegTau(self) -> float: @@ -128,11 +130,13 @@ def _set_VRegTau(self, value: float, flags: enums.SetterFlags = 0): VRegTau = property(_get_VRegTau, _set_VRegTau) # type: float """ - Time constant for adaptive Vreg. Defaults to 1200 seconds. + Time constant for adaptive Vreg. When the control injects or absorbs reactive power due to a voltage deviation from the Q=0 crossing of the volt-var curve, the Q=0 crossing will move toward the actual terminal voltage with this time constant. Over time, the effect is to gradually bring inverter reactive power to zero as the grid voltage changes due to non-solar effects. If zero, then Vreg stays fixed. IEEE1547-2018 requires adjustability from 300s to 5000s - DSS property name: `VRegTau`, DSS property index: 4. + Name: `VRegTau` + Units: s + Default: 1200.0 """ def _get_QBias(self) -> float: @@ -147,7 +151,8 @@ def _set_QBias(self, value: float, flags: enums.SetterFlags = 0): Enter > 0 for lagging (capacitive) bias, < 0 for leading (inductive) bias. - DSS property name: `QBias`, DSS property index: 5. + Name: `QBias` + Default: 0.0 """ def _get_VRegMin(self) -> float: @@ -160,7 +165,8 @@ def _set_VRegMin(self, value: float, flags: enums.SetterFlags = 0): """ Lower limit on adaptive Vreg; defaults to 0.95 per-unit - DSS property name: `VRegMin`, DSS property index: 6. + Name: `VRegMin` + Default: 0.95 """ def _get_VRegMax(self) -> float: @@ -173,7 +179,8 @@ def _set_VRegMax(self, value: float, flags: enums.SetterFlags = 0): """ Upper limit on adaptive Vreg; defaults to 1.05 per-unit - DSS property name: `VRegMax`, DSS property index: 7. + Name: `VRegMax` + Default: 1.05 """ def _get_QMaxLead(self) -> float: @@ -188,7 +195,8 @@ def _set_QMaxLead(self, value: float, flags: enums.SetterFlags = 0): Regardless of QmaxLead, the reactive power injection is still limited by dynamic headroom when actual real power output exceeds 0% - DSS property name: `QMaxLead`, DSS property index: 8. + Name: `QMaxLead` + Default: 0.44 """ def _get_QMaxLag(self) -> float: @@ -203,7 +211,8 @@ def _set_QMaxLag(self, value: float, flags: enums.SetterFlags = 0): For Category A inverters per P1547/D7, set this value to 0.25.Regardless of QmaxLag, the reactive power injection is still limited by dynamic headroom when actual real power output exceeds 0% - DSS property name: `QMaxLag`, DSS property index: 9. + Name: `QMaxLag` + Default: 0.44 """ def _get_EventLog(self) -> bool: @@ -214,9 +223,10 @@ def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): EventLog = property(_get_EventLog, _set_EventLog) # type: bool """ - {Yes/True* | No/False} Default is No for ExpControl. Log control actions to Eventlog. + Log control actions to Eventlog. - DSS property name: `EventLog`, DSS property index: 10. + Name: `EventLog` + Default: False """ def _get_DeltaQ_Factor(self) -> float: @@ -231,7 +241,8 @@ def _set_DeltaQ_Factor(self, value: float, flags: enums.SetterFlags = 0): Sets the maximum change (in per unit) from the prior var output level to the desired var output level during each control iteration. If numerical instability is noticed in solutions such as var sign changing from one control iteration to the next and voltages oscillating between two values with some separation, this is an indication of numerical instability (use the EventLog to diagnose). If the maximum control iterations are exceeded, and no numerical instability is seen in the EventLog of via monitors, then try increasing the value of this parameter to reduce the number of control iterations needed to achieve the control criteria, and move to the power flow solution. - DSS property name: `DeltaQ_Factor`, DSS property index: 11. + Name: `DeltaQ_Factor` + Default: 0.7 """ def _get_PreferQ(self) -> bool: @@ -242,11 +253,10 @@ def _set_PreferQ(self, value: bool, flags: enums.SetterFlags = 0): PreferQ = property(_get_PreferQ, _set_PreferQ) # type: bool """ - {Yes/True* | No/False} Default is No for ExpControl. - Curtails real power output as needed to meet the reactive power requirement. IEEE1547-2018 requires Yes, but the default is No for backward compatibility of OpenDSS models. - DSS property name: `PreferQ`, DSS property index: 12. + Name: `PreferQ` + Default: False """ def _get_TResponse(self) -> float: @@ -261,7 +271,8 @@ def _set_TResponse(self, value: float, flags: enums.SetterFlags = 0): The value of Q reaches 90% of the target change within Tresponse, which corresponds to a low-pass filter having tau = Tresponse / 2.3026. The behavior is similar to LPFTAU in InvControl, but here the response time is input instead of the time constant. IEEE1547-2018 default is 10s for Category A and 5s for Category B, adjustable from 1s to 90s for both categories. However, the default is 0 for backward compatibility of OpenDSS models. - DSS property name: `TResponse`, DSS property index: 13. + Name: `TResponse` + Default: 0.0 """ def _get_DERList(self) -> List[str]: @@ -278,7 +289,7 @@ def _set_DERList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): However, storage is not actually implemented yet. Use fully qualified PVSystem names. - DSS property name: `DERList`, DSS property index: 14. + Name: `DERList` """ def _get_BaseFreq(self) -> float: @@ -291,7 +302,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 15. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -302,9 +314,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 16. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -313,7 +326,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 17. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(17, value) @@ -340,7 +355,7 @@ class ExpControlProperties(TypedDict): class ExpControlBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'ExpControl' _obj_cls = ExpControl - _cls_idx = 43 + _cls_idx = 44 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -384,7 +399,7 @@ def _set_PVSystemList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): If not specified, all PVSystems in the circuit are assumed to be controlled by this ExpControl. - DSS property name: `PVSystemList`, DSS property index: 1. + Name: `PVSystemList` """ def _get_VReg(self) -> BatchFloat64ArrayProxy: @@ -395,11 +410,12 @@ def _set_VReg(self, value: Union[float, Float64Array], flags: enums.SetterFlags VReg = property(_get_VReg, _set_VReg) # type: BatchFloat64ArrayProxy """ - Per-unit voltage at which reactive power is zero; defaults to 1.0. + Per-unit voltage at which reactive power is zero. This may dynamically self-adjust when VregTau > 0, limited by VregMin and VregMax.If input as 0, Vreg will be initialized from a snapshot solution with no inverter Q.The equilibrium point of reactive power is also affected by Qbias - DSS property name: `VReg`, DSS property index: 2. + Name: `VReg` + Default: 1.0 """ def _get_Slope(self) -> BatchFloat64ArrayProxy: @@ -410,11 +426,12 @@ def _set_Slope(self, value: Union[float, Float64Array], flags: enums.SetterFlags Slope = property(_get_Slope, _set_Slope) # type: BatchFloat64ArrayProxy """ - Per-unit reactive power injection / per-unit voltage deviation from Vreg; defaults to 50. + Per-unit reactive power injection / per-unit voltage deviation from Vreg. Unlike InvControl, base reactive power is constant at the inverter kva rating. - DSS property name: `Slope`, DSS property index: 3. + Name: `Slope` + Default: 50.0 """ def _get_VRegTau(self) -> BatchFloat64ArrayProxy: @@ -425,11 +442,13 @@ def _set_VRegTau(self, value: Union[float, Float64Array], flags: enums.SetterFla VRegTau = property(_get_VRegTau, _set_VRegTau) # type: BatchFloat64ArrayProxy """ - Time constant for adaptive Vreg. Defaults to 1200 seconds. + Time constant for adaptive Vreg. When the control injects or absorbs reactive power due to a voltage deviation from the Q=0 crossing of the volt-var curve, the Q=0 crossing will move toward the actual terminal voltage with this time constant. Over time, the effect is to gradually bring inverter reactive power to zero as the grid voltage changes due to non-solar effects. If zero, then Vreg stays fixed. IEEE1547-2018 requires adjustability from 300s to 5000s - DSS property name: `VRegTau`, DSS property index: 4. + Name: `VRegTau` + Units: s + Default: 1200.0 """ def _get_QBias(self) -> BatchFloat64ArrayProxy: @@ -444,7 +463,8 @@ def _set_QBias(self, value: Union[float, Float64Array], flags: enums.SetterFlags Enter > 0 for lagging (capacitive) bias, < 0 for leading (inductive) bias. - DSS property name: `QBias`, DSS property index: 5. + Name: `QBias` + Default: 0.0 """ def _get_VRegMin(self) -> BatchFloat64ArrayProxy: @@ -457,7 +477,8 @@ def _set_VRegMin(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Lower limit on adaptive Vreg; defaults to 0.95 per-unit - DSS property name: `VRegMin`, DSS property index: 6. + Name: `VRegMin` + Default: 0.95 """ def _get_VRegMax(self) -> BatchFloat64ArrayProxy: @@ -470,7 +491,8 @@ def _set_VRegMax(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Upper limit on adaptive Vreg; defaults to 1.05 per-unit - DSS property name: `VRegMax`, DSS property index: 7. + Name: `VRegMax` + Default: 1.05 """ def _get_QMaxLead(self) -> BatchFloat64ArrayProxy: @@ -485,7 +507,8 @@ def _set_QMaxLead(self, value: Union[float, Float64Array], flags: enums.SetterFl Regardless of QmaxLead, the reactive power injection is still limited by dynamic headroom when actual real power output exceeds 0% - DSS property name: `QMaxLead`, DSS property index: 8. + Name: `QMaxLead` + Default: 0.44 """ def _get_QMaxLag(self) -> BatchFloat64ArrayProxy: @@ -500,7 +523,8 @@ def _set_QMaxLag(self, value: Union[float, Float64Array], flags: enums.SetterFla For Category A inverters per P1547/D7, set this value to 0.25.Regardless of QmaxLag, the reactive power injection is still limited by dynamic headroom when actual real power output exceeds 0% - DSS property name: `QMaxLag`, DSS property index: 9. + Name: `QMaxLag` + Default: 0.44 """ def _get_EventLog(self) -> List[bool]: @@ -508,14 +532,15 @@ def _get_EventLog(self) -> List[bool]: self._get_batch_int32_prop(10) ] - def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): + def _set_EventLog(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(10, value, flags) EventLog = property(_get_EventLog, _set_EventLog) # type: List[bool] """ - {Yes/True* | No/False} Default is No for ExpControl. Log control actions to Eventlog. + Log control actions to Eventlog. - DSS property name: `EventLog`, DSS property index: 10. + Name: `EventLog` + Default: False """ def _get_DeltaQ_Factor(self) -> BatchFloat64ArrayProxy: @@ -530,7 +555,8 @@ def _set_DeltaQ_Factor(self, value: Union[float, Float64Array], flags: enums.Set Sets the maximum change (in per unit) from the prior var output level to the desired var output level during each control iteration. If numerical instability is noticed in solutions such as var sign changing from one control iteration to the next and voltages oscillating between two values with some separation, this is an indication of numerical instability (use the EventLog to diagnose). If the maximum control iterations are exceeded, and no numerical instability is seen in the EventLog of via monitors, then try increasing the value of this parameter to reduce the number of control iterations needed to achieve the control criteria, and move to the power flow solution. - DSS property name: `DeltaQ_Factor`, DSS property index: 11. + Name: `DeltaQ_Factor` + Default: 0.7 """ def _get_PreferQ(self) -> List[bool]: @@ -538,16 +564,15 @@ def _get_PreferQ(self) -> List[bool]: self._get_batch_int32_prop(12) ] - def _set_PreferQ(self, value: bool, flags: enums.SetterFlags = 0): + def _set_PreferQ(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(12, value, flags) PreferQ = property(_get_PreferQ, _set_PreferQ) # type: List[bool] """ - {Yes/True* | No/False} Default is No for ExpControl. - Curtails real power output as needed to meet the reactive power requirement. IEEE1547-2018 requires Yes, but the default is No for backward compatibility of OpenDSS models. - DSS property name: `PreferQ`, DSS property index: 12. + Name: `PreferQ` + Default: False """ def _get_TResponse(self) -> BatchFloat64ArrayProxy: @@ -562,7 +587,8 @@ def _set_TResponse(self, value: Union[float, Float64Array], flags: enums.SetterF The value of Q reaches 90% of the target change within Tresponse, which corresponds to a low-pass filter having tau = Tresponse / 2.3026. The behavior is similar to LPFTAU in InvControl, but here the response time is input instead of the time constant. IEEE1547-2018 default is 10s for Category A and 5s for Category B, adjustable from 1s to 90s for both categories. However, the default is 0 for backward compatibility of OpenDSS models. - DSS property name: `TResponse`, DSS property index: 13. + Name: `TResponse` + Default: 0.0 """ def _get_DERList(self) -> List[List[str]]: @@ -581,7 +607,7 @@ def _set_DERList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): However, storage is not actually implemented yet. Use fully qualified PVSystem names. - DSS property name: `DERList`, DSS property index: 14. + Name: `DERList` """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -594,7 +620,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 15. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -602,14 +629,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(16) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(16, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 16. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -618,7 +646,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 17. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(17, value, flags) diff --git a/altdss/FMonitor.py b/altdss/FMonitor.py new file mode 100644 index 0000000..f13041c --- /dev/null +++ b/altdss/FMonitor.py @@ -0,0 +1,1039 @@ +# Copyright (c) 2021-2024 Paulo Meira +# Copyright (c) 2021-2024 DSS-Extensions contributors +from __future__ import annotations +from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING +from typing_extensions import TypedDict, Unpack +from .types import Float64Array, Int32Array +from . import enums +from .DSSObj import IDSSObj, DSSObj +from .Batch import DSSBatch +from .ArrayProxy import BatchFloat64ArrayProxy, BatchInt32ArrayProxy +from .common import LIST_LIKE +from .CircuitElement import CircuitElementBatchMixin, CircuitElementMixin + +class FMonitor(DSSObj, CircuitElementMixin): + __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + _cls_name = 'FMonitor' + _cls_idx = 51 + _cls_int_idx = { + 2, + 5, + 6, + 7, + 10, + 13, + 15, + 17, + 23, + } + _cls_float_idx = { + 4, + 12, + 16, + 22, + } + _cls_prop_idx = { + 'element': 1, + 'terminal': 2, + 'action': 3, + 'p_trans_ref': 4, + 'node_num': 5, + 'cluster_num': 6, + 'nodes': 7, + 'commvector': 8, + 'elemtableline': 9, + 'p_mode': 10, + 'commdelayvector': 11, + 't_intvl_smpl': 12, + 'maxlocalmem': 13, + 'volt_limits_pu': 14, + 'b_curt_ctrl': 15, + 'up_dly': 16, + 'virtual_ld_node': 17, + 'egen': 18, + 'attack_defense': 19, + 'comm_hide': 20, + 'comm_node_hide': 21, + 'basefreq': 22, + 'enabled': 23, + 'like': 24, + } + + def __init__(self, api_util, ptr): + DSSObj.__init__(self, api_util, ptr) + CircuitElementMixin.__init__(self) + + def edit(self, **kwargs: Unpack[FMonitorProperties]) -> FMonitor: + """ + Edit this FMonitor. + + 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. + + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the object. + :return: Returns itself to allow call chaining. + """ + + self._edit(props=kwargs) + return self + + + def _get_Element_str(self) -> str: + return self._get_prop_string(1) + + def _set_Element_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(1, value, flags) + + Element_str = property(_get_Element_str, _set_Element_str) # type: str + """ + Name (Full Object name) of element to which the monitor is connected. + + Name: `Element` + Default: Vsource.source + """ + + def _get_Element(self) -> DSSObj: + return self._get_obj(1, None) + + def _set_Element(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlags = 0): + if isinstance(value, DSSObj) or value is None: + self._set_obj(1, value, flags) + return + + self._set_string_o(1, value, flags) + + Element = property(_get_Element, _set_Element) # type: DSSObj + """ + Name (Full Object name) of element to which the monitor is connected. + + Name: `Element` + Default: Vsource.source + """ + + def _get_Terminal(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 2) + + def _set_Terminal(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 2, value, flags) + + Terminal = property(_get_Terminal, _set_Terminal) # type: int + """ + Number of the terminal of the circuit element to which the monitor is connected. 1 or 2, typically. For monitoring states, attach monitor to terminal 1. + + Name: `Terminal` + Default: 1 + """ + + def Action(self, value: Union[AnyStr, int, enums.FMonitorAction], flags: enums.SetterFlags = 0): + """ + {Clear | Save | Take | Process} + (C)lears or (S)aves current buffer. + (T)ake action takes a sample. + (P)rocesses the data taken so far (e.g. Pst for mode 4). + + Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action. + + Name: `Action` + """ + if isinstance(value, int): + self._lib.Obj_SetInt32(self._ptr, 3, value, flags) + return + + self._set_string_o(3, value) + + def Clear(self, flags: enums.SetterFlags = 0): + '''Shortcut to Action(FMonitorAction.Clear)''' + self._lib.Obj_SetInt32(self._ptr, 3, enums.FMonitorAction.Clear, flags) + + def Reset(self, flags: enums.SetterFlags = 0): + '''Shortcut to Action(FMonitorAction.Reset)''' + self._lib.Obj_SetInt32(self._ptr, 3, enums.FMonitorAction.Reset, flags) + + def _get_P_Trans_Ref(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 4) + + def _set_P_Trans_Ref(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 4, value, flags) + + P_Trans_Ref = property(_get_P_Trans_Ref, _set_P_Trans_Ref) # type: float + """ + P_trans_ref: P ref value for metered element(unit kW) + + Name: `P_Trans_Ref` + Default: 0.0 + """ + + def _get_Node_Num(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 5) + + def _set_Node_Num(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 5, value, flags) + + Node_Num = property(_get_Node_Num, _set_Node_Num) # type: int + """ + Node_num + Assign a node number within a cluster + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `Node_Num` + Default: 0 + """ + + def _get_Cluster_Num(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 6) + + def _set_Cluster_Num(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 6, value, flags) + + Cluster_Num = property(_get_Cluster_Num, _set_Cluster_Num) # type: int + """ + Cluster_num + + Name: `Cluster_Num` + Default: 0 + """ + + def _get_Nodes(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 7) + + def _set_Nodes(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 7, value, flags) + + Nodes = property(_get_Nodes, _set_Nodes) # type: int + """ + Nodes connected to this FMonitor. Example:(Nodes=33) + + Name: `Nodes` + Default: 33 + """ + + def _get_CommVector(self) -> str: + return self._get_prop_string(8) + + def _set_CommVector(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(8, value, flags) + + CommVector = property(_get_CommVector, _set_CommVector) # type: str + """ + CommVector of this FMonitor. + The first entry of this vector is the number of + Example:(CommVector={2,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}) + The example show node #2 can communicate to node #1,#2,#3 + + Name: `CommVector` + """ + + def _get_ElemTableLine(self) -> str: + return self._get_prop_string(9) + + def _set_ElemTableLine(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(9, value, flags) + + ElemTableLine = property(_get_ElemTableLine, _set_ElemTableLine) # type: str + """ + ElemTableLine of the each node within this cluster. + The first entry of this vector is the number of node within cluster + The second entry of this vector is element name + The third entry of this vector is terminal number + The fourth entry of this vector is voltage sensor + Example:(ElemTable={2,Line.1,1,1}) + The example show node #2 Element + + Name: `ElemTableLine` + """ + + def _get_P_Mode(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 10) + + def _set_P_Mode(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 10, value, flags) + + P_Mode = property(_get_P_Mode, _set_P_Mode) # type: int + """ + 0 = real Power controlled by each p_ref on each DG + 1 = real Power on MeteredElem controlled by DGs according to P_trans_ref + 2 = Not defined + 3 = Not defined + + Name: `P_Mode` + Default: 0 + """ + + def _get_CommDelayVector(self) -> str: + return self._get_prop_string(11) + + def _set_CommDelayVector(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(11, value, flags) + + CommDelayVector = property(_get_CommDelayVector, _set_CommDelayVector) # type: str + """ + CommDelayVector of this FMonitor. + The first entry of this vector is the number of the node. + Example:(CommVector={2,t1,0,t2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}) + The example show node #2 can communicate to node #1 and #3 with time delay t1 and t2 separately + + Name: `CommDelayVector` + """ + + def _get_T_IntVL_Smpl(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 12) + + def _set_T_IntVL_Smpl(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 12, value, flags) + + T_IntVL_Smpl = property(_get_T_IntVL_Smpl, _set_T_IntVL_Smpl) # type: float + """ + T_intvl_smpl: + The information of each agent will be sampled at each T_comm time. Unit is second. + T_intvl_smpl is also the minimal communication time between neighbor nodes. + If T_intvl_smpl=0.0, no delay for the communication is enabled in the simulation. + + Name: `T_IntVL_Smpl` + Default: 0.0 + """ + + def _get_MaxLocalMem(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 13) + + def _set_MaxLocalMem(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 13, value, flags) + + MaxLocalMem = property(_get_MaxLocalMem, _set_MaxLocalMem) # type: int + """ + MaxLocalMem: the max number of local memory size. No larger than 99 + + Name: `MaxLocalMem` + Default: 10 + """ + + def _get_Volt_Limits_pu(self) -> str: + return self._get_prop_string(14) + + def _set_Volt_Limits_pu(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(14, value, flags) + + Volt_Limits_pu = property(_get_Volt_Limits_pu, _set_Volt_Limits_pu) # type: str + """ + Volt_limits_pu: example "Volt_limits_pu={a0,a1, a2}" + a0: the phase number, 0 means pos. seq; a1: upper voltage limit of this cluster, usually 1.05; + a2: upper voltage limit of this cluster, usually 0.95 + + Name: `Volt_Limits_pu` + Default: [0, 0, 0.94999999999999996] + """ + + def _get_b_Curt_Ctrl(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 15) != 0 + + def _set_b_Curt_Ctrl(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 15, value, flags) + + b_Curt_Ctrl = property(_get_b_Curt_Ctrl, _set_b_Curt_Ctrl) # type: bool + """ + b_Curt_Ctrl:set P curtailment on/off; + b_Curt_Ctrl=True: P curtailment will be implemented according to the system voltage (default); + b_Curt_Ctrl=False: P curtailment will not be implemented. + + Name: `b_Curt_Ctrl` + Default: False + """ + + def _get_Up_Dly(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 16) + + def _set_Up_Dly(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 16, value, flags) + + Up_Dly = property(_get_Up_Dly, _set_Up_Dly) # type: float + """ + up_dly: delay time to upper level. For example: "up_dly := 0.05" + It can be used to simulate the time delay between clusters + + Name: `Up_Dly` + Default: 0.0 + """ + + def _get_Virtual_LD_Node(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 17) + + def _set_Virtual_LD_Node(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 17, value, flags) + + Virtual_LD_Node = property(_get_Virtual_LD_Node, _set_Virtual_LD_Node) # type: int + """ + Which node talks to upper level. + + Name: `Virtual_LD_Node` + Default: 1 + """ + + def _get_EGen(self) -> str: + return self._get_prop_string(18) + + def _set_EGen(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(18, value, flags) + + EGen = property(_get_EGen, _set_EGen) # type: str + """ + `EGen = {kVA_fm, M_fm, D_fm, Tau_fm, Ki_fm,init_time}` + + where equations are: + + `delta'' = omega` + `M_fm * omega'' = puPm - puPe - D_fm*omega` + `Tau_fm*Pm '' = Ki_fm * omega` + `puPm = Pm / kVA_fm, puPe = Pe / kVAM_fm;` + + Everything is zero within init_time (default value is 0.5s); + `k_dltP` is the coordinator for PV control input: `u_i = k_dltP * pu_DltP + omg_fm`. + + Name: `EGen` + Default: [0, 0, 0, 0, 0, 0.5, 0] + """ + + def _get_Attack_Defense(self) -> str: + return self._get_prop_string(19) + + def _set_Attack_Defense(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(19, value, flags) + + Attack_Defense = property(_get_Attack_Defense, _set_Attack_Defense) # type: str + """ + Define attack and defense: + + `attack_defense = {atk , dfs , atk_time , atk_node_num , d_atk0 , beta_dfs, D_beta, D_p }`. + + attack_defense has to be defined after ''nodes'. + Example: `attack_defense = { true , false , 0.5 , 1 , 0.1 , 5, 1 , 1}`. + Example: + (1) under attack; + (2) defense is off; + (3) attack starts at 0.5s; + (4) attack is on node 1; + (5) initial value of attack: `d_0 = 0.1`; + (6) `beta = 5`; + (7) `D_beta` is used as a multiplier on $\\phi$; + (8) `D_p` is used as the attack on gradient control: `D_p = 1`, which is normal; `D_p=-1`, gradient control work on the opposite. + + Name: `Attack_Defense` + Default: ["no", "no", 0.5, 1, 0, 0, 1, 1] + """ + + def _get_Comm_Hide(self) -> str: + return self._get_prop_string(20) + + def _set_Comm_Hide(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(20, value, flags) + + Comm_Hide = property(_get_Comm_Hide, _set_Comm_Hide) # type: str + """ + Comm_hide={...}. It is defined like CommVector. + + Name: `Comm_Hide` + """ + + def _get_Comm_Node_Hide(self) -> str: + return self._get_prop_string(21) + + def _set_Comm_Node_Hide(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(21, value, flags) + + Comm_Node_Hide = property(_get_Comm_Node_Hide, _set_Comm_Node_Hide) # type: str + """ + Comm_node_hide={...}. It is defined like CommVector. + + Name: `Comm_Node_Hide` + """ + + def _get_BaseFreq(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 22) + + def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 22, value, flags) + + BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: float + """ + Base Frequency for ratings. + + Name: `BaseFreq` + Units: Hz + """ + + def _get_Enabled(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 23) != 0 + + def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 23, value, flags) + + Enabled = property(_get_Enabled, _set_Enabled) # type: bool + """ + Indicates whether this element is enabled. + + Name: `Enabled` + Default: True + """ + + def Like(self, value: AnyStr): + """ + Make like another object, e.g.: + + New Capacitor.C2 like=c1 ... + + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` + """ + self._set_string_o(24, value) + + +class FMonitorProperties(TypedDict): + Element: Union[AnyStr, DSSObj] + Terminal: int + Action: Union[AnyStr, int, enums.FMonitorAction] + P_Trans_Ref: float + Node_Num: int + Cluster_Num: int + Nodes: int + CommVector: AnyStr + ElemTableLine: AnyStr + P_Mode: int + CommDelayVector: AnyStr + T_IntVL_Smpl: float + MaxLocalMem: int + Volt_Limits_pu: AnyStr + b_Curt_Ctrl: bool + Up_Dly: float + Virtual_LD_Node: int + EGen: AnyStr + Attack_Defense: AnyStr + Comm_Hide: AnyStr + Comm_Node_Hide: AnyStr + BaseFreq: float + Enabled: bool + Like: AnyStr + +class FMonitorBatch(DSSBatch, CircuitElementBatchMixin): + _cls_name = 'FMonitor' + _obj_cls = FMonitor + _cls_idx = 51 + __slots__ = [] + + def __init__(self, api_util, **kwargs): + DSSBatch.__init__(self, api_util, **kwargs) + CircuitElementBatchMixin.__init__(self) + + def edit(self, **kwargs: Unpack[FMonitorBatchProperties]) -> FMonitorBatch: + """ + Edit this FMonitor 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. + + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the objects. + :return: Returns itself to allow call chaining. + """ + + self._edit(props=kwargs) + return self + + + if TYPE_CHECKING: + def __iter__(self) -> Iterator[FMonitor]: + yield from DSSBatch.__iter__(self) + + def _get_Element_str(self) -> List[str]: + return self._get_batch_str_prop(1) + + def _set_Element_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(1, value, flags) + + Element_str = property(_get_Element_str, _set_Element_str) # type: List[str] + """ + Name (Full Object name) of element to which the monitor is connected. + + Name: `Element` + Default: Vsource.source + """ + + def _get_Element(self) -> List[DSSObj]: + return self._get_batch_obj_prop(1) + + def _set_Element(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSObj]], flags: enums.SetterFlags = 0): + self._set_batch_obj_prop(1, value, flags) + + Element = property(_get_Element, _set_Element) # type: List[DSSObj] + """ + Name (Full Object name) of element to which the monitor is connected. + + Name: `Element` + Default: Vsource.source + """ + + def _get_Terminal(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 2) + + def _set_Terminal(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(2, value, flags) + + Terminal = property(_get_Terminal, _set_Terminal) # type: BatchInt32ArrayProxy + """ + Number of the terminal of the circuit element to which the monitor is connected. 1 or 2, typically. For monitoring states, attach monitor to terminal 1. + + Name: `Terminal` + Default: 1 + """ + + def Action(self, value: Union[AnyStr, int, enums.FMonitorAction], flags: enums.SetterFlags = 0): + """ + {Clear | Save | Take | Process} + (C)lears or (S)aves current buffer. + (T)ake action takes a sample. + (P)rocesses the data taken so far (e.g. Pst for mode 4). + + Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action. + + Name: `Action` + """ + if isinstance(value, (bytes, str)) or (isinstance(value, LIST_LIKE) and len(value) > 0 and isinstance(value[0], (bytes, str))): + self._set_batch_string(3, value, flags) + else: + self._set_batch_int32_array(3, value, flags) + + def Clear(self, flags: enums.SetterFlags = 0): + '''Shortcut to Action(FMonitorAction.Clear)''' + self._set_batch_int32_array(3, enums.FMonitorAction.Clear, flags) + + def Reset(self, flags: enums.SetterFlags = 0): + '''Shortcut to Action(FMonitorAction.Reset)''' + self._set_batch_int32_array(3, enums.FMonitorAction.Reset, flags) + + def _get_P_Trans_Ref(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 4) + + def _set_P_Trans_Ref(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(4, value, flags) + + P_Trans_Ref = property(_get_P_Trans_Ref, _set_P_Trans_Ref) # type: BatchFloat64ArrayProxy + """ + P_trans_ref: P ref value for metered element(unit kW) + + Name: `P_Trans_Ref` + Default: 0.0 + """ + + def _get_Node_Num(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 5) + + def _set_Node_Num(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(5, value, flags) + + Node_Num = property(_get_Node_Num, _set_Node_Num) # type: BatchInt32ArrayProxy + """ + Node_num + Assign a node number within a cluster + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `Node_Num` + Default: 0 + """ + + def _get_Cluster_Num(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 6) + + def _set_Cluster_Num(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(6, value, flags) + + Cluster_Num = property(_get_Cluster_Num, _set_Cluster_Num) # type: BatchInt32ArrayProxy + """ + Cluster_num + + Name: `Cluster_Num` + Default: 0 + """ + + def _get_Nodes(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 7) + + def _set_Nodes(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(7, value, flags) + + Nodes = property(_get_Nodes, _set_Nodes) # type: BatchInt32ArrayProxy + """ + Nodes connected to this FMonitor. Example:(Nodes=33) + + Name: `Nodes` + Default: 33 + """ + + def _get_CommVector(self) -> List[str]: + return self._get_batch_str_prop(8) + + def _set_CommVector(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(8, value, flags) + + CommVector = property(_get_CommVector, _set_CommVector) # type: List[str] + """ + CommVector of this FMonitor. + The first entry of this vector is the number of + Example:(CommVector={2,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}) + The example show node #2 can communicate to node #1,#2,#3 + + Name: `CommVector` + """ + + def _get_ElemTableLine(self) -> List[str]: + return self._get_batch_str_prop(9) + + def _set_ElemTableLine(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(9, value, flags) + + ElemTableLine = property(_get_ElemTableLine, _set_ElemTableLine) # type: List[str] + """ + ElemTableLine of the each node within this cluster. + The first entry of this vector is the number of node within cluster + The second entry of this vector is element name + The third entry of this vector is terminal number + The fourth entry of this vector is voltage sensor + Example:(ElemTable={2,Line.1,1,1}) + The example show node #2 Element + + Name: `ElemTableLine` + """ + + def _get_P_Mode(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 10) + + def _set_P_Mode(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(10, value, flags) + + P_Mode = property(_get_P_Mode, _set_P_Mode) # type: BatchInt32ArrayProxy + """ + 0 = real Power controlled by each p_ref on each DG + 1 = real Power on MeteredElem controlled by DGs according to P_trans_ref + 2 = Not defined + 3 = Not defined + + Name: `P_Mode` + Default: 0 + """ + + def _get_CommDelayVector(self) -> List[str]: + return self._get_batch_str_prop(11) + + def _set_CommDelayVector(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(11, value, flags) + + CommDelayVector = property(_get_CommDelayVector, _set_CommDelayVector) # type: List[str] + """ + CommDelayVector of this FMonitor. + The first entry of this vector is the number of the node. + Example:(CommVector={2,t1,0,t2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}) + The example show node #2 can communicate to node #1 and #3 with time delay t1 and t2 separately + + Name: `CommDelayVector` + """ + + def _get_T_IntVL_Smpl(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 12) + + def _set_T_IntVL_Smpl(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(12, value, flags) + + T_IntVL_Smpl = property(_get_T_IntVL_Smpl, _set_T_IntVL_Smpl) # type: BatchFloat64ArrayProxy + """ + T_intvl_smpl: + The information of each agent will be sampled at each T_comm time. Unit is second. + T_intvl_smpl is also the minimal communication time between neighbor nodes. + If T_intvl_smpl=0.0, no delay for the communication is enabled in the simulation. + + Name: `T_IntVL_Smpl` + Default: 0.0 + """ + + def _get_MaxLocalMem(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 13) + + def _set_MaxLocalMem(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(13, value, flags) + + MaxLocalMem = property(_get_MaxLocalMem, _set_MaxLocalMem) # type: BatchInt32ArrayProxy + """ + MaxLocalMem: the max number of local memory size. No larger than 99 + + Name: `MaxLocalMem` + Default: 10 + """ + + def _get_Volt_Limits_pu(self) -> List[str]: + return self._get_batch_str_prop(14) + + def _set_Volt_Limits_pu(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(14, value, flags) + + Volt_Limits_pu = property(_get_Volt_Limits_pu, _set_Volt_Limits_pu) # type: List[str] + """ + Volt_limits_pu: example "Volt_limits_pu={a0,a1, a2}" + a0: the phase number, 0 means pos. seq; a1: upper voltage limit of this cluster, usually 1.05; + a2: upper voltage limit of this cluster, usually 0.95 + + Name: `Volt_Limits_pu` + Default: [0, 0, 0.94999999999999996] + """ + + def _get_b_Curt_Ctrl(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(15) + ] + + def _set_b_Curt_Ctrl(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(15, value, flags) + + b_Curt_Ctrl = property(_get_b_Curt_Ctrl, _set_b_Curt_Ctrl) # type: List[bool] + """ + b_Curt_Ctrl:set P curtailment on/off; + b_Curt_Ctrl=True: P curtailment will be implemented according to the system voltage (default); + b_Curt_Ctrl=False: P curtailment will not be implemented. + + Name: `b_Curt_Ctrl` + Default: False + """ + + def _get_Up_Dly(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 16) + + def _set_Up_Dly(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(16, value, flags) + + Up_Dly = property(_get_Up_Dly, _set_Up_Dly) # type: BatchFloat64ArrayProxy + """ + up_dly: delay time to upper level. For example: "up_dly := 0.05" + It can be used to simulate the time delay between clusters + + Name: `Up_Dly` + Default: 0.0 + """ + + def _get_Virtual_LD_Node(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 17) + + def _set_Virtual_LD_Node(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(17, value, flags) + + Virtual_LD_Node = property(_get_Virtual_LD_Node, _set_Virtual_LD_Node) # type: BatchInt32ArrayProxy + """ + Which node talks to upper level. + + Name: `Virtual_LD_Node` + Default: 1 + """ + + def _get_EGen(self) -> List[str]: + return self._get_batch_str_prop(18) + + def _set_EGen(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(18, value, flags) + + EGen = property(_get_EGen, _set_EGen) # type: List[str] + """ + `EGen = {kVA_fm, M_fm, D_fm, Tau_fm, Ki_fm,init_time}` + + where equations are: + + `delta'' = omega` + `M_fm * omega'' = puPm - puPe - D_fm*omega` + `Tau_fm*Pm '' = Ki_fm * omega` + `puPm = Pm / kVA_fm, puPe = Pe / kVAM_fm;` + + Everything is zero within init_time (default value is 0.5s); + `k_dltP` is the coordinator for PV control input: `u_i = k_dltP * pu_DltP + omg_fm`. + + Name: `EGen` + Default: [0, 0, 0, 0, 0, 0.5, 0] + """ + + def _get_Attack_Defense(self) -> List[str]: + return self._get_batch_str_prop(19) + + def _set_Attack_Defense(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(19, value, flags) + + Attack_Defense = property(_get_Attack_Defense, _set_Attack_Defense) # type: List[str] + """ + Define attack and defense: + + `attack_defense = {atk , dfs , atk_time , atk_node_num , d_atk0 , beta_dfs, D_beta, D_p }`. + + attack_defense has to be defined after ''nodes'. + Example: `attack_defense = { true , false , 0.5 , 1 , 0.1 , 5, 1 , 1}`. + Example: + (1) under attack; + (2) defense is off; + (3) attack starts at 0.5s; + (4) attack is on node 1; + (5) initial value of attack: `d_0 = 0.1`; + (6) `beta = 5`; + (7) `D_beta` is used as a multiplier on $\\phi$; + (8) `D_p` is used as the attack on gradient control: `D_p = 1`, which is normal; `D_p=-1`, gradient control work on the opposite. + + Name: `Attack_Defense` + Default: ["no", "no", 0.5, 1, 0, 0, 1, 1] + """ + + def _get_Comm_Hide(self) -> List[str]: + return self._get_batch_str_prop(20) + + def _set_Comm_Hide(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(20, value, flags) + + Comm_Hide = property(_get_Comm_Hide, _set_Comm_Hide) # type: List[str] + """ + Comm_hide={...}. It is defined like CommVector. + + Name: `Comm_Hide` + """ + + def _get_Comm_Node_Hide(self) -> List[str]: + return self._get_batch_str_prop(21) + + def _set_Comm_Node_Hide(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(21, value, flags) + + Comm_Node_Hide = property(_get_Comm_Node_Hide, _set_Comm_Node_Hide) # type: List[str] + """ + Comm_node_hide={...}. It is defined like CommVector. + + Name: `Comm_Node_Hide` + """ + + def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 22) + + def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(22, value, flags) + + BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: BatchFloat64ArrayProxy + """ + Base Frequency for ratings. + + Name: `BaseFreq` + Units: Hz + """ + + def _get_Enabled(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(23) + ] + + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(23, value, flags) + + Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] + """ + Indicates whether this element is enabled. + + Name: `Enabled` + Default: True + """ + + def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): + """ + Make like another object, e.g.: + + New Capacitor.C2 like=c1 ... + + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` + """ + self._set_batch_string(24, value, flags) + +class FMonitorBatchProperties(TypedDict): + Element: Union[AnyStr, DSSObj, List[AnyStr], List[DSSObj]] + Terminal: Union[int, Int32Array] + Action: Union[AnyStr, int, enums.FMonitorAction] + P_Trans_Ref: Union[float, Float64Array] + Node_Num: Union[int, Int32Array] + Cluster_Num: Union[int, Int32Array] + Nodes: Union[int, Int32Array] + CommVector: Union[AnyStr, List[AnyStr]] + ElemTableLine: Union[AnyStr, List[AnyStr]] + P_Mode: Union[int, Int32Array] + CommDelayVector: Union[AnyStr, List[AnyStr]] + T_IntVL_Smpl: Union[float, Float64Array] + MaxLocalMem: Union[int, Int32Array] + Volt_Limits_pu: Union[AnyStr, List[AnyStr]] + b_Curt_Ctrl: bool + Up_Dly: Union[float, Float64Array] + Virtual_LD_Node: Union[int, Int32Array] + EGen: Union[AnyStr, List[AnyStr]] + Attack_Defense: Union[AnyStr, List[AnyStr]] + Comm_Hide: Union[AnyStr, List[AnyStr]] + Comm_Node_Hide: Union[AnyStr, List[AnyStr]] + BaseFreq: Union[float, Float64Array] + Enabled: bool + Like: AnyStr + +class IFMonitor(IDSSObj, FMonitorBatch): + __slots__ = IDSSObj._extra_slots + + def __init__(self, iobj): + IDSSObj.__init__(self, iobj, FMonitor, FMonitorBatch) + FMonitorBatch.__init__(self, self._api_util, sync_cls_idx=FMonitor._cls_idx) + + if TYPE_CHECKING: + def __getitem__(self, name_or_idx: Union[AnyStr, int]) -> FMonitor: + return self.find(name_or_idx) + + def batch(self, **kwargs) -> FMonitorBatch: #TODO: add annotation to kwargs (specialized typed dict) + """ + Creates a new batch handler of (existing) FMonitor objects + """ + return self._batch_cls(self._api_util, **kwargs) + + def __iter__(self) -> Iterator[FMonitor]: + yield from FMonitorBatch.__iter__(self) + + + def new(self, name: AnyStr, *, begin_edit: Optional[bool] = None, activate=False, **kwargs: Unpack[FMonitorProperties]) -> FMonitor: + """ + Creates a new FMonitor. + + :param name: The object's name is a required positional argument. + + :param 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). + + :param 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 an `end_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. + + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the object. + :return: 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. + """ + return self._new(name, begin_edit=begin_edit, activate=activate, props=kwargs) + + def batch_new(self, names: Optional[List[AnyStr]] = None, *, df = None, count: Optional[int] = None, begin_edit: Optional[bool] = None, **kwargs: Unpack[FMonitorBatchProperties]) -> FMonitorBatch: + """ + Creates a new batch of FMonitor objects + + Either `names`, `count` or `df` is required. + + :param begin_edit: The argument `begin_edit` indicates if the user want to leave the elements in the edit state, and requires a call to `end_edit()` or equivalent. The default `begin_edit` is set to `None`. With `None`, the behavior will be adjusted according the default of how the batch is created. + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the object. + :param names: When using a list of names, each new object will match the names from this list. `begin_edit` defaults to `True` if no arguments for properties were passed, `False` otherwise. + :param count: When using `count`, new objects will be created with based on a random prefix, with an increasing integer up to `count`. `begin_edit` defaults to `True` if no arguments for properties were passed, `False` otherwise. + :param df: Currently **EXPERIMENTAL AND LIMITED**, tries to get the columns from a dataframe to populate the names and the DSS properties. `begin_edit` defaults to `False`. + :return: 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. + """ + return self._batch_new_aux(names=names, df=df, count=count, begin_edit=begin_edit, props=kwargs) diff --git a/altdss/Fault.py b/altdss/Fault.py index 5774282..a5cd472 100644 --- a/altdss/Fault.py +++ b/altdss/Fault.py @@ -88,9 +88,9 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): bus1=busname bus1=busname.1.2.3 - Bus2 automatically defaults to busname.0,0,0 unless it was previously defined. + Bus2 automatically defaults to busname.0.0.0 unless it was previously defined. - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> str: @@ -105,7 +105,7 @@ def _set_Bus2(self, value: AnyStr, flags: enums.SetterFlags = 0): That is, the Fault defaults to a ground fault unless otherwise specified. - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_Phases(self) -> int: @@ -116,9 +116,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of Phases. Default is 1. + Number of Phases. - DSS property name: `Phases`, DSS property index: 3. + Name: `Phases` + Default: 1 """ def _get_R(self) -> float: @@ -129,9 +130,11 @@ def _set_R(self, value: float, flags: enums.SetterFlags = 0): R = property(_get_R, _set_R) # type: float """ - Resistance, each phase, ohms. Default is 0.0001. Assumed to be Mean value if gaussian random mode.Max value if uniform mode. A Fault is actually a series resistance that defaults to a wye connection to ground on the second terminal. You may reconnect the 2nd terminal to achieve whatever connection. Use the Gmatrix property to specify an arbitrary conductance matrix. + Resistance for each phase. Assumed to be Mean value if gaussian random mode.Max value if uniform mode. A Fault is actually a series resistance that defaults to a wye connection to ground on the second terminal. You may reconnect the 2nd terminal to achieve whatever connection. Use the Gmatrix property to specify an arbitrary conductance matrix. - DSS property name: `R`, DSS property index: 4. + Name: `R` + Units: Ω + Default: 0.0001 """ def _get_pctStdDev(self) -> float: @@ -144,7 +147,8 @@ def _set_pctStdDev(self, value: float, flags: enums.SetterFlags = 0): """ Percent standard deviation in resistance to assume for Monte Carlo fault (MF) solution mode for GAUSSIAN distribution. Default is 0 (no variation from mean). - DSS property name: `%StdDev`, DSS property index: 5. + Name: `%StdDev` + Default: 0.0 """ def _get_GMatrix(self) -> Float64Array: @@ -157,7 +161,7 @@ def _set_GMatrix(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Use this to specify a nodal conductance (G) matrix to represent some arbitrary resistance network. Specify in lower triangle form as usual for DSS matrices. - DSS property name: `GMatrix`, DSS property index: 6. + Name: `GMatrix` """ def _get_OnTime(self) -> float: @@ -168,9 +172,11 @@ def _set_OnTime(self, value: float, flags: enums.SetterFlags = 0): OnTime = property(_get_OnTime, _set_OnTime) # type: float """ - Time (sec) at which the fault is established for time varying simulations. Default is 0.0 (on at the beginning of the simulation) + Time at which the fault is established for time varying simulations. Default is 0 s, on at the beginning of the simulation. - DSS property name: `OnTime`, DSS property index: 7. + Name: `OnTime` + Units: s + Default: 0.0 """ def _get_Temporary(self) -> bool: @@ -181,9 +187,10 @@ def _set_Temporary(self, value: bool, flags: enums.SetterFlags = 0): Temporary = property(_get_Temporary, _set_Temporary) # type: bool """ - {Yes | No} Default is No. Designate whether the fault is temporary. For Time-varying simulations, the fault will be removed if the current through the fault drops below the MINAMPS criteria. + Designate whether the fault is temporary. For Time-varying simulations, the fault will be removed if the current through the fault drops below the MINAMPS criteria. - DSS property name: `Temporary`, DSS property index: 8. + Name: `Temporary` + Default: False """ def _get_MinAmps(self) -> float: @@ -194,9 +201,11 @@ def _set_MinAmps(self, value: float, flags: enums.SetterFlags = 0): MinAmps = property(_get_MinAmps, _set_MinAmps) # type: float """ - Minimum amps that can sustain a temporary fault. Default is 5. + Minimum current that can sustain a temporary fault. - DSS property name: `MinAmps`, DSS property index: 9. + Name: `MinAmps` + Units: A + Default: 5.0 """ def _get_NormAmps(self) -> float: @@ -209,7 +218,7 @@ def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): """ Normal rated current. - DSS property name: `NormAmps`, DSS property index: 10. + Name: `NormAmps` """ def _get_EmergAmps(self) -> float: @@ -220,9 +229,9 @@ def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: float """ - Maximum or emerg current. + Maximum or emergency current rating. - DSS property name: `EmergAmps`, DSS property index: 11. + Name: `EmergAmps` """ def _get_FaultRate(self) -> float: @@ -235,7 +244,8 @@ def _set_FaultRate(self, value: float, flags: enums.SetterFlags = 0): """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 12. + Name: `FaultRate` + Default: 0.0 """ def _get_pctPerm(self) -> float: @@ -248,7 +258,8 @@ def _set_pctPerm(self, value: float, flags: enums.SetterFlags = 0): """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 13. + Name: `pctPerm` + Default: 100.0 """ def _get_Repair(self) -> float: @@ -261,7 +272,8 @@ def _set_Repair(self, value: float, flags: enums.SetterFlags = 0): """ Hours to repair. - DSS property name: `Repair`, DSS property index: 14. + Name: `Repair` + Default: 0.0 """ def _get_BaseFreq(self) -> float: @@ -274,7 +286,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 15. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -285,9 +298,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 16. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -296,7 +310,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 17. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(17, value) @@ -365,9 +381,9 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags bus1=busname bus1=busname.1.2.3 - Bus2 automatically defaults to busname.0,0,0 unless it was previously defined. + Bus2 automatically defaults to busname.0.0.0 unless it was previously defined. - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> List[str]: @@ -382,7 +398,7 @@ def _set_Bus2(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags That is, the Fault defaults to a ground fault unless otherwise specified. - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -393,9 +409,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of Phases. Default is 1. + Number of Phases. - DSS property name: `Phases`, DSS property index: 3. + Name: `Phases` + Default: 1 """ def _get_R(self) -> BatchFloat64ArrayProxy: @@ -406,9 +423,11 @@ def _set_R(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 R = property(_get_R, _set_R) # type: BatchFloat64ArrayProxy """ - Resistance, each phase, ohms. Default is 0.0001. Assumed to be Mean value if gaussian random mode.Max value if uniform mode. A Fault is actually a series resistance that defaults to a wye connection to ground on the second terminal. You may reconnect the 2nd terminal to achieve whatever connection. Use the Gmatrix property to specify an arbitrary conductance matrix. + Resistance for each phase. Assumed to be Mean value if gaussian random mode.Max value if uniform mode. A Fault is actually a series resistance that defaults to a wye connection to ground on the second terminal. You may reconnect the 2nd terminal to achieve whatever connection. Use the Gmatrix property to specify an arbitrary conductance matrix. - DSS property name: `R`, DSS property index: 4. + Name: `R` + Units: Ω + Default: 0.0001 """ def _get_pctStdDev(self) -> BatchFloat64ArrayProxy: @@ -421,7 +440,8 @@ def _set_pctStdDev(self, value: Union[float, Float64Array], flags: enums.SetterF """ Percent standard deviation in resistance to assume for Monte Carlo fault (MF) solution mode for GAUSSIAN distribution. Default is 0 (no variation from mean). - DSS property name: `%StdDev`, DSS property index: 5. + Name: `%StdDev` + Default: 0.0 """ def _get_GMatrix(self) -> List[Float64Array]: @@ -437,7 +457,7 @@ def _set_GMatrix(self, value: Union[Float64Array, List[Float64Array]], flags: en """ Use this to specify a nodal conductance (G) matrix to represent some arbitrary resistance network. Specify in lower triangle form as usual for DSS matrices. - DSS property name: `GMatrix`, DSS property index: 6. + Name: `GMatrix` """ def _get_OnTime(self) -> BatchFloat64ArrayProxy: @@ -448,9 +468,11 @@ def _set_OnTime(self, value: Union[float, Float64Array], flags: enums.SetterFlag OnTime = property(_get_OnTime, _set_OnTime) # type: BatchFloat64ArrayProxy """ - Time (sec) at which the fault is established for time varying simulations. Default is 0.0 (on at the beginning of the simulation) + Time at which the fault is established for time varying simulations. Default is 0 s, on at the beginning of the simulation. - DSS property name: `OnTime`, DSS property index: 7. + Name: `OnTime` + Units: s + Default: 0.0 """ def _get_Temporary(self) -> List[bool]: @@ -458,14 +480,15 @@ def _get_Temporary(self) -> List[bool]: self._get_batch_int32_prop(8) ] - def _set_Temporary(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Temporary(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(8, value, flags) Temporary = property(_get_Temporary, _set_Temporary) # type: List[bool] """ - {Yes | No} Default is No. Designate whether the fault is temporary. For Time-varying simulations, the fault will be removed if the current through the fault drops below the MINAMPS criteria. + Designate whether the fault is temporary. For Time-varying simulations, the fault will be removed if the current through the fault drops below the MINAMPS criteria. - DSS property name: `Temporary`, DSS property index: 8. + Name: `Temporary` + Default: False """ def _get_MinAmps(self) -> BatchFloat64ArrayProxy: @@ -476,9 +499,11 @@ def _set_MinAmps(self, value: Union[float, Float64Array], flags: enums.SetterFla MinAmps = property(_get_MinAmps, _set_MinAmps) # type: BatchFloat64ArrayProxy """ - Minimum amps that can sustain a temporary fault. Default is 5. + Minimum current that can sustain a temporary fault. - DSS property name: `MinAmps`, DSS property index: 9. + Name: `MinAmps` + Units: A + Default: 5.0 """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: @@ -491,7 +516,7 @@ def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Normal rated current. - DSS property name: `NormAmps`, DSS property index: 10. + Name: `NormAmps` """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: @@ -502,9 +527,9 @@ def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterF EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: BatchFloat64ArrayProxy """ - Maximum or emerg current. + Maximum or emergency current rating. - DSS property name: `EmergAmps`, DSS property index: 11. + Name: `EmergAmps` """ def _get_FaultRate(self) -> BatchFloat64ArrayProxy: @@ -517,7 +542,8 @@ def _set_FaultRate(self, value: Union[float, Float64Array], flags: enums.SetterF """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 12. + Name: `FaultRate` + Default: 0.0 """ def _get_pctPerm(self) -> BatchFloat64ArrayProxy: @@ -530,7 +556,8 @@ def _set_pctPerm(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 13. + Name: `pctPerm` + Default: 100.0 """ def _get_Repair(self) -> BatchFloat64ArrayProxy: @@ -543,7 +570,8 @@ def _set_Repair(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Hours to repair. - DSS property name: `Repair`, DSS property index: 14. + Name: `Repair` + Default: 0.0 """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -556,7 +584,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 15. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -564,14 +593,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(16) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(16, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 16. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -580,7 +610,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 17. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(17, value, flags) diff --git a/altdss/Fuse.py b/altdss/Fuse.py index e323195..1baa147 100644 --- a/altdss/Fuse.py +++ b/altdss/Fuse.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -15,7 +15,7 @@ class Fuse(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'Fuse' - _cls_idx = 33 + _cls_idx = 34 _cls_int_idx = { 2, 4, @@ -73,7 +73,7 @@ def _set_MonitoredObj_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the Fuse is connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredObj(self) -> DSSObj: @@ -90,7 +90,7 @@ def _set_MonitoredObj(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFla """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the Fuse is connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredTerm(self) -> int: @@ -101,9 +101,10 @@ def _set_MonitoredTerm(self, value: int, flags: enums.SetterFlags = 0): MonitoredTerm = property(_get_MonitoredTerm, _set_MonitoredTerm) # type: int """ - Number of the terminal of the circuit element to which the Fuse is connected. 1 or 2, typically. Default is 1. + Number of the terminal of the circuit element to which the Fuse is connected. 1 or 2, typically. - DSS property name: `MonitoredTerm`, DSS property index: 2. + Name: `MonitoredTerm` + Default: 1 """ def _get_SwitchedObj_str(self) -> str: @@ -114,9 +115,9 @@ def _set_SwitchedObj_str(self, value: AnyStr, flags: enums.SetterFlags = 0): SwitchedObj_str = property(_get_SwitchedObj_str, _set_SwitchedObj_str) # type: str """ - Name of circuit element switch that the Fuse controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Fuse controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedObj(self) -> DSSObj: @@ -131,9 +132,9 @@ def _set_SwitchedObj(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlag SwitchedObj = property(_get_SwitchedObj, _set_SwitchedObj) # type: DSSObj """ - Name of circuit element switch that the Fuse controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Fuse controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedTerm(self) -> int: @@ -146,7 +147,8 @@ def _set_SwitchedTerm(self, value: int, flags: enums.SetterFlags = 0): """ Number of the terminal of the controlled element in which the switch is controlled by the Fuse. 1 or 2, typically. Default is 1. Assumes all phases of the element have a fuse of this type. - DSS property name: `SwitchedTerm`, DSS property index: 4. + Name: `SwitchedTerm` + Default: 1 """ def _get_FuseCurve_str(self) -> str: @@ -159,7 +161,8 @@ def _set_FuseCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of the TCC Curve object that determines the fuse blowing. Must have been previously defined as a TCC_Curve object. Default is "Tlink". Multiplying the current values in the curve by the "RatedCurrent" value gives the actual current. - DSS property name: `FuseCurve`, DSS property index: 5. + Name: `FuseCurve` + Default: tlink """ def _get_FuseCurve(self) -> TCC_Curve: @@ -176,7 +179,8 @@ def _set_FuseCurve(self, value: Union[AnyStr, TCC_Curve], flags: enums.SetterFla """ Name of the TCC Curve object that determines the fuse blowing. Must have been previously defined as a TCC_Curve object. Default is "Tlink". Multiplying the current values in the curve by the "RatedCurrent" value gives the actual current. - DSS property name: `FuseCurve`, DSS property index: 5. + Name: `FuseCurve` + Default: tlink """ def _get_RatedCurrent(self) -> float: @@ -187,9 +191,10 @@ def _set_RatedCurrent(self, value: float, flags: enums.SetterFlags = 0): RatedCurrent = property(_get_RatedCurrent, _set_RatedCurrent) # type: float """ - Multiplier or actual phase amps for the phase TCC curve. Defaults to 1.0. + Multiplier or actual phase amps for the phase TCC curve. - DSS property name: `RatedCurrent`, DSS property index: 6. + Name: `RatedCurrent` + Default: 1.0 """ def _get_Delay(self) -> float: @@ -200,16 +205,20 @@ def _set_Delay(self, value: float, flags: enums.SetterFlags = 0): Delay = property(_get_Delay, _set_Delay) # type: float """ - Fixed delay time (sec) added to Fuse blowing time determined from the TCC curve. Default is 0.0. Used to represent fuse clearing time or any other delay. + Fixed delay time added to Fuse blowing time determined from the TCC curve. Used to represent fuse clearing time or any other delay. - DSS property name: `Delay`, DSS property index: 7. + Name: `Delay` + Units: s + Default: 0.0 """ def Action(self, value: Union[AnyStr, int, enums.FuseAction], flags: enums.SetterFlags = 0): """ - DEPRECATED. See "State" property. + DEPRECATED. See `State` property. - DSS property name: `Action`, DSS property index: 8. + **Deprecated:** Use "State" property instead. + + Name: `Action` """ if isinstance(value, int): self._lib.Obj_SetInt32(self._ptr, 8, value, flags) @@ -217,18 +226,37 @@ def Action(self, value: Union[AnyStr, int, enums.FuseAction], flags: enums.Sette self._set_string_o(8, value) + def Close(self, flags: enums.SetterFlags = 0): + '''Shortcut to Action(FuseAction.Close)''' + self._lib.Obj_SetInt32(self._ptr, 8, enums.FuseAction.Close, flags) + + def Open(self, flags: enums.SetterFlags = 0): + '''Shortcut to Action(FuseAction.Open)''' + self._lib.Obj_SetInt32(self._ptr, 8, enums.FuseAction.Open, flags) + def close(self, flags: enums.SetterFlags = 0): - '''Shortcut to Action(FuseAction.close)''' - self._lib.Obj_SetInt32(self._ptr, 8, enums.FuseAction.close, flags) + '''Shortcut to Action(FuseAction.Close)''' + warnings.warn('Deprecated: use "Close" instead.', DeprecationWarning, stacklevel=2) + self._lib.Obj_SetInt32(self._ptr, 8, enums.FuseAction.Close, flags) def open(self, flags: enums.SetterFlags = 0): - '''Shortcut to Action(FuseAction.open)''' - self._lib.Obj_SetInt32(self._ptr, 8, enums.FuseAction.open, flags) + '''Shortcut to Action(FuseAction.Open)''' + warnings.warn('Deprecated: use "Open" instead.', DeprecationWarning, stacklevel=2) + self._lib.Obj_SetInt32(self._ptr, 8, enums.FuseAction.Open, flags) def _get_Normal(self) -> List[enums.FuseState]: return [enums.FuseState(val) for val in self._get_int32_list(self._lib.Obj_GetInt32Array, self._ptr, 9)] - def _set_Normal(self, value: Union[List[Union[int, enums.FuseState]], List[AnyStr]], flags: enums.SetterFlags = 0): + def _set_Normal(self, value: Union[List[Union[int, enums.FuseState]], List[AnyStr], int, enums.FuseState, AnyStr], flags: enums.SetterFlags = 0): + flags |= enums.SetterFlags.Broadcast + if isinstance(value, (str, bytes)): + self._set_string_o(9, value, flags) + return + + if isinstance(value, int): + self._lib.Obj_SetInt32(self._ptr, 9, value, flags) + return + if len(value) and not isinstance(value[0], int): self._set_string_array_o(9, value, flags) return @@ -236,28 +264,37 @@ def _set_Normal(self, value: Union[List[Union[int, enums.FuseState]], List[AnySt Normal = property(_get_Normal, _set_Normal) # type: enums.FuseState """ - ARRAY of strings {Open | Closed} representing the Normal state of the fuse in each phase of the controlled element. The fuse reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. + ARRAY of strings {Open | Closed} representing the Normal state of the fuse in each phase of the controlled element. The fuse reverts to this state for reset, change of mode, etc. Defaults to `State` if not specifically declared. - DSS property name: `Normal`, DSS property index: 9. + Name: `Normal` """ def _get_Normal_str(self) -> List[str]: return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 9) - def _set_Normal_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + def _set_Normal_str(self, value: Union[List[AnyStr], AnyStr], flags: enums.SetterFlags = 0): self._set_Normal(value, flags) Normal_str = property(_get_Normal_str, _set_Normal_str) # type: List[str] """ - ARRAY of strings {Open | Closed} representing the Normal state of the fuse in each phase of the controlled element. The fuse reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. + ARRAY of strings {Open | Closed} representing the Normal state of the fuse in each phase of the controlled element. The fuse reverts to this state for reset, change of mode, etc. Defaults to `State` if not specifically declared. - DSS property name: `Normal`, DSS property index: 9. + Name: `Normal` """ def _get_State(self) -> List[enums.FuseState]: return [enums.FuseState(val) for val in self._get_int32_list(self._lib.Obj_GetInt32Array, self._ptr, 10)] - def _set_State(self, value: Union[List[Union[int, enums.FuseState]], List[AnyStr]], flags: enums.SetterFlags = 0): + def _set_State(self, value: Union[List[Union[int, enums.FuseState]], List[AnyStr], int, enums.FuseState, AnyStr], flags: enums.SetterFlags = 0): + flags |= enums.SetterFlags.Broadcast + if isinstance(value, (str, bytes)): + self._set_string_o(10, value, flags) + return + + if isinstance(value, int): + self._lib.Obj_SetInt32(self._ptr, 10, value, flags) + return + if len(value) and not isinstance(value[0], int): self._set_string_array_o(10, value, flags) return @@ -267,20 +304,22 @@ def _set_State(self, value: Union[List[Union[int, enums.FuseState]], List[AnyStr """ ARRAY of strings {Open | Closed} representing the Actual state of the fuse in each phase of the controlled element. Upon setting, immediately forces state of fuse(s). Simulates manual control on Fuse. Defaults to Closed for all phases. - DSS property name: `State`, DSS property index: 10. + Name: `State` + Default: ['Closed', 'Closed', 'Closed'] """ def _get_State_str(self) -> List[str]: return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 10) - def _set_State_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + def _set_State_str(self, value: Union[List[AnyStr], AnyStr], flags: enums.SetterFlags = 0): self._set_State(value, flags) State_str = property(_get_State_str, _set_State_str) # type: List[str] """ ARRAY of strings {Open | Closed} representing the Actual state of the fuse in each phase of the controlled element. Upon setting, immediately forces state of fuse(s). Simulates manual control on Fuse. Defaults to Closed for all phases. - DSS property name: `State`, DSS property index: 10. + Name: `State` + Default: ['Closed', 'Closed', 'Closed'] """ def _get_BaseFreq(self) -> float: @@ -293,7 +332,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 11. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -304,9 +344,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 12. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -315,7 +356,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 13. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(13, value) @@ -338,7 +381,7 @@ class FuseProperties(TypedDict): class FuseBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'Fuse' _obj_cls = Fuse - _cls_idx = 33 + _cls_idx = 34 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -376,7 +419,7 @@ def _set_MonitoredObj_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the Fuse is connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredObj(self) -> List[DSSObj]: @@ -389,7 +432,7 @@ def _set_MonitoredObj(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSO """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the Fuse is connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredTerm(self) -> BatchInt32ArrayProxy: @@ -400,9 +443,10 @@ def _set_MonitoredTerm(self, value: Union[int, Int32Array], flags: enums.SetterF MonitoredTerm = property(_get_MonitoredTerm, _set_MonitoredTerm) # type: BatchInt32ArrayProxy """ - Number of the terminal of the circuit element to which the Fuse is connected. 1 or 2, typically. Default is 1. + Number of the terminal of the circuit element to which the Fuse is connected. 1 or 2, typically. - DSS property name: `MonitoredTerm`, DSS property index: 2. + Name: `MonitoredTerm` + Default: 1 """ def _get_SwitchedObj_str(self) -> List[str]: @@ -413,9 +457,9 @@ def _set_SwitchedObj_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums. SwitchedObj_str = property(_get_SwitchedObj_str, _set_SwitchedObj_str) # type: List[str] """ - Name of circuit element switch that the Fuse controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Fuse controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedObj(self) -> List[DSSObj]: @@ -426,9 +470,9 @@ def _set_SwitchedObj(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSOb SwitchedObj = property(_get_SwitchedObj, _set_SwitchedObj) # type: List[DSSObj] """ - Name of circuit element switch that the Fuse controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Fuse controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedTerm(self) -> BatchInt32ArrayProxy: @@ -441,7 +485,8 @@ def _set_SwitchedTerm(self, value: Union[int, Int32Array], flags: enums.SetterFl """ Number of the terminal of the controlled element in which the switch is controlled by the Fuse. 1 or 2, typically. Default is 1. Assumes all phases of the element have a fuse of this type. - DSS property name: `SwitchedTerm`, DSS property index: 4. + Name: `SwitchedTerm` + Default: 1 """ def _get_FuseCurve_str(self) -> List[str]: @@ -454,7 +499,8 @@ def _set_FuseCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Se """ Name of the TCC Curve object that determines the fuse blowing. Must have been previously defined as a TCC_Curve object. Default is "Tlink". Multiplying the current values in the curve by the "RatedCurrent" value gives the actual current. - DSS property name: `FuseCurve`, DSS property index: 5. + Name: `FuseCurve` + Default: tlink """ def _get_FuseCurve(self) -> List[TCC_Curve]: @@ -467,7 +513,8 @@ def _set_FuseCurve(self, value: Union[AnyStr, TCC_Curve, List[AnyStr], List[TCC_ """ Name of the TCC Curve object that determines the fuse blowing. Must have been previously defined as a TCC_Curve object. Default is "Tlink". Multiplying the current values in the curve by the "RatedCurrent" value gives the actual current. - DSS property name: `FuseCurve`, DSS property index: 5. + Name: `FuseCurve` + Default: tlink """ def _get_RatedCurrent(self) -> BatchFloat64ArrayProxy: @@ -478,9 +525,10 @@ def _set_RatedCurrent(self, value: Union[float, Float64Array], flags: enums.Sett RatedCurrent = property(_get_RatedCurrent, _set_RatedCurrent) # type: BatchFloat64ArrayProxy """ - Multiplier or actual phase amps for the phase TCC curve. Defaults to 1.0. + Multiplier or actual phase amps for the phase TCC curve. - DSS property name: `RatedCurrent`, DSS property index: 6. + Name: `RatedCurrent` + Default: 1.0 """ def _get_Delay(self) -> BatchFloat64ArrayProxy: @@ -491,29 +539,43 @@ def _set_Delay(self, value: Union[float, Float64Array], flags: enums.SetterFlags Delay = property(_get_Delay, _set_Delay) # type: BatchFloat64ArrayProxy """ - Fixed delay time (sec) added to Fuse blowing time determined from the TCC curve. Default is 0.0. Used to represent fuse clearing time or any other delay. + Fixed delay time added to Fuse blowing time determined from the TCC curve. Used to represent fuse clearing time or any other delay. - DSS property name: `Delay`, DSS property index: 7. + Name: `Delay` + Units: s + Default: 0.0 """ def Action(self, value: Union[AnyStr, int, enums.FuseAction], flags: enums.SetterFlags = 0): """ - DEPRECATED. See "State" property. + DEPRECATED. See `State` property. - DSS property name: `Action`, DSS property index: 8. + **Deprecated:** Use "State" property instead. + + Name: `Action` """ if isinstance(value, (bytes, str)) or (isinstance(value, LIST_LIKE) and len(value) > 0 and isinstance(value[0], (bytes, str))): self._set_batch_string(8, value, flags) else: self._set_batch_int32_array(8, value, flags) + def Close(self, flags: enums.SetterFlags = 0): + '''Shortcut to Action(FuseAction.Close)''' + self._set_batch_int32_array(8, enums.FuseAction.Close, flags) + + def Open(self, flags: enums.SetterFlags = 0): + '''Shortcut to Action(FuseAction.Open)''' + self._set_batch_int32_array(8, enums.FuseAction.Open, flags) + def close(self, flags: enums.SetterFlags = 0): - '''Shortcut to Action(FuseAction.close)''' - self._set_batch_int32_array(8, enums.FuseAction.close, flags) + '''Shortcut to Action(FuseAction.Close)''' + warnings.warn('Deprecated: use "Close" instead.', DeprecationWarning, stacklevel=2) + self._set_batch_int32_array(8, enums.FuseAction.Close, flags) def open(self, flags: enums.SetterFlags = 0): - '''Shortcut to Action(FuseAction.open)''' - self._set_batch_int32_array(8, enums.FuseAction.open, flags) + '''Shortcut to Action(FuseAction.Open)''' + warnings.warn('Deprecated: use "Open" instead.', DeprecationWarning, stacklevel=2) + self._set_batch_int32_array(8, enums.FuseAction.Open, flags) def _get_Normal(self) -> List[Int32Array]: return [ @@ -521,7 +583,12 @@ def _get_Normal(self) -> List[Int32Array]: for x in self._unpack() ] - def _set_Normal(self, value: Union[List[Union[int, enums.FuseState]], List[AnyStr]], flags: enums.SetterFlags = 0): #TODO: list of lists + def _set_Normal(self, value: Union[List[Union[int, enums.FuseState]], List[AnyStr], int, enums.FuseState, AnyStr], flags: enums.SetterFlags = 0): #TODO: list of lists + flags |= enums.SetterFlags.Broadcast + if isinstance(value, (str, bytes)): + self._set_batch_string(9, value, flags) + return + if len(value) and not isinstance(value[0], int): value, value_ptr, value_count = self._prepare_string_array(value) for x in self._unpack(): @@ -534,9 +601,9 @@ def _set_Normal(self, value: Union[List[Union[int, enums.FuseState]], List[AnySt Normal = property(_get_Normal, _set_Normal) # type: List[Int32Array] """ - ARRAY of strings {Open | Closed} representing the Normal state of the fuse in each phase of the controlled element. The fuse reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. + ARRAY of strings {Open | Closed} representing the Normal state of the fuse in each phase of the controlled element. The fuse reverts to this state for reset, change of mode, etc. Defaults to `State` if not specifically declared. - DSS property name: `Normal`, DSS property index: 9. + Name: `Normal` """ def _get_Normal_str(self) -> List[List[str]]: @@ -547,9 +614,9 @@ def _set_Normal_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Normal_str = property(_get_Normal_str, _set_Normal_str) # type: List[List[str]] """ - ARRAY of strings {Open | Closed} representing the Normal state of the fuse in each phase of the controlled element. The fuse reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. + ARRAY of strings {Open | Closed} representing the Normal state of the fuse in each phase of the controlled element. The fuse reverts to this state for reset, change of mode, etc. Defaults to `State` if not specifically declared. - DSS property name: `Normal`, DSS property index: 9. + Name: `Normal` """ def _get_State(self) -> List[Int32Array]: @@ -558,7 +625,12 @@ def _get_State(self) -> List[Int32Array]: for x in self._unpack() ] - def _set_State(self, value: Union[List[Union[int, enums.FuseState]], List[AnyStr]], flags: enums.SetterFlags = 0): #TODO: list of lists + def _set_State(self, value: Union[List[Union[int, enums.FuseState]], List[AnyStr], int, enums.FuseState, AnyStr], flags: enums.SetterFlags = 0): #TODO: list of lists + flags |= enums.SetterFlags.Broadcast + if isinstance(value, (str, bytes)): + self._set_batch_string(10, value, flags) + return + if len(value) and not isinstance(value[0], int): value, value_ptr, value_count = self._prepare_string_array(value) for x in self._unpack(): @@ -573,7 +645,8 @@ def _set_State(self, value: Union[List[Union[int, enums.FuseState]], List[AnyStr """ ARRAY of strings {Open | Closed} representing the Actual state of the fuse in each phase of the controlled element. Upon setting, immediately forces state of fuse(s). Simulates manual control on Fuse. Defaults to Closed for all phases. - DSS property name: `State`, DSS property index: 10. + Name: `State` + Default: ['Closed', 'Closed', 'Closed'] """ def _get_State_str(self) -> List[List[str]]: @@ -586,7 +659,8 @@ def _set_State_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ARRAY of strings {Open | Closed} representing the Actual state of the fuse in each phase of the controlled element. Upon setting, immediately forces state of fuse(s). Simulates manual control on Fuse. Defaults to Closed for all phases. - DSS property name: `State`, DSS property index: 10. + Name: `State` + Default: ['Closed', 'Closed', 'Closed'] """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -599,7 +673,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 11. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -607,14 +682,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(12) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(12, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 12. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -623,7 +699,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 13. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(13, value, flags) @@ -636,8 +714,8 @@ class FuseBatchProperties(TypedDict): RatedCurrent: Union[float, Float64Array] Delay: Union[float, Float64Array] Action: Union[AnyStr, int, enums.FuseAction] - Normal: Union[List[Union[int, enums.FuseState]], List[AnyStr]] - State: Union[List[Union[int, enums.FuseState]], List[AnyStr]] + Normal: Union[List[Union[int, enums.FuseState]], List[AnyStr], int, enums.FuseState, AnyStr] + State: Union[List[Union[int, enums.FuseState]], List[AnyStr], int, enums.FuseState, AnyStr] BaseFreq: Union[float, Float64Array] Enabled: bool Like: AnyStr diff --git a/altdss/GICLine.py b/altdss/GICLine.py index 9b9dc3e..e130575 100644 --- a/altdss/GICLine.py +++ b/altdss/GICLine.py @@ -15,7 +15,7 @@ class GICLine(DSSObj, CircuitElementMixin, PCElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PCElementMixin._extra_slots _cls_name = 'GICLine' - _cls_idx = 44 + _cls_idx = 45 _cls_int_idx = { 6, 18, @@ -91,7 +91,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): bus1=busname bus1=busname.1.2.3 - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> str: @@ -108,7 +108,7 @@ def _set_Bus2(self, value: AnyStr, flags: enums.SetterFlags = 0): No Default; must be specified. - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_Volts(self) -> float: @@ -129,7 +129,8 @@ def _set_Volts(self, value: float, flags: enums.SetterFlags = 0): Not both!! Last one entered will take precedence. Assumed identical in each phase of the Line object. - DSS property name: `Volts`, DSS property index: 3. + Name: `Volts` + Units: V """ def _get_Angle(self) -> float: @@ -140,9 +141,10 @@ def _set_Angle(self, value: float, flags: enums.SetterFlags = 0): Angle = property(_get_Angle, _set_Angle) # type: float """ - Phase angle in degrees of first phase. Default=0.0. See Voltage property + Phase angle in degrees of first phase. See Voltage property - DSS property name: `Angle`, DSS property index: 4. + Name: `Angle` + Default: 0.0 """ def _get_Frequency(self) -> float: @@ -153,9 +155,11 @@ def _set_Frequency(self, value: float, flags: enums.SetterFlags = 0): Frequency = property(_get_Frequency, _set_Frequency) # type: float """ - Source frequency. Defaults to 0.1 Hz. + Source frequency. - DSS property name: `Frequency`, DSS property index: 5. + Name: `Frequency` + Units: Hz + Default: 0.1 """ def _get_Phases(self) -> int: @@ -166,9 +170,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of phases. Defaults to 3. + Number of phases. - DSS property name: `Phases`, DSS property index: 6. + Name: `Phases` + Default: 3 """ def _get_R(self) -> float: @@ -179,9 +184,10 @@ def _set_R(self, value: float, flags: enums.SetterFlags = 0): R = property(_get_R, _set_R) # type: float """ - Resistance of line, ohms of impedance in series with GIC voltage source. + Resistance of line, impedance in series with GIC voltage source. - DSS property name: `R`, DSS property index: 7. + Name: `R` + Units: Ω """ def _get_X(self) -> float: @@ -192,9 +198,11 @@ def _set_X(self, value: float, flags: enums.SetterFlags = 0): X = property(_get_X, _set_X) # type: float """ - Reactance at base frequency, ohms. Default = 0.0. This value is generally not important for GIC studies but may be used if desired. + Reactance at base frequency. This value is generally not important for GIC studies but may be used if desired. - DSS property name: `X`, DSS property index: 8. + Name: `X` + Units: Ω + Default: 0.0 """ def _get_C(self) -> float: @@ -205,9 +213,11 @@ def _set_C(self, value: float, flags: enums.SetterFlags = 0): C = property(_get_C, _set_C) # type: float """ - Value of line blocking capacitance in microfarads. Default = 0.0, implying that there is no line blocking capacitor. + Value of line blocking capacitance. A zero value implies that there is no line blocking capacitor. - DSS property name: `C`, DSS property index: 9. + Name: `C` + Units: μF + Default: 0.0 """ def _get_EN(self) -> float: @@ -218,9 +228,10 @@ def _set_EN(self, value: float, flags: enums.SetterFlags = 0): EN = property(_get_EN, _set_EN) # type: float """ - Northward Electric field (V/km). If specified, Voltage and Angle are computed from EN, EE, lat and lon values. + Northward Electric field. If specified, Voltage and Angle are computed from EN, EE, lat and lon values. - DSS property name: `EN`, DSS property index: 10. + Name: `EN` + Units: V/km """ def _get_EE(self) -> float: @@ -231,9 +242,10 @@ def _set_EE(self, value: float, flags: enums.SetterFlags = 0): EE = property(_get_EE, _set_EE) # type: float """ - Eastward Electric field (V/km). If specified, Voltage and Angle are computed from EN, EE, lat and lon values. + Eastward Electric field. If specified, Voltage and Angle are computed from EN, EE, lat and lon values. - DSS property name: `EE`, DSS property index: 11. + Name: `EE` + Units: V/km """ def _get_Lat1(self) -> float: @@ -244,9 +256,10 @@ def _set_Lat1(self, value: float, flags: enums.SetterFlags = 0): Lat1 = property(_get_Lat1, _set_Lat1) # type: float """ - Latitude of Bus1 (degrees) + Latitude of Bus1 - DSS property name: `Lat1`, DSS property index: 12. + Name: `Lat1` + Units: ° """ def _get_Lon1(self) -> float: @@ -257,9 +270,10 @@ def _set_Lon1(self, value: float, flags: enums.SetterFlags = 0): Lon1 = property(_get_Lon1, _set_Lon1) # type: float """ - Longitude of Bus1 (degrees) + Longitude of Bus1 - DSS property name: `Lon1`, DSS property index: 13. + Name: `Lon1` + Units: ° """ def _get_Lat2(self) -> float: @@ -270,9 +284,10 @@ def _set_Lat2(self, value: float, flags: enums.SetterFlags = 0): Lat2 = property(_get_Lat2, _set_Lat2) # type: float """ - Latitude of Bus2 (degrees) + Latitude of Bus2 - DSS property name: `Lat2`, DSS property index: 14. + Name: `Lat2` + Units: ° """ def _get_Lon2(self) -> float: @@ -283,9 +298,10 @@ def _set_Lon2(self, value: float, flags: enums.SetterFlags = 0): Lon2 = property(_get_Lon2, _set_Lon2) # type: float """ - Longitude of Bus2 (degrees) + Longitude of Bus2 - DSS property name: `Lon2`, DSS property index: 15. + Name: `Lon2` + Units: ° """ def _get_Spectrum_str(self) -> str: @@ -296,9 +312,9 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str """ - Inherited Property for all PCElements. Name of harmonic spectrum for this source. Default is "defaultvsource", which is defined when the DSS starts. + Inherited Property for all PCElements. Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 16. + Name: `Spectrum` """ def _get_Spectrum(self) -> SpectrumObj: @@ -313,9 +329,9 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj """ - Inherited Property for all PCElements. Name of harmonic spectrum for this source. Default is "defaultvsource", which is defined when the DSS starts. + Inherited Property for all PCElements. Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 16. + Name: `Spectrum` """ def _get_BaseFreq(self) -> float: @@ -328,7 +344,7 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Inherited Property for all PCElements. Base frequency for specification of reactance value. - DSS property name: `BaseFreq`, DSS property index: 17. + Name: `BaseFreq` """ def _get_Enabled(self) -> bool: @@ -339,9 +355,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 18. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -350,7 +367,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 19. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(19, value) @@ -379,7 +398,7 @@ class GICLineProperties(TypedDict): class GICLineBatch(DSSBatch, CircuitElementBatchMixin, PCElementBatchMixin): _cls_name = 'GICLine' _obj_cls = GICLine - _cls_idx = 44 + _cls_idx = 45 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -420,7 +439,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags bus1=busname bus1=busname.1.2.3 - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> List[str]: @@ -437,7 +456,7 @@ def _set_Bus2(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags No Default; must be specified. - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_Volts(self) -> BatchFloat64ArrayProxy: @@ -458,7 +477,8 @@ def _set_Volts(self, value: Union[float, Float64Array], flags: enums.SetterFlags Not both!! Last one entered will take precedence. Assumed identical in each phase of the Line object. - DSS property name: `Volts`, DSS property index: 3. + Name: `Volts` + Units: V """ def _get_Angle(self) -> BatchFloat64ArrayProxy: @@ -469,9 +489,10 @@ def _set_Angle(self, value: Union[float, Float64Array], flags: enums.SetterFlags Angle = property(_get_Angle, _set_Angle) # type: BatchFloat64ArrayProxy """ - Phase angle in degrees of first phase. Default=0.0. See Voltage property + Phase angle in degrees of first phase. See Voltage property - DSS property name: `Angle`, DSS property index: 4. + Name: `Angle` + Default: 0.0 """ def _get_Frequency(self) -> BatchFloat64ArrayProxy: @@ -482,9 +503,11 @@ def _set_Frequency(self, value: Union[float, Float64Array], flags: enums.SetterF Frequency = property(_get_Frequency, _set_Frequency) # type: BatchFloat64ArrayProxy """ - Source frequency. Defaults to 0.1 Hz. + Source frequency. - DSS property name: `Frequency`, DSS property index: 5. + Name: `Frequency` + Units: Hz + Default: 0.1 """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -495,9 +518,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of phases. Defaults to 3. + Number of phases. - DSS property name: `Phases`, DSS property index: 6. + Name: `Phases` + Default: 3 """ def _get_R(self) -> BatchFloat64ArrayProxy: @@ -508,9 +532,10 @@ def _set_R(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 R = property(_get_R, _set_R) # type: BatchFloat64ArrayProxy """ - Resistance of line, ohms of impedance in series with GIC voltage source. + Resistance of line, impedance in series with GIC voltage source. - DSS property name: `R`, DSS property index: 7. + Name: `R` + Units: Ω """ def _get_X(self) -> BatchFloat64ArrayProxy: @@ -521,9 +546,11 @@ def _set_X(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 X = property(_get_X, _set_X) # type: BatchFloat64ArrayProxy """ - Reactance at base frequency, ohms. Default = 0.0. This value is generally not important for GIC studies but may be used if desired. + Reactance at base frequency. This value is generally not important for GIC studies but may be used if desired. - DSS property name: `X`, DSS property index: 8. + Name: `X` + Units: Ω + Default: 0.0 """ def _get_C(self) -> BatchFloat64ArrayProxy: @@ -534,9 +561,11 @@ def _set_C(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 C = property(_get_C, _set_C) # type: BatchFloat64ArrayProxy """ - Value of line blocking capacitance in microfarads. Default = 0.0, implying that there is no line blocking capacitor. + Value of line blocking capacitance. A zero value implies that there is no line blocking capacitor. - DSS property name: `C`, DSS property index: 9. + Name: `C` + Units: μF + Default: 0.0 """ def _get_EN(self) -> BatchFloat64ArrayProxy: @@ -547,9 +576,10 @@ def _set_EN(self, value: Union[float, Float64Array], flags: enums.SetterFlags = EN = property(_get_EN, _set_EN) # type: BatchFloat64ArrayProxy """ - Northward Electric field (V/km). If specified, Voltage and Angle are computed from EN, EE, lat and lon values. + Northward Electric field. If specified, Voltage and Angle are computed from EN, EE, lat and lon values. - DSS property name: `EN`, DSS property index: 10. + Name: `EN` + Units: V/km """ def _get_EE(self) -> BatchFloat64ArrayProxy: @@ -560,9 +590,10 @@ def _set_EE(self, value: Union[float, Float64Array], flags: enums.SetterFlags = EE = property(_get_EE, _set_EE) # type: BatchFloat64ArrayProxy """ - Eastward Electric field (V/km). If specified, Voltage and Angle are computed from EN, EE, lat and lon values. + Eastward Electric field. If specified, Voltage and Angle are computed from EN, EE, lat and lon values. - DSS property name: `EE`, DSS property index: 11. + Name: `EE` + Units: V/km """ def _get_Lat1(self) -> BatchFloat64ArrayProxy: @@ -573,9 +604,10 @@ def _set_Lat1(self, value: Union[float, Float64Array], flags: enums.SetterFlags Lat1 = property(_get_Lat1, _set_Lat1) # type: BatchFloat64ArrayProxy """ - Latitude of Bus1 (degrees) + Latitude of Bus1 - DSS property name: `Lat1`, DSS property index: 12. + Name: `Lat1` + Units: ° """ def _get_Lon1(self) -> BatchFloat64ArrayProxy: @@ -586,9 +618,10 @@ def _set_Lon1(self, value: Union[float, Float64Array], flags: enums.SetterFlags Lon1 = property(_get_Lon1, _set_Lon1) # type: BatchFloat64ArrayProxy """ - Longitude of Bus1 (degrees) + Longitude of Bus1 - DSS property name: `Lon1`, DSS property index: 13. + Name: `Lon1` + Units: ° """ def _get_Lat2(self) -> BatchFloat64ArrayProxy: @@ -599,9 +632,10 @@ def _set_Lat2(self, value: Union[float, Float64Array], flags: enums.SetterFlags Lat2 = property(_get_Lat2, _set_Lat2) # type: BatchFloat64ArrayProxy """ - Latitude of Bus2 (degrees) + Latitude of Bus2 - DSS property name: `Lat2`, DSS property index: 14. + Name: `Lat2` + Units: ° """ def _get_Lon2(self) -> BatchFloat64ArrayProxy: @@ -612,9 +646,10 @@ def _set_Lon2(self, value: Union[float, Float64Array], flags: enums.SetterFlags Lon2 = property(_get_Lon2, _set_Lon2) # type: BatchFloat64ArrayProxy """ - Longitude of Bus2 (degrees) + Longitude of Bus2 - DSS property name: `Lon2`, DSS property index: 15. + Name: `Lon2` + Units: ° """ def _get_Spectrum_str(self) -> List[str]: @@ -625,9 +660,9 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] """ - Inherited Property for all PCElements. Name of harmonic spectrum for this source. Default is "defaultvsource", which is defined when the DSS starts. + Inherited Property for all PCElements. Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 16. + Name: `Spectrum` """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -638,9 +673,9 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] """ - Inherited Property for all PCElements. Name of harmonic spectrum for this source. Default is "defaultvsource", which is defined when the DSS starts. + Inherited Property for all PCElements. Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 16. + Name: `Spectrum` """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -653,7 +688,7 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Inherited Property for all PCElements. Base frequency for specification of reactance value. - DSS property name: `BaseFreq`, DSS property index: 17. + Name: `BaseFreq` """ def _get_Enabled(self) -> List[bool]: @@ -661,14 +696,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(18) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(18, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 18. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -677,7 +713,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 19. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(19, value, flags) diff --git a/altdss/GICTransformer.py b/altdss/GICTransformer.py index 52c4012..66fe01b 100644 --- a/altdss/GICTransformer.py +++ b/altdss/GICTransformer.py @@ -16,7 +16,7 @@ class GICTransformer(DSSObj, CircuitElementMixin, PDElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PDElementMixin._extra_slots _cls_name = 'GICTransformer' - _cls_idx = 45 + _cls_idx = 46 _cls_int_idx = { 5, 6, @@ -100,7 +100,7 @@ def _set_BusH(self, value: AnyStr, flags: enums.SetterFlags = 0): BusH=busname BusH=busname.1.2.3 - DSS property name: `BusH`, DSS property index: 1. + Name: `BusH` """ def _get_BusNH(self) -> str: @@ -113,7 +113,7 @@ def _set_BusNH(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of Neutral bus for H, or first, winding. Defaults to all phases connected to H-side bus, node 0, if not specified and transformer type is either GSU or YY. (Shunt Wye Connection to ground reference)For Auto, this is automatically set to the X bus. - DSS property name: `BusNH`, DSS property index: 2. + Name: `BusNH` """ def _get_BusX(self) -> str: @@ -126,7 +126,7 @@ def _set_BusX(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of Low-side(X) bus, if type=Auto or YY. - DSS property name: `BusX`, DSS property index: 3. + Name: `BusX` """ def _get_BusNX(self) -> str: @@ -139,7 +139,7 @@ def _set_BusNX(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of Neutral bus for X, or Second, winding. Defaults to all phases connected to X-side bus, node 0, if not specified. (Shunt Wye Connection to ground reference) - DSS property name: `BusNX`, DSS property index: 4. + Name: `BusNX` """ def _get_Phases(self) -> int: @@ -150,9 +150,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of Phases. Default is 3. + Number of Phases. - DSS property name: `Phases`, DSS property index: 5. + Name: `Phases` + Default: 3 """ def _get_Type(self) -> enums.GICTransformerType: @@ -166,9 +167,10 @@ def _set_Type(self, value: Union[AnyStr, int, enums.GICTransformerType], flags: Type = property(_get_Type, _set_Type) # type: enums.GICTransformerType """ - Type of transformer: {GSU* | Auto | YY}. Default is GSU. + Type of transformer. - DSS property name: `Type`, DSS property index: 6. + Name: `Type` + Default: GSU """ def _get_Type_str(self) -> str: @@ -179,9 +181,10 @@ def _set_Type_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Type_str = property(_get_Type_str, _set_Type_str) # type: str """ - Type of transformer: {GSU* | Auto | YY}. Default is GSU. + Type of transformer. - DSS property name: `Type`, DSS property index: 6. + Name: `Type` + Default: GSU """ def _get_R1(self) -> float: @@ -192,9 +195,11 @@ def _set_R1(self, value: float, flags: enums.SetterFlags = 0): R1 = property(_get_R1, _set_R1) # type: float """ - Resistance, each phase, ohms for H winding, (Series winding, if Auto). Default is 0.0001. If + Resistance, each phase, for H winding, (Series winding, if Auto). - DSS property name: `R1`, DSS property index: 7. + Name: `R1` + Units: Ω + Default: 5.0 """ def _get_R2(self) -> float: @@ -205,9 +210,11 @@ def _set_R2(self, value: float, flags: enums.SetterFlags = 0): R2 = property(_get_R2, _set_R2) # type: float """ - Resistance, each phase, ohms for X winding, (Common winding, if Auto). Default is 0.0001. + Resistance, each phase, ohms for X winding, (Common winding, if Auto). - DSS property name: `R2`, DSS property index: 8. + Name: `R2` + Units: Ω + Default: 0.38088000000000005 """ def _get_kVLL1(self) -> float: @@ -218,9 +225,11 @@ def _set_kVLL1(self, value: float, flags: enums.SetterFlags = 0): kVLL1 = property(_get_kVLL1, _set_kVLL1) # type: float """ - Optional. kV LL rating for H winding (winding 1). Default is 500. Required if you are going to export vars for power flow analysis or enter winding resistances in percent. + Optional. Voltage LL rating for H winding (winding 1). Required if you are going to export vars for power flow analysis or enter winding resistances in percent. - DSS property name: `kVLL1`, DSS property index: 9. + Name: `kVLL1` + Units: kV + Default: 500.0 """ def _get_kVLL2(self) -> float: @@ -231,9 +240,11 @@ def _set_kVLL2(self, value: float, flags: enums.SetterFlags = 0): kVLL2 = property(_get_kVLL2, _set_kVLL2) # type: float """ - Optional. kV LL rating for X winding (winding 2). Default is 138. Required if you are going to export vars for power flow analysis or enter winding resistances in percent.. + Optional. Voltage LL rating for X winding (winding 2). Required if you are going to export vars for power flow analysis or enter winding resistances in percent.. - DSS property name: `kVLL2`, DSS property index: 10. + Name: `kVLL2` + Units: kV + Default: 138.0 """ def _get_MVA(self) -> float: @@ -244,9 +255,11 @@ def _set_MVA(self, value: float, flags: enums.SetterFlags = 0): MVA = property(_get_MVA, _set_MVA) # type: float """ - Optional. MVA Rating assumed Transformer. Default is 100. Used for computing vars due to GIC and winding resistances if kV and MVA ratings are specified. + Optional. MVA Rating assumed Transformer. Used for computing vars due to GIC and winding resistances if kV and MVA ratings are specified. - DSS property name: `MVA`, DSS property index: 11. + Name: `MVA` + Units: MVA + Default: 100.0 """ def _get_VarCurve_str(self) -> str: @@ -259,7 +272,7 @@ def _set_VarCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Optional. XYCurve object name. Curve is expected as TOTAL pu vars vs pu GIC amps/phase. Vars are in pu of the MVA property. No Default value. Required only if you are going to export vars for power flow analysis. See K property. - DSS property name: `VarCurve`, DSS property index: 12. + Name: `VarCurve` """ def _get_VarCurve(self) -> XYcurve: @@ -276,7 +289,7 @@ def _set_VarCurve(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags """ Optional. XYCurve object name. Curve is expected as TOTAL pu vars vs pu GIC amps/phase. Vars are in pu of the MVA property. No Default value. Required only if you are going to export vars for power flow analysis. See K property. - DSS property name: `VarCurve`, DSS property index: 12. + Name: `VarCurve` """ def _get_pctR1(self) -> float: @@ -287,11 +300,11 @@ def _set_pctR1(self, value: float, flags: enums.SetterFlags = 0): pctR1 = property(_get_pctR1, _set_pctR1) # type: float """ - Optional. Percent Resistance, each phase, for H winding (1), (Series winding, if Auto). Default is 0.2. + Optional. Percent Resistance, each phase, for H winding (1), (Series winding, if Auto). Alternative way to enter R1 value. It is the actual resistances in ohmns that matter. MVA and kV should be specified. - DSS property name: `%R1`, DSS property index: 13. + Name: `%R1` """ def _get_pctR2(self) -> float: @@ -302,11 +315,11 @@ def _set_pctR2(self, value: float, flags: enums.SetterFlags = 0): pctR2 = property(_get_pctR2, _set_pctR2) # type: float """ - Optional. Percent Resistance, each phase, for X winding (2), (Common winding, if Auto). Default is 0.2. + Optional. Percent Resistance, each phase, for X winding (2), (Common winding, if Auto). Alternative way to enter R2 value. It is the actual resistances in ohms that matter. MVA and kV should be specified. - DSS property name: `%R2`, DSS property index: 14. + Name: `%R2` """ def _get_K(self) -> float: @@ -317,13 +330,14 @@ def _set_K(self, value: float, flags: enums.SetterFlags = 0): K = property(_get_K, _set_K) # type: float """ - Mvar K factor. Default way to convert GIC Amps in H winding (winding 1) to Mvar. Default is 2.2. Commonly-used simple multiplier for estimating Mvar losses for power flow analysis. + Mvar K factor. Default way to convert GIC Amps in H winding (winding 1) to Mvar. Commonly-used simple multiplier for estimating Mvar losses for power flow analysis. - Mvar = K * kvLL * GIC per phase / 1000 + Mvar = K × kvLL × (GIC per phase) / 1000 Mutually exclusive with using the VarCurve property and pu curves.If you specify this (default), VarCurve is ignored. - DSS property name: `K`, DSS property index: 15. + Name: `K` + Default: 2.2 """ def _get_NormAmps(self) -> float: @@ -336,7 +350,8 @@ def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): """ Normal rated current. - DSS property name: `NormAmps`, DSS property index: 16. + Name: `NormAmps` + Default: 0.0 """ def _get_EmergAmps(self) -> float: @@ -347,9 +362,10 @@ def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: float """ - Maximum or emerg current. + Maximum or emergency current rating. - DSS property name: `EmergAmps`, DSS property index: 17. + Name: `EmergAmps` + Default: 0.0 """ def _get_FaultRate(self) -> float: @@ -362,7 +378,8 @@ def _set_FaultRate(self, value: float, flags: enums.SetterFlags = 0): """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 18. + Name: `FaultRate` + Default: 0.0 """ def _get_pctPerm(self) -> float: @@ -375,7 +392,8 @@ def _set_pctPerm(self, value: float, flags: enums.SetterFlags = 0): """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 19. + Name: `pctPerm` + Default: 100.0 """ def _get_Repair(self) -> float: @@ -388,7 +406,8 @@ def _set_Repair(self, value: float, flags: enums.SetterFlags = 0): """ Hours to repair. - DSS property name: `Repair`, DSS property index: 20. + Name: `Repair` + Default: 0.0 """ def _get_BaseFreq(self) -> float: @@ -401,7 +420,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 21. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -412,9 +432,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 22. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -423,7 +444,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 23. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(23, value) @@ -456,7 +479,7 @@ class GICTransformerProperties(TypedDict): class GICTransformerBatch(DSSBatch, CircuitElementBatchMixin, PDElementBatchMixin): _cls_name = 'GICTransformer' _obj_cls = GICTransformer - _cls_idx = 45 + _cls_idx = 46 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -497,7 +520,7 @@ def _set_BusH(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags BusH=busname BusH=busname.1.2.3 - DSS property name: `BusH`, DSS property index: 1. + Name: `BusH` """ def _get_BusNH(self) -> List[str]: @@ -510,7 +533,7 @@ def _set_BusNH(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlag """ Name of Neutral bus for H, or first, winding. Defaults to all phases connected to H-side bus, node 0, if not specified and transformer type is either GSU or YY. (Shunt Wye Connection to ground reference)For Auto, this is automatically set to the X bus. - DSS property name: `BusNH`, DSS property index: 2. + Name: `BusNH` """ def _get_BusX(self) -> List[str]: @@ -523,7 +546,7 @@ def _set_BusX(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Name of Low-side(X) bus, if type=Auto or YY. - DSS property name: `BusX`, DSS property index: 3. + Name: `BusX` """ def _get_BusNX(self) -> List[str]: @@ -536,7 +559,7 @@ def _set_BusNX(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlag """ Name of Neutral bus for X, or Second, winding. Defaults to all phases connected to X-side bus, node 0, if not specified. (Shunt Wye Connection to ground reference) - DSS property name: `BusNX`, DSS property index: 4. + Name: `BusNX` """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -547,9 +570,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of Phases. Default is 3. + Number of Phases. - DSS property name: `Phases`, DSS property index: 5. + Name: `Phases` + Default: 3 """ def _get_Type(self) -> BatchInt32ArrayProxy: @@ -564,9 +588,10 @@ def _set_Type(self, value: Union[AnyStr, int, enums.GICTransformerType, List[Any Type = property(_get_Type, _set_Type) # type: BatchInt32ArrayProxy """ - Type of transformer: {GSU* | Auto | YY}. Default is GSU. + Type of transformer. - DSS property name: `Type`, DSS property index: 6. + Name: `Type` + Default: GSU """ def _get_Type_str(self) -> List[str]: @@ -577,9 +602,10 @@ def _set_Type_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Type_str = property(_get_Type_str, _set_Type_str) # type: List[str] """ - Type of transformer: {GSU* | Auto | YY}. Default is GSU. + Type of transformer. - DSS property name: `Type`, DSS property index: 6. + Name: `Type` + Default: GSU """ def _get_R1(self) -> BatchFloat64ArrayProxy: @@ -590,9 +616,11 @@ def _set_R1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = R1 = property(_get_R1, _set_R1) # type: BatchFloat64ArrayProxy """ - Resistance, each phase, ohms for H winding, (Series winding, if Auto). Default is 0.0001. If + Resistance, each phase, for H winding, (Series winding, if Auto). - DSS property name: `R1`, DSS property index: 7. + Name: `R1` + Units: Ω + Default: 5.0 """ def _get_R2(self) -> BatchFloat64ArrayProxy: @@ -603,9 +631,11 @@ def _set_R2(self, value: Union[float, Float64Array], flags: enums.SetterFlags = R2 = property(_get_R2, _set_R2) # type: BatchFloat64ArrayProxy """ - Resistance, each phase, ohms for X winding, (Common winding, if Auto). Default is 0.0001. + Resistance, each phase, ohms for X winding, (Common winding, if Auto). - DSS property name: `R2`, DSS property index: 8. + Name: `R2` + Units: Ω + Default: 0.38088000000000005 """ def _get_kVLL1(self) -> BatchFloat64ArrayProxy: @@ -616,9 +646,11 @@ def _set_kVLL1(self, value: Union[float, Float64Array], flags: enums.SetterFlags kVLL1 = property(_get_kVLL1, _set_kVLL1) # type: BatchFloat64ArrayProxy """ - Optional. kV LL rating for H winding (winding 1). Default is 500. Required if you are going to export vars for power flow analysis or enter winding resistances in percent. + Optional. Voltage LL rating for H winding (winding 1). Required if you are going to export vars for power flow analysis or enter winding resistances in percent. - DSS property name: `kVLL1`, DSS property index: 9. + Name: `kVLL1` + Units: kV + Default: 500.0 """ def _get_kVLL2(self) -> BatchFloat64ArrayProxy: @@ -629,9 +661,11 @@ def _set_kVLL2(self, value: Union[float, Float64Array], flags: enums.SetterFlags kVLL2 = property(_get_kVLL2, _set_kVLL2) # type: BatchFloat64ArrayProxy """ - Optional. kV LL rating for X winding (winding 2). Default is 138. Required if you are going to export vars for power flow analysis or enter winding resistances in percent.. + Optional. Voltage LL rating for X winding (winding 2). Required if you are going to export vars for power flow analysis or enter winding resistances in percent.. - DSS property name: `kVLL2`, DSS property index: 10. + Name: `kVLL2` + Units: kV + Default: 138.0 """ def _get_MVA(self) -> BatchFloat64ArrayProxy: @@ -642,9 +676,11 @@ def _set_MVA(self, value: Union[float, Float64Array], flags: enums.SetterFlags = MVA = property(_get_MVA, _set_MVA) # type: BatchFloat64ArrayProxy """ - Optional. MVA Rating assumed Transformer. Default is 100. Used for computing vars due to GIC and winding resistances if kV and MVA ratings are specified. + Optional. MVA Rating assumed Transformer. Used for computing vars due to GIC and winding resistances if kV and MVA ratings are specified. - DSS property name: `MVA`, DSS property index: 11. + Name: `MVA` + Units: MVA + Default: 100.0 """ def _get_VarCurve_str(self) -> List[str]: @@ -657,7 +693,7 @@ def _set_VarCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set """ Optional. XYCurve object name. Curve is expected as TOTAL pu vars vs pu GIC amps/phase. Vars are in pu of the MVA property. No Default value. Required only if you are going to export vars for power flow analysis. See K property. - DSS property name: `VarCurve`, DSS property index: 12. + Name: `VarCurve` """ def _get_VarCurve(self) -> List[XYcurve]: @@ -670,7 +706,7 @@ def _set_VarCurve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve """ Optional. XYCurve object name. Curve is expected as TOTAL pu vars vs pu GIC amps/phase. Vars are in pu of the MVA property. No Default value. Required only if you are going to export vars for power flow analysis. See K property. - DSS property name: `VarCurve`, DSS property index: 12. + Name: `VarCurve` """ def _get_pctR1(self) -> BatchFloat64ArrayProxy: @@ -681,11 +717,11 @@ def _set_pctR1(self, value: Union[float, Float64Array], flags: enums.SetterFlags pctR1 = property(_get_pctR1, _set_pctR1) # type: BatchFloat64ArrayProxy """ - Optional. Percent Resistance, each phase, for H winding (1), (Series winding, if Auto). Default is 0.2. + Optional. Percent Resistance, each phase, for H winding (1), (Series winding, if Auto). Alternative way to enter R1 value. It is the actual resistances in ohmns that matter. MVA and kV should be specified. - DSS property name: `%R1`, DSS property index: 13. + Name: `%R1` """ def _get_pctR2(self) -> BatchFloat64ArrayProxy: @@ -696,11 +732,11 @@ def _set_pctR2(self, value: Union[float, Float64Array], flags: enums.SetterFlags pctR2 = property(_get_pctR2, _set_pctR2) # type: BatchFloat64ArrayProxy """ - Optional. Percent Resistance, each phase, for X winding (2), (Common winding, if Auto). Default is 0.2. + Optional. Percent Resistance, each phase, for X winding (2), (Common winding, if Auto). Alternative way to enter R2 value. It is the actual resistances in ohms that matter. MVA and kV should be specified. - DSS property name: `%R2`, DSS property index: 14. + Name: `%R2` """ def _get_K(self) -> BatchFloat64ArrayProxy: @@ -711,13 +747,14 @@ def _set_K(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 K = property(_get_K, _set_K) # type: BatchFloat64ArrayProxy """ - Mvar K factor. Default way to convert GIC Amps in H winding (winding 1) to Mvar. Default is 2.2. Commonly-used simple multiplier for estimating Mvar losses for power flow analysis. + Mvar K factor. Default way to convert GIC Amps in H winding (winding 1) to Mvar. Commonly-used simple multiplier for estimating Mvar losses for power flow analysis. - Mvar = K * kvLL * GIC per phase / 1000 + Mvar = K × kvLL × (GIC per phase) / 1000 Mutually exclusive with using the VarCurve property and pu curves.If you specify this (default), VarCurve is ignored. - DSS property name: `K`, DSS property index: 15. + Name: `K` + Default: 2.2 """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: @@ -730,7 +767,8 @@ def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Normal rated current. - DSS property name: `NormAmps`, DSS property index: 16. + Name: `NormAmps` + Default: 0.0 """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: @@ -741,9 +779,10 @@ def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterF EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: BatchFloat64ArrayProxy """ - Maximum or emerg current. + Maximum or emergency current rating. - DSS property name: `EmergAmps`, DSS property index: 17. + Name: `EmergAmps` + Default: 0.0 """ def _get_FaultRate(self) -> BatchFloat64ArrayProxy: @@ -756,7 +795,8 @@ def _set_FaultRate(self, value: Union[float, Float64Array], flags: enums.SetterF """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 18. + Name: `FaultRate` + Default: 0.0 """ def _get_pctPerm(self) -> BatchFloat64ArrayProxy: @@ -769,7 +809,8 @@ def _set_pctPerm(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 19. + Name: `pctPerm` + Default: 100.0 """ def _get_Repair(self) -> BatchFloat64ArrayProxy: @@ -782,7 +823,8 @@ def _set_Repair(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Hours to repair. - DSS property name: `Repair`, DSS property index: 20. + Name: `Repair` + Default: 0.0 """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -795,7 +837,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 21. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -803,14 +846,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(22) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(22, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 22. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -819,7 +863,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 23. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(23, value, flags) diff --git a/altdss/GICsource.py b/altdss/GICsource.py index 1323c9d..74b7241 100644 --- a/altdss/GICsource.py +++ b/altdss/GICsource.py @@ -15,7 +15,7 @@ class GICsource(DSSObj, CircuitElementMixin, PCElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PCElementMixin._extra_slots _cls_name = 'GICsource' - _cls_idx = 40 + _cls_idx = 41 _cls_int_idx = { 4, 13, @@ -79,7 +79,7 @@ def _set_Volts(self, value: float, flags: enums.SetterFlags = 0): Volts = property(_get_Volts, _set_Volts) # type: float """ - Voltage magnitude, in volts, of the GIC voltage induced across the associated line. When specified, induced voltage is assumed defined by Voltage and Angle properties. + Voltage magnitude of the GIC voltage induced across the associated line. When specified, induced voltage is assumed defined by Voltage and Angle properties. Specify this value @@ -89,7 +89,7 @@ def _set_Volts(self, value: float, flags: enums.SetterFlags = 0): Not both!! Last one entered will take precedence. Assumed identical in each phase of the Line object. - DSS property name: `Volts`, DSS property index: 1. + Name: `Volts` """ def _get_Angle(self) -> float: @@ -100,9 +100,11 @@ def _set_Angle(self, value: float, flags: enums.SetterFlags = 0): Angle = property(_get_Angle, _set_Angle) # type: float """ - Phase angle in degrees of first phase. Default=0.0. See Voltage property + Phase angle of first phase. See Voltage property - DSS property name: `Angle`, DSS property index: 2. + Name: `Angle` + Units: ° + Default: 0.0 """ def _get_Frequency(self) -> float: @@ -113,9 +115,11 @@ def _set_Frequency(self, value: float, flags: enums.SetterFlags = 0): Frequency = property(_get_Frequency, _set_Frequency) # type: float """ - Source frequency. Defaults to 0.1 Hz. So GICSource=0 at power frequency. + Source frequency. Defaults to 0.1 Hz. So GICSource=0 at power frequency. - DSS property name: `Frequency`, DSS property index: 3. + Name: `Frequency` + Units: Hz + Default: 0.1 """ def _get_Phases(self) -> int: @@ -126,9 +130,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of phases. Defaults to 3. All three phases are assumed in phase (zero sequence) + Number of phases. All three phases are assumed in phase (zero sequence) - DSS property name: `Phases`, DSS property index: 4. + Name: `Phases` + Default: 3 """ def _get_EN(self) -> float: @@ -139,9 +144,10 @@ def _set_EN(self, value: float, flags: enums.SetterFlags = 0): EN = property(_get_EN, _set_EN) # type: float """ - Northward Electric field (V/km). If specified, Voltage and Angle are computed from EN, EE, lat and lon values. + Northward Electric field. If specified, Voltage and Angle are computed from EN, EE, lat and lon values. - DSS property name: `EN`, DSS property index: 5. + Name: `EN` + Units: V/km """ def _get_EE(self) -> float: @@ -152,9 +158,10 @@ def _set_EE(self, value: float, flags: enums.SetterFlags = 0): EE = property(_get_EE, _set_EE) # type: float """ - Eastward Electric field (V/km). If specified, Voltage and Angle are computed from EN, EE, lat and lon values. + Eastward Electric field. If specified, Voltage and Angle are computed from EN, EE, lat and lon values. - DSS property name: `EE`, DSS property index: 6. + Name: `EE` + Units: V/km """ def _get_Lat1(self) -> float: @@ -165,9 +172,10 @@ def _set_Lat1(self, value: float, flags: enums.SetterFlags = 0): Lat1 = property(_get_Lat1, _set_Lat1) # type: float """ - Latitude of Bus1 of the line(degrees) + Latitude of Bus1 of the line - DSS property name: `Lat1`, DSS property index: 7. + Name: `Lat1` + Units: ° """ def _get_Lon1(self) -> float: @@ -178,9 +186,10 @@ def _set_Lon1(self, value: float, flags: enums.SetterFlags = 0): Lon1 = property(_get_Lon1, _set_Lon1) # type: float """ - Longitude of Bus1 of the line (degrees) + Longitude of Bus1 of the line - DSS property name: `Lon1`, DSS property index: 8. + Name: `Lon1` + Units: ° """ def _get_Lat2(self) -> float: @@ -191,9 +200,10 @@ def _set_Lat2(self, value: float, flags: enums.SetterFlags = 0): Lat2 = property(_get_Lat2, _set_Lat2) # type: float """ - Latitude of Bus2 of the line (degrees) + Latitude of Bus2 of the line - DSS property name: `Lat2`, DSS property index: 9. + Name: `Lat2` + Units: ° """ def _get_Lon2(self) -> float: @@ -204,9 +214,10 @@ def _set_Lon2(self, value: float, flags: enums.SetterFlags = 0): Lon2 = property(_get_Lon2, _set_Lon2) # type: float """ - Longitude of Bus2 of the line (degrees) + Longitude of Bus2 of the line - DSS property name: `Lon2`, DSS property index: 10. + Name: `Lon2` + Units: ° """ def _get_Spectrum_str(self) -> str: @@ -219,7 +230,7 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Not used. - DSS property name: `Spectrum`, DSS property index: 11. + Name: `Spectrum` """ def _get_Spectrum(self) -> SpectrumObj: @@ -236,7 +247,7 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl """ Not used. - DSS property name: `Spectrum`, DSS property index: 11. + Name: `Spectrum` """ def _get_BaseFreq(self) -> float: @@ -249,7 +260,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Not used. - DSS property name: `BaseFreq`, DSS property index: 12. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -260,9 +272,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 13. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -271,7 +284,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 14. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(14, value) @@ -295,7 +310,7 @@ class GICsourceProperties(TypedDict): class GICsourceBatch(DSSBatch, CircuitElementBatchMixin, PCElementBatchMixin): _cls_name = 'GICsource' _obj_cls = GICsource - _cls_idx = 40 + _cls_idx = 41 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -332,7 +347,7 @@ def _set_Volts(self, value: Union[float, Float64Array], flags: enums.SetterFlags Volts = property(_get_Volts, _set_Volts) # type: BatchFloat64ArrayProxy """ - Voltage magnitude, in volts, of the GIC voltage induced across the associated line. When specified, induced voltage is assumed defined by Voltage and Angle properties. + Voltage magnitude of the GIC voltage induced across the associated line. When specified, induced voltage is assumed defined by Voltage and Angle properties. Specify this value @@ -342,7 +357,7 @@ def _set_Volts(self, value: Union[float, Float64Array], flags: enums.SetterFlags Not both!! Last one entered will take precedence. Assumed identical in each phase of the Line object. - DSS property name: `Volts`, DSS property index: 1. + Name: `Volts` """ def _get_Angle(self) -> BatchFloat64ArrayProxy: @@ -353,9 +368,11 @@ def _set_Angle(self, value: Union[float, Float64Array], flags: enums.SetterFlags Angle = property(_get_Angle, _set_Angle) # type: BatchFloat64ArrayProxy """ - Phase angle in degrees of first phase. Default=0.0. See Voltage property + Phase angle of first phase. See Voltage property - DSS property name: `Angle`, DSS property index: 2. + Name: `Angle` + Units: ° + Default: 0.0 """ def _get_Frequency(self) -> BatchFloat64ArrayProxy: @@ -366,9 +383,11 @@ def _set_Frequency(self, value: Union[float, Float64Array], flags: enums.SetterF Frequency = property(_get_Frequency, _set_Frequency) # type: BatchFloat64ArrayProxy """ - Source frequency. Defaults to 0.1 Hz. So GICSource=0 at power frequency. + Source frequency. Defaults to 0.1 Hz. So GICSource=0 at power frequency. - DSS property name: `Frequency`, DSS property index: 3. + Name: `Frequency` + Units: Hz + Default: 0.1 """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -379,9 +398,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of phases. Defaults to 3. All three phases are assumed in phase (zero sequence) + Number of phases. All three phases are assumed in phase (zero sequence) - DSS property name: `Phases`, DSS property index: 4. + Name: `Phases` + Default: 3 """ def _get_EN(self) -> BatchFloat64ArrayProxy: @@ -392,9 +412,10 @@ def _set_EN(self, value: Union[float, Float64Array], flags: enums.SetterFlags = EN = property(_get_EN, _set_EN) # type: BatchFloat64ArrayProxy """ - Northward Electric field (V/km). If specified, Voltage and Angle are computed from EN, EE, lat and lon values. + Northward Electric field. If specified, Voltage and Angle are computed from EN, EE, lat and lon values. - DSS property name: `EN`, DSS property index: 5. + Name: `EN` + Units: V/km """ def _get_EE(self) -> BatchFloat64ArrayProxy: @@ -405,9 +426,10 @@ def _set_EE(self, value: Union[float, Float64Array], flags: enums.SetterFlags = EE = property(_get_EE, _set_EE) # type: BatchFloat64ArrayProxy """ - Eastward Electric field (V/km). If specified, Voltage and Angle are computed from EN, EE, lat and lon values. + Eastward Electric field. If specified, Voltage and Angle are computed from EN, EE, lat and lon values. - DSS property name: `EE`, DSS property index: 6. + Name: `EE` + Units: V/km """ def _get_Lat1(self) -> BatchFloat64ArrayProxy: @@ -418,9 +440,10 @@ def _set_Lat1(self, value: Union[float, Float64Array], flags: enums.SetterFlags Lat1 = property(_get_Lat1, _set_Lat1) # type: BatchFloat64ArrayProxy """ - Latitude of Bus1 of the line(degrees) + Latitude of Bus1 of the line - DSS property name: `Lat1`, DSS property index: 7. + Name: `Lat1` + Units: ° """ def _get_Lon1(self) -> BatchFloat64ArrayProxy: @@ -431,9 +454,10 @@ def _set_Lon1(self, value: Union[float, Float64Array], flags: enums.SetterFlags Lon1 = property(_get_Lon1, _set_Lon1) # type: BatchFloat64ArrayProxy """ - Longitude of Bus1 of the line (degrees) + Longitude of Bus1 of the line - DSS property name: `Lon1`, DSS property index: 8. + Name: `Lon1` + Units: ° """ def _get_Lat2(self) -> BatchFloat64ArrayProxy: @@ -444,9 +468,10 @@ def _set_Lat2(self, value: Union[float, Float64Array], flags: enums.SetterFlags Lat2 = property(_get_Lat2, _set_Lat2) # type: BatchFloat64ArrayProxy """ - Latitude of Bus2 of the line (degrees) + Latitude of Bus2 of the line - DSS property name: `Lat2`, DSS property index: 9. + Name: `Lat2` + Units: ° """ def _get_Lon2(self) -> BatchFloat64ArrayProxy: @@ -457,9 +482,10 @@ def _set_Lon2(self, value: Union[float, Float64Array], flags: enums.SetterFlags Lon2 = property(_get_Lon2, _set_Lon2) # type: BatchFloat64ArrayProxy """ - Longitude of Bus2 of the line (degrees) + Longitude of Bus2 of the line - DSS property name: `Lon2`, DSS property index: 10. + Name: `Lon2` + Units: ° """ def _get_Spectrum_str(self) -> List[str]: @@ -472,7 +498,7 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set """ Not used. - DSS property name: `Spectrum`, DSS property index: 11. + Name: `Spectrum` """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -485,7 +511,7 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe """ Not used. - DSS property name: `Spectrum`, DSS property index: 11. + Name: `Spectrum` """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -498,7 +524,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Not used. - DSS property name: `BaseFreq`, DSS property index: 12. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -506,14 +533,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(13) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(13, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 13. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -522,7 +550,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 14. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(14, value, flags) diff --git a/altdss/GenDispatcher.py b/altdss/GenDispatcher.py index cfca59c..e3cac1b 100644 --- a/altdss/GenDispatcher.py +++ b/altdss/GenDispatcher.py @@ -13,7 +13,7 @@ class GenDispatcher(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'GenDispatcher' - _cls_idx = 28 + _cls_idx = 29 _cls_int_idx = { 2, 9, @@ -68,7 +68,7 @@ def _set_Element_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; must be specified. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Element(self) -> DSSObj: @@ -85,7 +85,7 @@ def _set_Element(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlags = """ Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; must be specified. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Terminal(self) -> int: @@ -96,9 +96,10 @@ def _set_Terminal(self, value: int, flags: enums.SetterFlags = 0): Terminal = property(_get_Terminal, _set_Terminal) # type: int """ - Number of the terminal of the circuit element to which the GenDispatcher control is connected. 1 or 2, typically. Default is 1. Make sure you have the direction on the power matching the sign of kWLimit. + Number of the terminal of the circuit element to which the GenDispatcher control is connected. 1 or 2, typically. Make sure you have the direction on the power matching the sign of kWLimit. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_kWLimit(self) -> float: @@ -111,7 +112,8 @@ def _set_kWLimit(self, value: float, flags: enums.SetterFlags = 0): """ kW Limit for the monitored element. The generators are dispatched to hold the power in band. - DSS property name: `kWLimit`, DSS property index: 3. + Name: `kWLimit` + Default: 8000.0 """ def _get_kWBand(self) -> float: @@ -124,7 +126,8 @@ def _set_kWBand(self, value: float, flags: enums.SetterFlags = 0): """ Bandwidth (kW) of the dead band around the target limit.No dispatch changes are attempted if the power in the monitored terminal stays within this band. - DSS property name: `kWBand`, DSS property index: 4. + Name: `kWBand` + Default: 100.0 """ def _get_kvarLimit(self) -> float: @@ -137,7 +140,8 @@ def _set_kvarLimit(self, value: float, flags: enums.SetterFlags = 0): """ Max kvar to be delivered through the element. Uses same dead band as kW. - DSS property name: `kvarLimit`, DSS property index: 5. + Name: `kvarLimit` + Default: 4000.0 """ def _get_GenList(self) -> List[str]: @@ -152,7 +156,7 @@ def _set_GenList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Array list of generators to be dispatched. If not specified, all generators in the circuit are assumed dispatchable. - DSS property name: `GenList`, DSS property index: 6. + Name: `GenList` """ def _get_Weights(self) -> Float64Array: @@ -163,9 +167,9 @@ def _set_Weights(self, value: Float64Array, flags: enums.SetterFlags = 0): Weights = property(_get_Weights, _set_Weights) # type: Float64Array """ - Array of proportional weights corresponding to each generator in the GenList. The needed kW to get back to center band is dispatched to each generator according to these weights. Default is to set all weights to 1.0. + Array of proportional weights corresponding to each generator in the GenList. The needed kW to get back to center band is dispatched to each generator according to these weights. - DSS property name: `Weights`, DSS property index: 7. + Name: `Weights` """ def _get_BaseFreq(self) -> float: @@ -178,7 +182,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 8. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -189,9 +194,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 9. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -200,7 +206,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 10. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(10, value) @@ -220,7 +228,7 @@ class GenDispatcherProperties(TypedDict): class GenDispatcherBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'GenDispatcher' _obj_cls = GenDispatcher - _cls_idx = 28 + _cls_idx = 29 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -258,7 +266,7 @@ def _set_Element_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett """ Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; must be specified. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Element(self) -> List[DSSObj]: @@ -271,7 +279,7 @@ def _set_Element(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSObj]], """ Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; must be specified. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Terminal(self) -> BatchInt32ArrayProxy: @@ -282,9 +290,10 @@ def _set_Terminal(self, value: Union[int, Int32Array], flags: enums.SetterFlags Terminal = property(_get_Terminal, _set_Terminal) # type: BatchInt32ArrayProxy """ - Number of the terminal of the circuit element to which the GenDispatcher control is connected. 1 or 2, typically. Default is 1. Make sure you have the direction on the power matching the sign of kWLimit. + Number of the terminal of the circuit element to which the GenDispatcher control is connected. 1 or 2, typically. Make sure you have the direction on the power matching the sign of kWLimit. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_kWLimit(self) -> BatchFloat64ArrayProxy: @@ -297,7 +306,8 @@ def _set_kWLimit(self, value: Union[float, Float64Array], flags: enums.SetterFla """ kW Limit for the monitored element. The generators are dispatched to hold the power in band. - DSS property name: `kWLimit`, DSS property index: 3. + Name: `kWLimit` + Default: 8000.0 """ def _get_kWBand(self) -> BatchFloat64ArrayProxy: @@ -310,7 +320,8 @@ def _set_kWBand(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Bandwidth (kW) of the dead band around the target limit.No dispatch changes are attempted if the power in the monitored terminal stays within this band. - DSS property name: `kWBand`, DSS property index: 4. + Name: `kWBand` + Default: 100.0 """ def _get_kvarLimit(self) -> BatchFloat64ArrayProxy: @@ -323,7 +334,8 @@ def _set_kvarLimit(self, value: Union[float, Float64Array], flags: enums.SetterF """ Max kvar to be delivered through the element. Uses same dead band as kW. - DSS property name: `kvarLimit`, DSS property index: 5. + Name: `kvarLimit` + Default: 4000.0 """ def _get_GenList(self) -> List[List[str]]: @@ -340,7 +352,7 @@ def _set_GenList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Array list of generators to be dispatched. If not specified, all generators in the circuit are assumed dispatchable. - DSS property name: `GenList`, DSS property index: 6. + Name: `GenList` """ def _get_Weights(self) -> List[Float64Array]: @@ -354,9 +366,9 @@ def _set_Weights(self, value: Union[Float64Array, List[Float64Array]], flags: en Weights = property(_get_Weights, _set_Weights) # type: List[Float64Array] """ - Array of proportional weights corresponding to each generator in the GenList. The needed kW to get back to center band is dispatched to each generator according to these weights. Default is to set all weights to 1.0. + Array of proportional weights corresponding to each generator in the GenList. The needed kW to get back to center band is dispatched to each generator according to these weights. - DSS property name: `Weights`, DSS property index: 7. + Name: `Weights` """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -369,7 +381,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 8. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -377,14 +390,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(9) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(9, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 9. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -393,7 +407,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 10. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(10, value, flags) diff --git a/altdss/Generator.py b/altdss/Generator.py index a9fa2b7..9d2b732 100644 --- a/altdss/Generator.py +++ b/altdss/Generator.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -145,7 +145,8 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): """ Number of Phases, this Generator. Power is evenly divided among phases. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Bus1(self) -> str: @@ -158,7 +159,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Bus to which the Generator is connected. May include specific node specification. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kV(self) -> float: @@ -171,7 +172,9 @@ def _set_kV(self, value: float, flags: enums.SetterFlags = 0): """ Nominal rated (1.0 per unit) voltage, kV, for Generator. For 2- and 3-phase Generators, specify phase-phase kV. Otherwise, for phases=1 or phases>3, specify actual kV across each branch of the Generator. If wye (star), specify phase-neutral kV. If delta or phase-phase connected, specify phase-phase kV. - DSS property name: `kV`, DSS property index: 3. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_kW(self) -> float: @@ -185,7 +188,9 @@ def _set_kW(self, value: float, flags: enums.SetterFlags = 0): Total base kW for the Generator. A positive value denotes power coming OUT of the element, which is the opposite of a load. This value is modified depending on the dispatch mode. Unaffected by the global load multiplier and growth curves. If you want there to be more generation, you must add more generators or change this value. - DSS property name: `kW`, DSS property index: 4. + Name: `kW` + Units: kW + Default: 1000.0 """ def _get_PF(self) -> float: @@ -196,12 +201,13 @@ def _set_PF(self, value: float, flags: enums.SetterFlags = 0): PF = property(_get_PF, _set_PF) # type: float """ - Generator power factor. Default is 0.80. Enter negative for leading powerfactor (when kW and kvar have opposite signs.) + Generator power factor. Enter negative for leading powerfactor (when kW and kvar have opposite signs.) A positive power factor for a generator signifies that the generator produces vars as is typical for a synchronous generator. Induction machines would be specified with a negative power factor. - DSS property name: `PF`, DSS property index: 5. + Name: `PF` + Default: 0.88 """ def _get_kvar(self) -> float: @@ -214,7 +220,8 @@ def _set_kvar(self, value: float, flags: enums.SetterFlags = 0): """ Specify the base kvar. Alternative to specifying the power factor. Side effect: the power factor value is altered to agree based on present value of kW. - DSS property name: `kvar`, DSS property index: 6. + Name: `kvar` + Units: kvar """ def _get_Model(self) -> enums.GeneratorModel: @@ -227,15 +234,16 @@ def _set_Model(self, value: Union[int, enums.GeneratorModel], flags: enums.Sette """ Integer code for the model to use for generation variation with voltage. Valid values are: - 1:Generator injects a constant kW at specified power factor. - 2:Generator is modeled as a constant admittance. - 3:Const kW, constant kV. Somewhat like a conventional transmission power flow P-V generator. - 4:Const kW, Fixed Q (Q never varies) - 5:Const kW, Fixed Q(as a constant reactance) - 6:Compute load injection from User-written Model.(see usage of Xd, Xdp) - 7:Constant kW, kvar, but current-limited below Vminpu. Approximates a simple inverter. See also Balanced. + - 1: Generator injects a constant kW at specified power factor. + - 2: Generator is modeled as a constant admittance. + - 3: Const kW, constant kV. Somewhat like a conventional transmission power flow P-V generator. + - 4: Const kW, Fixed Q (Q never varies) + - 5: Const kW, Fixed Q(as a constant reactance) + - 6: Compute load injection from User-written Model.(see usage of Xd, Xdp) + - 7: Constant kW, kvar, but current-limited below Vminpu. Approximates a simple inverter. See also Balanced. - DSS property name: `Model`, DSS property index: 7. + Name: `Model` + Default: 1 """ def _get_VMinpu(self) -> float: @@ -246,9 +254,10 @@ def _set_VMinpu(self, value: float, flags: enums.SetterFlags = 0): VMinpu = property(_get_VMinpu, _set_VMinpu) # type: float """ - Default = 0.90. Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model. For model 7, the current is limited to the value computed for constant power at Vminpu. + Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model. For model 7, the current is limited to the value computed for constant power at Vminpu. - DSS property name: `VMinpu`, DSS property index: 8. + Name: `VMinpu` + Default: 0.9 """ def _get_VMaxpu(self) -> float: @@ -259,9 +268,10 @@ def _set_VMaxpu(self, value: float, flags: enums.SetterFlags = 0): VMaxpu = property(_get_VMaxpu, _set_VMaxpu) # type: float """ - Default = 1.10. Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model. + Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model. - DSS property name: `VMaxpu`, DSS property index: 9. + Name: `VMaxpu` + Default: 1.1 """ def _get_Yearly_str(self) -> str: @@ -274,7 +284,7 @@ def _set_Yearly_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Dispatch shape to use for yearly simulations. Must be previously defined as a Loadshape object. If this is not specified, a constant value is assumed (no variation). If the generator is assumed to be ON continuously, specify Status=FIXED, or designate a curve that is 1.0 per unit at all times. Set to NONE to reset to no loadshape. Nominally for 8760 simulations. If there are fewer points in the designated shape than the number of points in the solution, the curve is repeated. - DSS property name: `Yearly`, DSS property index: 10. + Name: `Yearly` """ def _get_Yearly(self) -> LoadShape: @@ -291,7 +301,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags """ Dispatch shape to use for yearly simulations. Must be previously defined as a Loadshape object. If this is not specified, a constant value is assumed (no variation). If the generator is assumed to be ON continuously, specify Status=FIXED, or designate a curve that is 1.0 per unit at all times. Set to NONE to reset to no loadshape. Nominally for 8760 simulations. If there are fewer points in the designated shape than the number of points in the solution, the curve is repeated. - DSS property name: `Yearly`, DSS property index: 10. + Name: `Yearly` """ def _get_Daily_str(self) -> str: @@ -304,7 +314,7 @@ def _set_Daily_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Dispatch shape to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. If generator is assumed to be ON continuously, specify Status=FIXED, or designate a Loadshape object that is 1.0 per unit for all hours. Set to NONE to reset to no loadshape. - DSS property name: `Daily`, DSS property index: 11. + Name: `Daily` """ def _get_Daily(self) -> LoadShape: @@ -321,7 +331,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ Dispatch shape to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. If generator is assumed to be ON continuously, specify Status=FIXED, or designate a Loadshape object that is 1.0 per unit for all hours. Set to NONE to reset to no loadshape. - DSS property name: `Daily`, DSS property index: 11. + Name: `Daily` """ def _get_Duty_str(self) -> str: @@ -334,7 +344,7 @@ def _set_Duty_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Load shape to use for duty cycle dispatch simulations such as for wind generation. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr -- perhaps, in seconds. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. 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. - DSS property name: `Duty`, DSS property index: 12. + Name: `Duty` """ def _get_Duty(self) -> LoadShape: @@ -351,7 +361,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ Load shape to use for duty cycle dispatch simulations such as for wind generation. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr -- perhaps, in seconds. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. 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. - DSS property name: `Duty`, DSS property index: 12. + Name: `Duty` """ def _get_DispMode(self) -> enums.GeneratorDispatchMode: @@ -365,9 +375,10 @@ def _set_DispMode(self, value: Union[AnyStr, int, enums.GeneratorDispatchMode], DispMode = property(_get_DispMode, _set_DispMode) # type: enums.GeneratorDispatchMode """ - {Default* | Loadlevel | Price } Default = Default. Dispatch mode. In default mode, gen is either always on or follows dispatch curve as specified. Otherwise, the gen comes on when either the global default load level (Loadshape "default") or the price level exceeds the dispatch value. + Dispatch mode. In default mode, the generator is either always on or follows dispatch curve as specified. Otherwise, the gen comes on when either the global default load level (Loadshape "default") or the price level exceeds the dispatch value. - DSS property name: `DispMode`, DSS property index: 13. + Name: `DispMode` + Default: Default """ def _get_DispMode_str(self) -> str: @@ -378,9 +389,10 @@ def _set_DispMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): DispMode_str = property(_get_DispMode_str, _set_DispMode_str) # type: str """ - {Default* | Loadlevel | Price } Default = Default. Dispatch mode. In default mode, gen is either always on or follows dispatch curve as specified. Otherwise, the gen comes on when either the global default load level (Loadshape "default") or the price level exceeds the dispatch value. + Dispatch mode. In default mode, the generator is either always on or follows dispatch curve as specified. Otherwise, the gen comes on when either the global default load level (Loadshape "default") or the price level exceeds the dispatch value. - DSS property name: `DispMode`, DSS property index: 13. + Name: `DispMode` + Default: Default """ def _get_DispValue(self) -> float: @@ -392,10 +404,11 @@ def _set_DispValue(self, value: float, flags: enums.SetterFlags = 0): DispValue = property(_get_DispValue, _set_DispValue) # type: float """ Dispatch value. - If = 0.0 (default) then Generator follow dispatch curves, if any. - If > 0 then Generator is ON only when either the price signal (in Price dispatch mode) exceeds this value or the active circuit load multiplier * "default" loadshape value * the default yearly growth factor exceeds this value. Then the generator follows dispatch curves (duty, daily, or yearly), if any (see also Status). + If = 0 (default) then Generator follow dispatch curves, if any. + If > 0 then Generator is ON only when either the price signal (in Price dispatch mode) exceeds this value or the active circuit load multiplier × "default" loadshape value * the default yearly growth factor exceeds this value. Then the generator follows dispatch curves (duty, daily, or yearly), if any (see also Status). - DSS property name: `DispValue`, DSS property index: 14. + Name: `DispValue` + Default: 0.0 """ def _get_Conn(self) -> enums.Connection: @@ -409,9 +422,10 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection], flags: enums.Se Conn = property(_get_Conn, _set_Conn) # type: enums.Connection """ - ={wye|LN|delta|LL}. Default is wye. + Generator connection. Default is wye. - DSS property name: `Conn`, DSS property index: 15. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> str: @@ -422,9 +436,10 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Conn_str = property(_get_Conn_str, _set_Conn_str) # type: str """ - ={wye|LN|delta|LL}. Default is wye. + Generator connection. Default is wye. - DSS property name: `Conn`, DSS property index: 15. + Name: `Conn` + Default: Wye """ def _get_Status(self) -> enums.GeneratorStatus: @@ -438,9 +453,10 @@ def _set_Status(self, value: Union[AnyStr, int, enums.GeneratorStatus], flags: e Status = property(_get_Status, _set_Status) # type: enums.GeneratorStatus """ - ={Fixed | Variable*}. If Fixed, then dispatch multipliers do not apply. The generator is alway at full power when it is ON. Default is Variable (follows curves). + If Fixed, then dispatch multipliers do not apply. The generator is alway at full power when it is ON. Default is Variable (follows curves). - DSS property name: `Status`, DSS property index: 16. + Name: `Status` + Default: Variable """ def _get_Status_str(self) -> str: @@ -451,9 +467,10 @@ def _set_Status_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Status_str = property(_get_Status_str, _set_Status_str) # type: str """ - ={Fixed | Variable*}. If Fixed, then dispatch multipliers do not apply. The generator is alway at full power when it is ON. Default is Variable (follows curves). + If Fixed, then dispatch multipliers do not apply. The generator is alway at full power when it is ON. Default is Variable (follows curves). - DSS property name: `Status`, DSS property index: 16. + Name: `Status` + Default: Variable """ def _get_Class(self) -> int: @@ -466,7 +483,8 @@ def _set_Class(self, value: int, flags: enums.SetterFlags = 0): """ An arbitrary integer number representing the class of Generator so that Generator values may be segregated by class. - DSS property name: `Class`, DSS property index: 17. + Name: `Class` + Default: 1 """ def _get_Vpu(self) -> float: @@ -477,9 +495,10 @@ def _set_Vpu(self, value: float, flags: enums.SetterFlags = 0): Vpu = property(_get_Vpu, _set_Vpu) # type: float """ - Per Unit voltage set point for Model = 3 (typical power flow model). Default is 1.0. + Per Unit voltage set point for Model = 3 (typical power flow model). - DSS property name: `Vpu`, DSS property index: 18. + Name: `Vpu` + Default: 1.0 """ def _get_Maxkvar(self) -> float: @@ -492,7 +511,7 @@ def _set_Maxkvar(self, value: float, flags: enums.SetterFlags = 0): """ Maximum kvar limit for Model = 3. Defaults to twice the specified load kvar. Always reset this if you change PF or kvar properties. - DSS property name: `Maxkvar`, DSS property index: 19. + Name: `Maxkvar` """ def _get_Minkvar(self) -> float: @@ -505,7 +524,7 @@ def _set_Minkvar(self, value: float, flags: enums.SetterFlags = 0): """ Minimum kvar limit for Model = 3. Enter a negative number if generator can absorb vars. Defaults to negative of Maxkvar. Always reset this if you change PF or kvar properties. - DSS property name: `Minkvar`, DSS property index: 20. + Name: `Minkvar` """ def _get_PVFactor(self) -> float: @@ -518,7 +537,8 @@ def _set_PVFactor(self, value: float, flags: enums.SetterFlags = 0): """ Deceleration factor for P-V generator model (Model=3). Default is 0.1. If the circuit converges easily, you may want to use a higher number such as 1.0. Use a lower number if solution diverges. Use Debugtrace=yes to create a file that will trace the convergence of a generator model. - DSS property name: `PVFactor`, DSS property index: 21. + Name: `PVFactor` + Default: 0.1 """ def _get_ForceOn(self) -> bool: @@ -529,9 +549,10 @@ def _set_ForceOn(self, value: bool, flags: enums.SetterFlags = 0): ForceOn = property(_get_ForceOn, _set_ForceOn) # type: bool """ - {Yes | No} Forces generator ON despite requirements of other dispatch modes. Stays ON until this property is set to NO, or an internal algorithm cancels the forced ON state. + Forces generator ON despite requirements of other dispatch modes. Stays ON until this property is set to NO, or an internal algorithm cancels the forced ON state. - DSS property name: `ForceOn`, DSS property index: 22. + Name: `ForceOn` + Default: False """ def _get_kVA(self) -> float: @@ -542,9 +563,10 @@ def _set_kVA(self, value: float, flags: enums.SetterFlags = 0): kVA = property(_get_kVA, _set_kVA) # type: float """ - kVA rating of electrical machine. Defaults to 1.2* kW if not specified. Applied to machine or inverter definition for Dynamics mode solutions. + kVA rating of electrical machine. Defaults to 1.2 × kW if not specified. Applied to machine or inverter definition for Dynamics mode solutions. - DSS property name: `kVA`, DSS property index: 23. + Name: `kVA` + Units: kVA """ def _get_Xd(self) -> float: @@ -555,9 +577,10 @@ def _set_Xd(self, value: float, flags: enums.SetterFlags = 0): Xd = property(_get_Xd, _set_Xd) # type: float """ - Per unit synchronous reactance of machine. Presently used only for Thevenin impedance for power flow calcs of user models (model=6). Typically use a value 0.4 to 1.0. Default is 1.0 + Per unit synchronous reactance of machine. Presently used only for Thévenin impedance for power flow calcs of user models (model=6). Typically use a value 0.4 to 1.0. Default is 1.0 - DSS property name: `Xd`, DSS property index: 25. + Name: `Xd` + Default: 1.0 """ def _get_Xdp(self) -> float: @@ -568,9 +591,10 @@ def _set_Xdp(self, value: float, flags: enums.SetterFlags = 0): Xdp = property(_get_Xdp, _set_Xdp) # type: float """ - Per unit transient reactance of the machine. Used for Dynamics mode and Fault studies. Default is 0.27.For user models, this value is used for the Thevenin/Norton impedance for Dynamics Mode. + Per unit transient reactance of the machine. Used for Dynamics mode and Fault studies. Default is 0.27.For user models, this value is used for the Thévenin/Norton impedance for Dynamics Mode. - DSS property name: `Xdp`, DSS property index: 26. + Name: `Xdp` + Default: 0.28 """ def _get_Xdpp(self) -> float: @@ -583,7 +607,8 @@ def _set_Xdpp(self, value: float, flags: enums.SetterFlags = 0): """ Per unit subtransient reactance of the machine. Used for Harmonics. Default is 0.20. - DSS property name: `Xdpp`, DSS property index: 27. + Name: `Xdpp` + Default: 0.2 """ def _get_H(self) -> float: @@ -596,7 +621,8 @@ def _set_H(self, value: float, flags: enums.SetterFlags = 0): """ Per unit mass constant of the machine. MW-sec/MVA. Default is 1.0. - DSS property name: `H`, DSS property index: 28. + Name: `H` + Default: 1.0 """ def _get_D(self) -> float: @@ -609,7 +635,8 @@ def _set_D(self, value: float, flags: enums.SetterFlags = 0): """ Damping constant. Usual range is 0 to 4. Default is 1.0. Adjust to get damping - DSS property name: `D`, DSS property index: 29. + Name: `D` + Default: 1.0 """ def _get_UserModel(self) -> str: @@ -622,7 +649,7 @@ def _set_UserModel(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of DLL containing user-written model, which computes the terminal currents for Dynamics studies, overriding the default model. Set to "none" to negate previous setting. - DSS property name: `UserModel`, DSS property index: 30. + Name: `UserModel` """ def _get_UserData(self) -> str: @@ -635,7 +662,7 @@ def _set_UserData(self, value: AnyStr, flags: enums.SetterFlags = 0): """ String (in quotes or parentheses) that gets passed to user-written model for defining the data required for that model. - DSS property name: `UserData`, DSS property index: 31. + Name: `UserData` """ def _get_ShaftModel(self) -> str: @@ -648,7 +675,7 @@ def _set_ShaftModel(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of user-written DLL containing a Shaft model, which models the prime mover and determines the power on the shaft for Dynamics studies. Models additional mass elements other than the single-mass model in the DSS default model. Set to "none" to negate previous setting. - DSS property name: `ShaftModel`, DSS property index: 32. + Name: `ShaftModel` """ def _get_ShaftData(self) -> str: @@ -661,7 +688,7 @@ def _set_ShaftData(self, value: AnyStr, flags: enums.SetterFlags = 0): """ String (in quotes or parentheses) that gets passed to user-written shaft dynamic model for defining the data for that model. - DSS property name: `ShaftData`, DSS property index: 33. + Name: `ShaftData` """ def _get_DutyStart(self) -> float: @@ -674,7 +701,9 @@ def _set_DutyStart(self, value: float, flags: enums.SetterFlags = 0): """ Starting time offset [hours] into the duty cycle shape for this generator, defaults to 0 - DSS property name: `DutyStart`, DSS property index: 34. + Name: `DutyStart` + Units: hour + Default: 0.0 """ def _get_DebugTrace(self) -> bool: @@ -685,9 +714,10 @@ def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: bool """ - {Yes | No } Default is no. Turn this on to capture the progress of the generator model for each iteration. Creates a separate file for each generator named "GEN_name.csv". + Turn this on to capture the progress of the generator model for each iteration. Creates a separate file for each generator named "GEN_name.csv". - DSS property name: `DebugTrace`, DSS property index: 35. + Name: `DebugTrace` + Default: False """ def _get_Balanced(self) -> bool: @@ -698,9 +728,10 @@ def _set_Balanced(self, value: bool, flags: enums.SetterFlags = 0): Balanced = property(_get_Balanced, _set_Balanced) # type: bool """ - {Yes | No*} Default is No. For Model=7, force balanced current only for 3-phase generators. Force zero- and negative-sequence to zero. + For Model=7, force balanced current only for 3-phase generators. Force zero- and negative-sequence to zero. - DSS property name: `Balanced`, DSS property index: 36. + Name: `Balanced` + Default: False """ def _get_XRdp(self) -> float: @@ -711,9 +742,10 @@ def _set_XRdp(self, value: float, flags: enums.SetterFlags = 0): XRdp = property(_get_XRdp, _set_XRdp) # type: float """ - Default is 20. X/R ratio for Xdp property for FaultStudy and Dynamic modes. + X/R ratio for Xdp property for FaultStudy and Dynamic modes. - DSS property name: `XRdp`, DSS property index: 37. + Name: `XRdp` + Default: 20.0 """ def _get_UseFuel(self) -> bool: @@ -724,9 +756,10 @@ def _set_UseFuel(self, value: bool, flags: enums.SetterFlags = 0): UseFuel = property(_get_UseFuel, _set_UseFuel) # type: bool """ - {Yes | *No}. Activates the use of fuel for the operation of the generator. When the fuel level reaches the reserve level, the generator stops until it gets refueled. By default, the generator is connected to a continuous fuel supply, Use this mode to mimic dependency on fuel level for different generation technologies. + Activates the use of fuel for the operation of the generator. When the fuel level reaches the reserve level, the generator stops until it gets refueled. By default, the generator is connected to a continuous fuel supply, Use this mode to mimic dependency on fuel level for different generation technologies. - DSS property name: `UseFuel`, DSS property index: 38. + Name: `UseFuel` + Default: False """ def _get_FuelkWh(self) -> float: @@ -737,9 +770,10 @@ def _set_FuelkWh(self, value: float, flags: enums.SetterFlags = 0): FuelkWh = property(_get_FuelkWh, _set_FuelkWh) # type: float """ - {*0}Is the nominal level of fuel for the generator (kWh). It only applies if UseFuel = Yes/True + The nominal level of fuel for the generator (kWh). It only applies if UseFuel = True - DSS property name: `FuelkWh`, DSS property index: 39. + Name: `FuelkWh` + Default: 0.0 """ def _get_pctFuel(self) -> float: @@ -750,9 +784,10 @@ def _set_pctFuel(self, value: float, flags: enums.SetterFlags = 0): pctFuel = property(_get_pctFuel, _set_pctFuel) # type: float """ - It is a number between 0 and 100 representing the current amount of fuel available in percentage of FuelkWh. It only applies if UseFuel = Yes/True + It is a number between 0 and 100 representing the current amount of fuel available in percentage of FuelkWh. It only applies if UseFuel = True - DSS property name: `%Fuel`, DSS property index: 40. + Name: `%Fuel` + Default: 100.0 """ def _get_pctReserve(self) -> float: @@ -763,16 +798,18 @@ def _set_pctReserve(self, value: float, flags: enums.SetterFlags = 0): pctReserve = property(_get_pctReserve, _set_pctReserve) # type: float """ - It is a number between 0 and 100 representing the reserve level in percentage of FuelkWh. It only applies if UseFuel = Yes/True + It is a number between 0 and 100 representing the reserve level in percentage of FuelkWh. It only applies if UseFuel = True - DSS property name: `%Reserve`, DSS property index: 41. + Name: `%Reserve` + Default: 20.0 """ def Refuel(self, value: bool = True, flags: enums.SetterFlags = 0): """ - It is a boolean value (Yes/True, No/False) that can be used to manually refuel the generator when needed. It only applies if UseFuel = Yes/True + Setting a true value manually refuels the generator when needed. It only applies if UseFuel = True - DSS property name: `Refuel`, DSS property index: 42. + Name: `Refuel` + Default: False """ self._lib.Obj_SetInt32(self._ptr, 42, value, flags) @@ -786,7 +823,7 @@ def _set_DynamicEq_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. if not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 43. + Name: `DynamicEq` """ def _get_DynamicEq(self) -> DynamicExp: @@ -803,7 +840,7 @@ def _set_DynamicEq(self, value: Union[AnyStr, DynamicExp], flags: enums.SetterFl """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. if not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 43. + Name: `DynamicEq` """ def _get_DynOut(self) -> List[str]: @@ -823,7 +860,7 @@ def _set_DynOut(self, value: List[AnyStr], flags: enums.SetterFlags = 0): The output variables need to be defined in tha strict order. - DSS property name: `DynOut`, DSS property index: 44. + Name: `DynOut` """ def _get_Spectrum_str(self) -> str: @@ -834,9 +871,10 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str """ - Name of harmonic voltage or current spectrum for this generator. Voltage behind Xd" for machine - default. Current injection for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this generator. Voltage behind Xd" for machine - default. Current injection for inverter. - DSS property name: `Spectrum`, DSS property index: 45. + Name: `Spectrum` + Default: defaultgen """ def _get_Spectrum(self) -> SpectrumObj: @@ -851,9 +889,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj """ - Name of harmonic voltage or current spectrum for this generator. Voltage behind Xd" for machine - default. Current injection for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this generator. Voltage behind Xd" for machine - default. Current injection for inverter. - DSS property name: `Spectrum`, DSS property index: 45. + Name: `Spectrum` + Default: defaultgen """ def _get_BaseFreq(self) -> float: @@ -866,7 +905,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 46. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -877,9 +917,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 47. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -888,7 +929,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 48. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(48, value) @@ -984,7 +1027,8 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of Phases, this Generator. Power is evenly divided among phases. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Bus1(self) -> List[str]: @@ -997,7 +1041,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Bus to which the Generator is connected. May include specific node specification. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kV(self) -> BatchFloat64ArrayProxy: @@ -1010,7 +1054,9 @@ def _set_kV(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Nominal rated (1.0 per unit) voltage, kV, for Generator. For 2- and 3-phase Generators, specify phase-phase kV. Otherwise, for phases=1 or phases>3, specify actual kV across each branch of the Generator. If wye (star), specify phase-neutral kV. If delta or phase-phase connected, specify phase-phase kV. - DSS property name: `kV`, DSS property index: 3. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_kW(self) -> BatchFloat64ArrayProxy: @@ -1024,7 +1070,9 @@ def _set_kW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = Total base kW for the Generator. A positive value denotes power coming OUT of the element, which is the opposite of a load. This value is modified depending on the dispatch mode. Unaffected by the global load multiplier and growth curves. If you want there to be more generation, you must add more generators or change this value. - DSS property name: `kW`, DSS property index: 4. + Name: `kW` + Units: kW + Default: 1000.0 """ def _get_PF(self) -> BatchFloat64ArrayProxy: @@ -1035,12 +1083,13 @@ def _set_PF(self, value: Union[float, Float64Array], flags: enums.SetterFlags = PF = property(_get_PF, _set_PF) # type: BatchFloat64ArrayProxy """ - Generator power factor. Default is 0.80. Enter negative for leading powerfactor (when kW and kvar have opposite signs.) + Generator power factor. Enter negative for leading powerfactor (when kW and kvar have opposite signs.) A positive power factor for a generator signifies that the generator produces vars as is typical for a synchronous generator. Induction machines would be specified with a negative power factor. - DSS property name: `PF`, DSS property index: 5. + Name: `PF` + Default: 0.88 """ def _get_kvar(self) -> BatchFloat64ArrayProxy: @@ -1053,7 +1102,8 @@ def _set_kvar(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Specify the base kvar. Alternative to specifying the power factor. Side effect: the power factor value is altered to agree based on present value of kW. - DSS property name: `kvar`, DSS property index: 6. + Name: `kvar` + Units: kvar """ def _get_Model(self) -> BatchInt32ArrayProxy: @@ -1066,15 +1116,16 @@ def _set_Model(self, value: Union[int, enums.GeneratorModel, Int32Array], flags: """ Integer code for the model to use for generation variation with voltage. Valid values are: - 1:Generator injects a constant kW at specified power factor. - 2:Generator is modeled as a constant admittance. - 3:Const kW, constant kV. Somewhat like a conventional transmission power flow P-V generator. - 4:Const kW, Fixed Q (Q never varies) - 5:Const kW, Fixed Q(as a constant reactance) - 6:Compute load injection from User-written Model.(see usage of Xd, Xdp) - 7:Constant kW, kvar, but current-limited below Vminpu. Approximates a simple inverter. See also Balanced. + - 1: Generator injects a constant kW at specified power factor. + - 2: Generator is modeled as a constant admittance. + - 3: Const kW, constant kV. Somewhat like a conventional transmission power flow P-V generator. + - 4: Const kW, Fixed Q (Q never varies) + - 5: Const kW, Fixed Q(as a constant reactance) + - 6: Compute load injection from User-written Model.(see usage of Xd, Xdp) + - 7: Constant kW, kvar, but current-limited below Vminpu. Approximates a simple inverter. See also Balanced. - DSS property name: `Model`, DSS property index: 7. + Name: `Model` + Default: 1 """ def _get_VMinpu(self) -> BatchFloat64ArrayProxy: @@ -1085,9 +1136,10 @@ def _set_VMinpu(self, value: Union[float, Float64Array], flags: enums.SetterFlag VMinpu = property(_get_VMinpu, _set_VMinpu) # type: BatchFloat64ArrayProxy """ - Default = 0.90. Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model. For model 7, the current is limited to the value computed for constant power at Vminpu. + Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model. For model 7, the current is limited to the value computed for constant power at Vminpu. - DSS property name: `VMinpu`, DSS property index: 8. + Name: `VMinpu` + Default: 0.9 """ def _get_VMaxpu(self) -> BatchFloat64ArrayProxy: @@ -1098,9 +1150,10 @@ def _set_VMaxpu(self, value: Union[float, Float64Array], flags: enums.SetterFlag VMaxpu = property(_get_VMaxpu, _set_VMaxpu) # type: BatchFloat64ArrayProxy """ - Default = 1.10. Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model. + Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model. - DSS property name: `VMaxpu`, DSS property index: 9. + Name: `VMaxpu` + Default: 1.1 """ def _get_Yearly_str(self) -> List[str]: @@ -1113,7 +1166,7 @@ def _set_Yearly_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ Dispatch shape to use for yearly simulations. Must be previously defined as a Loadshape object. If this is not specified, a constant value is assumed (no variation). If the generator is assumed to be ON continuously, specify Status=FIXED, or designate a curve that is 1.0 per unit at all times. Set to NONE to reset to no loadshape. Nominally for 8760 simulations. If there are fewer points in the designated shape than the number of points in the solution, the curve is repeated. - DSS property name: `Yearly`, DSS property index: 10. + Name: `Yearly` """ def _get_Yearly(self) -> List[LoadShape]: @@ -1126,7 +1179,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadSha """ Dispatch shape to use for yearly simulations. Must be previously defined as a Loadshape object. If this is not specified, a constant value is assumed (no variation). If the generator is assumed to be ON continuously, specify Status=FIXED, or designate a curve that is 1.0 per unit at all times. Set to NONE to reset to no loadshape. Nominally for 8760 simulations. If there are fewer points in the designated shape than the number of points in the solution, the curve is repeated. - DSS property name: `Yearly`, DSS property index: 10. + Name: `Yearly` """ def _get_Daily_str(self) -> List[str]: @@ -1139,7 +1192,7 @@ def _set_Daily_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ Dispatch shape to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. If generator is assumed to be ON continuously, specify Status=FIXED, or designate a Loadshape object that is 1.0 per unit for all hours. Set to NONE to reset to no loadshape. - DSS property name: `Daily`, DSS property index: 11. + Name: `Daily` """ def _get_Daily(self) -> List[LoadShape]: @@ -1152,7 +1205,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShap """ Dispatch shape to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. If generator is assumed to be ON continuously, specify Status=FIXED, or designate a Loadshape object that is 1.0 per unit for all hours. Set to NONE to reset to no loadshape. - DSS property name: `Daily`, DSS property index: 11. + Name: `Daily` """ def _get_Duty_str(self) -> List[str]: @@ -1165,7 +1218,7 @@ def _set_Duty_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ Load shape to use for duty cycle dispatch simulations such as for wind generation. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr -- perhaps, in seconds. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. 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. - DSS property name: `Duty`, DSS property index: 12. + Name: `Duty` """ def _get_Duty(self) -> List[LoadShape]: @@ -1178,7 +1231,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape """ Load shape to use for duty cycle dispatch simulations such as for wind generation. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr -- perhaps, in seconds. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. 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. - DSS property name: `Duty`, DSS property index: 12. + Name: `Duty` """ def _get_DispMode(self) -> BatchInt32ArrayProxy: @@ -1193,9 +1246,10 @@ def _set_DispMode(self, value: Union[AnyStr, int, enums.GeneratorDispatchMode, L DispMode = property(_get_DispMode, _set_DispMode) # type: BatchInt32ArrayProxy """ - {Default* | Loadlevel | Price } Default = Default. Dispatch mode. In default mode, gen is either always on or follows dispatch curve as specified. Otherwise, the gen comes on when either the global default load level (Loadshape "default") or the price level exceeds the dispatch value. + Dispatch mode. In default mode, the generator is either always on or follows dispatch curve as specified. Otherwise, the gen comes on when either the global default load level (Loadshape "default") or the price level exceeds the dispatch value. - DSS property name: `DispMode`, DSS property index: 13. + Name: `DispMode` + Default: Default """ def _get_DispMode_str(self) -> List[str]: @@ -1206,9 +1260,10 @@ def _set_DispMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): DispMode_str = property(_get_DispMode_str, _set_DispMode_str) # type: List[str] """ - {Default* | Loadlevel | Price } Default = Default. Dispatch mode. In default mode, gen is either always on or follows dispatch curve as specified. Otherwise, the gen comes on when either the global default load level (Loadshape "default") or the price level exceeds the dispatch value. + Dispatch mode. In default mode, the generator is either always on or follows dispatch curve as specified. Otherwise, the gen comes on when either the global default load level (Loadshape "default") or the price level exceeds the dispatch value. - DSS property name: `DispMode`, DSS property index: 13. + Name: `DispMode` + Default: Default """ def _get_DispValue(self) -> BatchFloat64ArrayProxy: @@ -1220,10 +1275,11 @@ def _set_DispValue(self, value: Union[float, Float64Array], flags: enums.SetterF DispValue = property(_get_DispValue, _set_DispValue) # type: BatchFloat64ArrayProxy """ Dispatch value. - If = 0.0 (default) then Generator follow dispatch curves, if any. - If > 0 then Generator is ON only when either the price signal (in Price dispatch mode) exceeds this value or the active circuit load multiplier * "default" loadshape value * the default yearly growth factor exceeds this value. Then the generator follows dispatch curves (duty, daily, or yearly), if any (see also Status). + If = 0 (default) then Generator follow dispatch curves, if any. + If > 0 then Generator is ON only when either the price signal (in Price dispatch mode) exceeds this value or the active circuit load multiplier × "default" loadshape value * the default yearly growth factor exceeds this value. Then the generator follows dispatch curves (duty, daily, or yearly), if any (see also Status). - DSS property name: `DispValue`, DSS property index: 14. + Name: `DispValue` + Default: 0.0 """ def _get_Conn(self) -> BatchInt32ArrayProxy: @@ -1238,9 +1294,10 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection, List[AnyStr], Li Conn = property(_get_Conn, _set_Conn) # type: BatchInt32ArrayProxy """ - ={wye|LN|delta|LL}. Default is wye. + Generator connection. Default is wye. - DSS property name: `Conn`, DSS property index: 15. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> List[str]: @@ -1251,9 +1308,10 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Conn_str = property(_get_Conn_str, _set_Conn_str) # type: List[str] """ - ={wye|LN|delta|LL}. Default is wye. + Generator connection. Default is wye. - DSS property name: `Conn`, DSS property index: 15. + Name: `Conn` + Default: Wye """ def _get_Status(self) -> BatchInt32ArrayProxy: @@ -1268,9 +1326,10 @@ def _set_Status(self, value: Union[AnyStr, int, enums.GeneratorStatus, List[AnyS Status = property(_get_Status, _set_Status) # type: BatchInt32ArrayProxy """ - ={Fixed | Variable*}. If Fixed, then dispatch multipliers do not apply. The generator is alway at full power when it is ON. Default is Variable (follows curves). + If Fixed, then dispatch multipliers do not apply. The generator is alway at full power when it is ON. Default is Variable (follows curves). - DSS property name: `Status`, DSS property index: 16. + Name: `Status` + Default: Variable """ def _get_Status_str(self) -> List[str]: @@ -1281,9 +1340,10 @@ def _set_Status_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Status_str = property(_get_Status_str, _set_Status_str) # type: List[str] """ - ={Fixed | Variable*}. If Fixed, then dispatch multipliers do not apply. The generator is alway at full power when it is ON. Default is Variable (follows curves). + If Fixed, then dispatch multipliers do not apply. The generator is alway at full power when it is ON. Default is Variable (follows curves). - DSS property name: `Status`, DSS property index: 16. + Name: `Status` + Default: Variable """ def _get_Class(self) -> BatchInt32ArrayProxy: @@ -1296,7 +1356,8 @@ def _set_Class(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0 """ An arbitrary integer number representing the class of Generator so that Generator values may be segregated by class. - DSS property name: `Class`, DSS property index: 17. + Name: `Class` + Default: 1 """ def _get_Vpu(self) -> BatchFloat64ArrayProxy: @@ -1307,9 +1368,10 @@ def _set_Vpu(self, value: Union[float, Float64Array], flags: enums.SetterFlags = Vpu = property(_get_Vpu, _set_Vpu) # type: BatchFloat64ArrayProxy """ - Per Unit voltage set point for Model = 3 (typical power flow model). Default is 1.0. + Per Unit voltage set point for Model = 3 (typical power flow model). - DSS property name: `Vpu`, DSS property index: 18. + Name: `Vpu` + Default: 1.0 """ def _get_Maxkvar(self) -> BatchFloat64ArrayProxy: @@ -1322,7 +1384,7 @@ def _set_Maxkvar(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Maximum kvar limit for Model = 3. Defaults to twice the specified load kvar. Always reset this if you change PF or kvar properties. - DSS property name: `Maxkvar`, DSS property index: 19. + Name: `Maxkvar` """ def _get_Minkvar(self) -> BatchFloat64ArrayProxy: @@ -1335,7 +1397,7 @@ def _set_Minkvar(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Minimum kvar limit for Model = 3. Enter a negative number if generator can absorb vars. Defaults to negative of Maxkvar. Always reset this if you change PF or kvar properties. - DSS property name: `Minkvar`, DSS property index: 20. + Name: `Minkvar` """ def _get_PVFactor(self) -> BatchFloat64ArrayProxy: @@ -1348,7 +1410,8 @@ def _set_PVFactor(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Deceleration factor for P-V generator model (Model=3). Default is 0.1. If the circuit converges easily, you may want to use a higher number such as 1.0. Use a lower number if solution diverges. Use Debugtrace=yes to create a file that will trace the convergence of a generator model. - DSS property name: `PVFactor`, DSS property index: 21. + Name: `PVFactor` + Default: 0.1 """ def _get_ForceOn(self) -> List[bool]: @@ -1356,14 +1419,15 @@ def _get_ForceOn(self) -> List[bool]: self._get_batch_int32_prop(22) ] - def _set_ForceOn(self, value: bool, flags: enums.SetterFlags = 0): + def _set_ForceOn(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(22, value, flags) ForceOn = property(_get_ForceOn, _set_ForceOn) # type: List[bool] """ - {Yes | No} Forces generator ON despite requirements of other dispatch modes. Stays ON until this property is set to NO, or an internal algorithm cancels the forced ON state. + Forces generator ON despite requirements of other dispatch modes. Stays ON until this property is set to NO, or an internal algorithm cancels the forced ON state. - DSS property name: `ForceOn`, DSS property index: 22. + Name: `ForceOn` + Default: False """ def _get_kVA(self) -> BatchFloat64ArrayProxy: @@ -1374,9 +1438,10 @@ def _set_kVA(self, value: Union[float, Float64Array], flags: enums.SetterFlags = kVA = property(_get_kVA, _set_kVA) # type: BatchFloat64ArrayProxy """ - kVA rating of electrical machine. Defaults to 1.2* kW if not specified. Applied to machine or inverter definition for Dynamics mode solutions. + kVA rating of electrical machine. Defaults to 1.2 × kW if not specified. Applied to machine or inverter definition for Dynamics mode solutions. - DSS property name: `kVA`, DSS property index: 23. + Name: `kVA` + Units: kVA """ def _get_Xd(self) -> BatchFloat64ArrayProxy: @@ -1387,9 +1452,10 @@ def _set_Xd(self, value: Union[float, Float64Array], flags: enums.SetterFlags = Xd = property(_get_Xd, _set_Xd) # type: BatchFloat64ArrayProxy """ - Per unit synchronous reactance of machine. Presently used only for Thevenin impedance for power flow calcs of user models (model=6). Typically use a value 0.4 to 1.0. Default is 1.0 + Per unit synchronous reactance of machine. Presently used only for Thévenin impedance for power flow calcs of user models (model=6). Typically use a value 0.4 to 1.0. Default is 1.0 - DSS property name: `Xd`, DSS property index: 25. + Name: `Xd` + Default: 1.0 """ def _get_Xdp(self) -> BatchFloat64ArrayProxy: @@ -1400,9 +1466,10 @@ def _set_Xdp(self, value: Union[float, Float64Array], flags: enums.SetterFlags = Xdp = property(_get_Xdp, _set_Xdp) # type: BatchFloat64ArrayProxy """ - Per unit transient reactance of the machine. Used for Dynamics mode and Fault studies. Default is 0.27.For user models, this value is used for the Thevenin/Norton impedance for Dynamics Mode. + Per unit transient reactance of the machine. Used for Dynamics mode and Fault studies. Default is 0.27.For user models, this value is used for the Thévenin/Norton impedance for Dynamics Mode. - DSS property name: `Xdp`, DSS property index: 26. + Name: `Xdp` + Default: 0.28 """ def _get_Xdpp(self) -> BatchFloat64ArrayProxy: @@ -1415,7 +1482,8 @@ def _set_Xdpp(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Per unit subtransient reactance of the machine. Used for Harmonics. Default is 0.20. - DSS property name: `Xdpp`, DSS property index: 27. + Name: `Xdpp` + Default: 0.2 """ def _get_H(self) -> BatchFloat64ArrayProxy: @@ -1428,7 +1496,8 @@ def _set_H(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ Per unit mass constant of the machine. MW-sec/MVA. Default is 1.0. - DSS property name: `H`, DSS property index: 28. + Name: `H` + Default: 1.0 """ def _get_D(self) -> BatchFloat64ArrayProxy: @@ -1441,7 +1510,8 @@ def _set_D(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ Damping constant. Usual range is 0 to 4. Default is 1.0. Adjust to get damping - DSS property name: `D`, DSS property index: 29. + Name: `D` + Default: 1.0 """ def _get_UserModel(self) -> List[str]: @@ -1454,7 +1524,7 @@ def _set_UserModel(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ Name of DLL containing user-written model, which computes the terminal currents for Dynamics studies, overriding the default model. Set to "none" to negate previous setting. - DSS property name: `UserModel`, DSS property index: 30. + Name: `UserModel` """ def _get_UserData(self) -> List[str]: @@ -1467,7 +1537,7 @@ def _set_UserData(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ String (in quotes or parentheses) that gets passed to user-written model for defining the data required for that model. - DSS property name: `UserData`, DSS property index: 31. + Name: `UserData` """ def _get_ShaftModel(self) -> List[str]: @@ -1480,7 +1550,7 @@ def _set_ShaftModel(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ Name of user-written DLL containing a Shaft model, which models the prime mover and determines the power on the shaft for Dynamics studies. Models additional mass elements other than the single-mass model in the DSS default model. Set to "none" to negate previous setting. - DSS property name: `ShaftModel`, DSS property index: 32. + Name: `ShaftModel` """ def _get_ShaftData(self) -> List[str]: @@ -1493,7 +1563,7 @@ def _set_ShaftData(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ String (in quotes or parentheses) that gets passed to user-written shaft dynamic model for defining the data for that model. - DSS property name: `ShaftData`, DSS property index: 33. + Name: `ShaftData` """ def _get_DutyStart(self) -> BatchFloat64ArrayProxy: @@ -1506,7 +1576,9 @@ def _set_DutyStart(self, value: Union[float, Float64Array], flags: enums.SetterF """ Starting time offset [hours] into the duty cycle shape for this generator, defaults to 0 - DSS property name: `DutyStart`, DSS property index: 34. + Name: `DutyStart` + Units: hour + Default: 0.0 """ def _get_DebugTrace(self) -> List[bool]: @@ -1514,14 +1586,15 @@ def _get_DebugTrace(self) -> List[bool]: self._get_batch_int32_prop(35) ] - def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): + def _set_DebugTrace(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(35, value, flags) DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: List[bool] """ - {Yes | No } Default is no. Turn this on to capture the progress of the generator model for each iteration. Creates a separate file for each generator named "GEN_name.csv". + Turn this on to capture the progress of the generator model for each iteration. Creates a separate file for each generator named "GEN_name.csv". - DSS property name: `DebugTrace`, DSS property index: 35. + Name: `DebugTrace` + Default: False """ def _get_Balanced(self) -> List[bool]: @@ -1529,14 +1602,15 @@ def _get_Balanced(self) -> List[bool]: self._get_batch_int32_prop(36) ] - def _set_Balanced(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Balanced(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(36, value, flags) Balanced = property(_get_Balanced, _set_Balanced) # type: List[bool] """ - {Yes | No*} Default is No. For Model=7, force balanced current only for 3-phase generators. Force zero- and negative-sequence to zero. + For Model=7, force balanced current only for 3-phase generators. Force zero- and negative-sequence to zero. - DSS property name: `Balanced`, DSS property index: 36. + Name: `Balanced` + Default: False """ def _get_XRdp(self) -> BatchFloat64ArrayProxy: @@ -1547,9 +1621,10 @@ def _set_XRdp(self, value: Union[float, Float64Array], flags: enums.SetterFlags XRdp = property(_get_XRdp, _set_XRdp) # type: BatchFloat64ArrayProxy """ - Default is 20. X/R ratio for Xdp property for FaultStudy and Dynamic modes. + X/R ratio for Xdp property for FaultStudy and Dynamic modes. - DSS property name: `XRdp`, DSS property index: 37. + Name: `XRdp` + Default: 20.0 """ def _get_UseFuel(self) -> List[bool]: @@ -1557,14 +1632,15 @@ def _get_UseFuel(self) -> List[bool]: self._get_batch_int32_prop(38) ] - def _set_UseFuel(self, value: bool, flags: enums.SetterFlags = 0): + def _set_UseFuel(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(38, value, flags) UseFuel = property(_get_UseFuel, _set_UseFuel) # type: List[bool] """ - {Yes | *No}. Activates the use of fuel for the operation of the generator. When the fuel level reaches the reserve level, the generator stops until it gets refueled. By default, the generator is connected to a continuous fuel supply, Use this mode to mimic dependency on fuel level for different generation technologies. + Activates the use of fuel for the operation of the generator. When the fuel level reaches the reserve level, the generator stops until it gets refueled. By default, the generator is connected to a continuous fuel supply, Use this mode to mimic dependency on fuel level for different generation technologies. - DSS property name: `UseFuel`, DSS property index: 38. + Name: `UseFuel` + Default: False """ def _get_FuelkWh(self) -> BatchFloat64ArrayProxy: @@ -1575,9 +1651,10 @@ def _set_FuelkWh(self, value: Union[float, Float64Array], flags: enums.SetterFla FuelkWh = property(_get_FuelkWh, _set_FuelkWh) # type: BatchFloat64ArrayProxy """ - {*0}Is the nominal level of fuel for the generator (kWh). It only applies if UseFuel = Yes/True + The nominal level of fuel for the generator (kWh). It only applies if UseFuel = True - DSS property name: `FuelkWh`, DSS property index: 39. + Name: `FuelkWh` + Default: 0.0 """ def _get_pctFuel(self) -> BatchFloat64ArrayProxy: @@ -1588,9 +1665,10 @@ def _set_pctFuel(self, value: Union[float, Float64Array], flags: enums.SetterFla pctFuel = property(_get_pctFuel, _set_pctFuel) # type: BatchFloat64ArrayProxy """ - It is a number between 0 and 100 representing the current amount of fuel available in percentage of FuelkWh. It only applies if UseFuel = Yes/True + It is a number between 0 and 100 representing the current amount of fuel available in percentage of FuelkWh. It only applies if UseFuel = True - DSS property name: `%Fuel`, DSS property index: 40. + Name: `%Fuel` + Default: 100.0 """ def _get_pctReserve(self) -> BatchFloat64ArrayProxy: @@ -1601,16 +1679,18 @@ def _set_pctReserve(self, value: Union[float, Float64Array], flags: enums.Setter pctReserve = property(_get_pctReserve, _set_pctReserve) # type: BatchFloat64ArrayProxy """ - It is a number between 0 and 100 representing the reserve level in percentage of FuelkWh. It only applies if UseFuel = Yes/True + It is a number between 0 and 100 representing the reserve level in percentage of FuelkWh. It only applies if UseFuel = True - DSS property name: `%Reserve`, DSS property index: 41. + Name: `%Reserve` + Default: 20.0 """ def Refuel(self, value: Union[bool, List[bool]] = True, flags: enums.SetterFlags = 0): """ - It is a boolean value (Yes/True, No/False) that can be used to manually refuel the generator when needed. It only applies if UseFuel = Yes/True + Setting a true value manually refuels the generator when needed. It only applies if UseFuel = True - DSS property name: `Refuel`, DSS property index: 42. + Name: `Refuel` + Default: False """ self._set_batch_int32_array(42, value, flags) @@ -1624,7 +1704,7 @@ def _set_DynamicEq_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Se """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. if not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 43. + Name: `DynamicEq` """ def _get_DynamicEq(self) -> List[DynamicExp]: @@ -1637,7 +1717,7 @@ def _set_DynamicEq(self, value: Union[AnyStr, DynamicExp, List[AnyStr], List[Dyn """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. if not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 43. + Name: `DynamicEq` """ def _get_DynOut(self) -> List[List[str]]: @@ -1659,7 +1739,7 @@ def _set_DynOut(self, value: List[AnyStr], flags: enums.SetterFlags = 0): The output variables need to be defined in tha strict order. - DSS property name: `DynOut`, DSS property index: 44. + Name: `DynOut` """ def _get_Spectrum_str(self) -> List[str]: @@ -1670,9 +1750,10 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] """ - Name of harmonic voltage or current spectrum for this generator. Voltage behind Xd" for machine - default. Current injection for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this generator. Voltage behind Xd" for machine - default. Current injection for inverter. - DSS property name: `Spectrum`, DSS property index: 45. + Name: `Spectrum` + Default: defaultgen """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -1683,9 +1764,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] """ - Name of harmonic voltage or current spectrum for this generator. Voltage behind Xd" for machine - default. Current injection for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this generator. Voltage behind Xd" for machine - default. Current injection for inverter. - DSS property name: `Spectrum`, DSS property index: 45. + Name: `Spectrum` + Default: defaultgen """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -1698,7 +1780,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 46. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -1706,14 +1789,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(47) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(47, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 47. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1722,7 +1806,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 48. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(48, value, flags) diff --git a/altdss/Generic5.py b/altdss/Generic5.py new file mode 100644 index 0000000..74bd543 --- /dev/null +++ b/altdss/Generic5.py @@ -0,0 +1,1635 @@ +# Copyright (c) 2021-2024 Paulo Meira +# Copyright (c) 2021-2024 DSS-Extensions contributors +from __future__ import annotations +from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING +from typing_extensions import TypedDict, Unpack +from .types import Float64Array, Int32Array +from . import enums +from .DSSObj import IDSSObj, DSSObj +from .Batch import DSSBatch +from .ArrayProxy import BatchFloat64ArrayProxy, BatchInt32ArrayProxy +from .common import LIST_LIKE +from .PCElement import PCElementBatchMixin, PCElementMixin +from .CircuitElement import CircuitElementBatchMixin, CircuitElementMixin +from .Spectrum import Spectrum as SpectrumObj + +class Generic5(DSSObj, CircuitElementMixin, PCElementMixin): + __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PCElementMixin._extra_slots + _cls_name = 'Generic5' + _cls_idx = 52 + _cls_int_idx = { + 1, + 6, + 16, + 18, + 19, + 28, + 37, + 40, + 43, + } + _cls_float_idx = { + 3, + 4, + 5, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 17, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 38, + 39, + 42, + } + _cls_prop_idx = { + 'phases': 1, + 'bus1': 2, + 'kv': 3, + 'kw': 4, + 'pf': 5, + 'conn': 6, + 'kva': 7, + 'p_ref1kw': 8, + 'p_ref2kw': 9, + 'p_ref3kw': 10, + 'v_ref1kvln': 11, + 'v_ref2kvln': 12, + 'v_ref3kvln': 13, + 'p_refkw': 14, + 'q_refkvar': 15, + 'cluster_num': 16, + 'v_refkvln': 17, + 'ctrl_mode': 18, + 'qv_flag': 19, + 'kcd': 20, + 'kcq': 21, + 'kqi': 22, + 'q_ref1kvar': 23, + 'q_ref2kvar': 24, + 'q_ref3kvar': 25, + 'pmaxkw': 26, + 'pminkw': 27, + 'pqpriority': 28, + 'pmppkw': 29, + 'pfctr1': 30, + 'pfctr2': 31, + 'pfctr3': 32, + 'pfctr4': 33, + 'pfctr5': 34, + 'pfctr6': 35, + 'pbiaskw': 36, + 'cc_switch': 37, + 'kcq_drp2': 38, + 'volt_trhd': 39, + 'droop': 40, + 'spectrum': 41, + 'basefreq': 42, + 'enabled': 43, + 'like': 44, + } + + def __init__(self, api_util, ptr): + DSSObj.__init__(self, api_util, ptr) + CircuitElementMixin.__init__(self) + PCElementMixin.__init__(self) + + def edit(self, **kwargs: Unpack[Generic5Properties]) -> Generic5: + """ + Edit this Generic5. + + 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. + + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the object. + :return: Returns itself to allow call chaining. + """ + + self._edit(props=kwargs) + return self + + + def _get_Phases(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 1) + + def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 1, value, flags) + + Phases = property(_get_Phases, _set_Phases) # type: int + """ + Number of Phases, this Induction Machine. + + Name: `Phases` + Default: 3 + """ + + def _get_Bus1(self) -> str: + return self._get_prop_string(2) + + def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(2, value, flags) + + Bus1 = property(_get_Bus1, _set_Bus1) # type: str + """ + Bus to which the Induction Machine is connected. May include specific node specification. + + Name: `Bus1` + """ + + def _get_kV(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 3) + + def _set_kV(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 3, value, flags) + + kV = property(_get_kV, _set_kV) # type: float + """ + Nominal rated (1.0 per unit) voltage, kV. For 2- and 3-phase machines, specify phase-phase kV. Otherwise, specify actual kV across each branch of the machine. If wye (star), specify phase-neutral kV. If delta or phase-phase connected, specify phase-phase kV. + + Name: `kV` + Default: 12.47 + """ + + def _get_kW(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 4) + + def _set_kW(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 4, value, flags) + + kW = property(_get_kW, _set_kW) # type: float + """ + Shaft Power, kW, for the Induction Machine. Output limit of a DG + + Name: `kW` + Default: -0.001 + """ + + def _get_PF(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 5) + + def _set_PF(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 5, value, flags) + + PF = property(_get_PF, _set_PF) # type: float + """ + Present power factor for the machine. + + **Read-only** + + Name: `PF` + """ + + def _get_Conn(self) -> enums.Connection: + return enums.Connection(self._lib.Obj_GetInt32(self._ptr, 6)) + + def _set_Conn(self, value: Union[AnyStr, int, enums.Connection], flags: enums.SetterFlags = 0): + if not isinstance(value, int): + self._set_string_o(6, value, flags) + return + self._lib.Obj_SetInt32(self._ptr, 6, value, flags) + + Conn = property(_get_Conn, _set_Conn) # type: enums.Connection + """ + Connection of stator: Delta or Wye. Default is Delta. + + Name: `Conn` + Default: Delta + """ + + def _get_Conn_str(self) -> str: + return self._get_prop_string(6) + + def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_Conn(value, flags) + + Conn_str = property(_get_Conn_str, _set_Conn_str) # type: str + """ + Connection of stator: Delta or Wye. Default is Delta. + + Name: `Conn` + Default: Delta + """ + + def _get_kVA(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 7) + + def _set_kVA(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 7, value, flags) + + kVA = property(_get_kVA, _set_kVA) # type: float + """ + Rated kVA for the machine. + + Name: `kVA` + Default: -0.0012 + """ + + def _get_P_Ref1kW(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 8) + + def _set_P_Ref1kW(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 8, value, flags) + + P_Ref1kW = property(_get_P_Ref1kW, _set_P_Ref1kW) # type: float + """ + P_ref1kW = 10, goes to P_ref1, unit kW, 1st phase set power + + Name: `P_Ref1kW` + Default: 0.0 + """ + + def _get_P_Ref2kW(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 9) + + def _set_P_Ref2kW(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 9, value, flags) + + P_Ref2kW = property(_get_P_Ref2kW, _set_P_Ref2kW) # type: float + """ + P_ref2kW = 10, goes to P_ref2, unit kW, 2nd phase set power + + Name: `P_Ref2kW` + Default: 0.0 + """ + + def _get_P_Ref3kW(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 10) + + def _set_P_Ref3kW(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 10, value, flags) + + P_Ref3kW = property(_get_P_Ref3kW, _set_P_Ref3kW) # type: float + """ + P_ref3kW = 10, goes to P_ref3, unit kW, 3rd phase set power + + Name: `P_Ref3kW` + Default: 0.0 + """ + + def _get_V_Ref1kVLN(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 11) + + def _set_V_Ref1kVLN(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 11, value, flags) + + V_Ref1kVLN = property(_get_V_Ref1kVLN, _set_V_Ref1kVLN) # type: float + """ + V_ref1kVLN = 2.16, 1st phase set V, (Unit kV, L-N value): V mode will work if QV_flag =1(by default) V_ref is set which is prior to Q_ref + + Name: `V_Ref1kVLN` + Default: 0.0 + """ + + def _get_V_Ref2kVLN(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 12) + + def _set_V_Ref2kVLN(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 12, value, flags) + + V_Ref2kVLN = property(_get_V_Ref2kVLN, _set_V_Ref2kVLN) # type: float + """ + V_ref2kVLN = 2.16, 2nd phase set V, (Unit kV, L-N value): V mode will work if QV_flag =1(by default) V_ref is set which is prior to Q_ref + + Name: `V_Ref2kVLN` + Default: 0.0 + """ + + def _get_V_Ref3kVLN(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 13) + + def _set_V_Ref3kVLN(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 13, value, flags) + + V_Ref3kVLN = property(_get_V_Ref3kVLN, _set_V_Ref3kVLN) # type: float + """ + V_ref3kVLN = 2.16, 3rd phase set V, (Unit kV, L-N value): V mode will work if QV_flag =1(by default) V_ref is set which is prior to Q_ref + + Name: `V_Ref3kVLN` + Default: 0.0 + """ + + def _get_P_RefkW(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 14) + + def _set_P_RefkW(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 14, value, flags) + + P_RefkW = property(_get_P_RefkW, _set_P_RefkW) # type: float + """ + P_refkW = 10, goes to P_ref. Ref P Value (kW). P_ref has priority to kW which is nominal value. (Incide variable P_ref is W) + + Name: `P_RefkW` + Default: 0.0 + """ + + def _get_Q_RefkVAr(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 15) + + def _set_Q_RefkVAr(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 15, value, flags) + + Q_RefkVAr = property(_get_Q_RefkVAr, _set_Q_RefkVAr) # type: float + """ + Q_refkVAr=10. Unit Qvar. Ref Q kVAr Value: work only when V_ref is not set + + Name: `Q_RefkVAr` + Default: 0.0 + """ + + def _get_Cluster_Num(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 16) + + def _set_Cluster_Num(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 16, value, flags) + + Cluster_Num = property(_get_Cluster_Num, _set_Cluster_Num) # type: int + """ + Cluster_num: has to be coincident with Fmonitor attached. Default value is 0 + + Name: `Cluster_Num` + Default: 0 + """ + + def _get_V_refkVLN(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 17) + + def _set_V_refkVLN(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 17, value, flags) + + V_refkVLN = property(_get_V_refkVLN, _set_V_refkVLN) # type: float + """ + V_refkVLN = 2.16, pos sequence set V. V_ref (Unit kV, L-N value): V mode will work if QV_flag =1(by default) V_ref is set which is prior to Q_ref + + Name: `V_refkVLN` + Default: 0.001 + """ + + def _get_Ctrl_Mode(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 18) + + def _set_Ctrl_Mode(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 18, value, flags) + + Ctrl_Mode = property(_get_Ctrl_Mode, _set_Ctrl_Mode) # type: int + """ + ctrl mode: /// contrl mode /// ctrl_mode =0; phases = 3; // pos avg control---p_ref, V_ref, Q_ref \\n + /// ctrl_mode =1; phases = 1; bus1 = 452.1; ---p_ref1, V_ref1, Q_ref1 \\n + /// ctrl_mode =2; phases = 1; bus1 = 452.2; ---p_ref2, V_ref2, Q_ref2 \\n + /// ctrl_mode =3; phases = 1; bus1 = 452.3; ---p_ref3, V_ref3, Q_ref3 \\n + /// ctrl_mode =4; phases = 3; bus1 = 452.2; ---p_ref1,2,3, V_ref1,2,3, Q_ref1,2,3 + + Name: `Ctrl_Mode` + Default: 0 + """ + + def _get_QV_flag(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 19) + + def _set_QV_flag(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 19, value, flags) + + QV_flag = property(_get_QV_flag, _set_QV_flag) # type: int + """ + QV_flag : 0-Q_ref mode; 1- V_ref mode + + Name: `QV_flag` + Default: 0 + """ + + def _get_kcd(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 20) + + def _set_kcd(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 20, value, flags) + + kcd = property(_get_kcd, _set_kcd) # type: float + """ + kcd: Idi control gain + + Name: `kcd` + Default: 0.1 + """ + + def _get_kcq(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 21) + + def _set_kcq(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 21, value, flags) + + kcq = property(_get_kcq, _set_kcq) # type: float + """ + kcq: Iqi control gain to delta V + + Name: `kcq` + Default: 0.1 + """ + + def _get_kqi(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 22) + + def _set_kqi(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 22, value, flags) + + kqi = property(_get_kqi, _set_kqi) # type: float + """ + kqi: Iqi control gain to delta Q + + Name: `kqi` + Default: 0.1 + """ + + def _get_Q_ref1kvar(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 23) + + def _set_Q_ref1kvar(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 23, value, flags) + + Q_ref1kvar = property(_get_Q_ref1kvar, _set_Q_ref1kvar) # type: float + """ + Q_ref1kVAr=10. Unit Qvar. Ref Q kVAr Value: work only when V_ref is not set + + Name: `Q_ref1kvar` + Default: 0.0 + """ + + def _get_Q_ref2kvar(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 24) + + def _set_Q_ref2kvar(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 24, value, flags) + + Q_ref2kvar = property(_get_Q_ref2kvar, _set_Q_ref2kvar) # type: float + """ + Q_ref2kVAr=10. Unit Qvar. Ref Q kVAr Value: work only when V_ref is not set + + Name: `Q_ref2kvar` + Default: 0.0 + """ + + def _get_Q_ref3kvar(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 25) + + def _set_Q_ref3kvar(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 25, value, flags) + + Q_ref3kvar = property(_get_Q_ref3kvar, _set_Q_ref3kvar) # type: float + """ + Q_ref3kVAr=10. Unit Qvar. Ref Q kVAr Value: work only when V_ref is not set + + Name: `Q_ref3kvar` + Default: 0.0 + """ + + def _get_PMaxkW(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 26) + + def _set_PMaxkW(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 26, value, flags) + + PMaxkW = property(_get_PMaxkW, _set_PMaxkW) # type: float + """ + PmaxkW = 100, goes to Pmax, unit kW, set max active power output; Operation limit of active power for DG + Pmax should be less than or equal to kW + + Name: `PMaxkW` + Default: -0.001 + """ + + def _get_PMinkW(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 27) + + def _set_PMinkW(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 27, value, flags) + + PMinkW = property(_get_PMinkW, _set_PMinkW) # type: float + """ + PminkW = 10, goes to Pmin, unit kW; Operation limit of active power for DG + + Name: `PMinkW` + Default: 0.0 + """ + + def _get_PQPriority(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 28) + + def _set_PQPriority(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 28, value, flags) + + PQPriority = property(_get_PQPriority, _set_PQPriority) # type: int + """ + PQpriority, goes to PQpriority, define how to set Qmax. 0: Q,1: P + + Name: `PQPriority` + Default: 1 + """ + + def _get_PmppkW(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 29) + + def _set_PmppkW(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 29, value, flags) + + PmppkW = property(_get_PmppkW, _set_PmppkW) # type: float + """ + PmppkW = 100, goes to Pmpp, unit kW, input Pmpp to calculate kW; + kW := (Pmpp + Pbias)*Pfctr1*Pfctr2*Pfctr3*Pfctr4*Pfctr5*Pfctr6; + Pbias = 0 by default, Pfctr*=1 by default; These properties will overwrite kW. + + Name: `PmppkW` + Default: 0.001 + """ + + def _get_Pfctr1(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 30) + + def _set_Pfctr1(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 30, value, flags) + + Pfctr1 = property(_get_Pfctr1, _set_Pfctr1) # type: float + """ + Pfctr1 = 0.16, see PmppkW + + Name: `Pfctr1` + Default: 1.0 + """ + + def _get_Pfctr2(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 31) + + def _set_Pfctr2(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 31, value, flags) + + Pfctr2 = property(_get_Pfctr2, _set_Pfctr2) # type: float + """ + Pfctr2 = 1, 1 by default, see PmppkW + + Name: `Pfctr2` + Default: 1.0 + """ + + def _get_Pfctr3(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 32) + + def _set_Pfctr3(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 32, value, flags) + + Pfctr3 = property(_get_Pfctr3, _set_Pfctr3) # type: float + """ + Pfctr3 = 1, 1 by default, see PmppkW + + Name: `Pfctr3` + Default: 1.0 + """ + + def _get_Pfctr4(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 33) + + def _set_Pfctr4(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 33, value, flags) + + Pfctr4 = property(_get_Pfctr4, _set_Pfctr4) # type: float + """ + Pfctr4= 1, 1 by default, see PmppkW + + Name: `Pfctr4` + Default: 1.0 + """ + + def _get_Pfctr5(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 34) + + def _set_Pfctr5(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 34, value, flags) + + Pfctr5 = property(_get_Pfctr5, _set_Pfctr5) # type: float + """ + Pfctr5 =1, 1 by default, see PmppkW + + Name: `Pfctr5` + Default: 1.0 + """ + + def _get_Pfctr6(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 35) + + def _set_Pfctr6(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 35, value, flags) + + Pfctr6 = property(_get_Pfctr6, _set_Pfctr6) # type: float + """ + Pfctr6 = 1, 1 by default, see PmppkW + + Name: `Pfctr6` + Default: 1.0 + """ + + def _get_PbiaskW(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 36) + + def _set_PbiaskW(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 36, value, flags) + + PbiaskW = property(_get_PbiaskW, _set_PbiaskW) # type: float + """ + Pbias = -0.1, 0 by default, see PmppkW + + Name: `PbiaskW` + Default: 0.0 + """ + + def _get_CC_Switch(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 37) != 0 + + def _set_CC_Switch(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 37, value, flags) + + CC_Switch = property(_get_CC_Switch, _set_CC_Switch) # type: bool + """ + CC_Switch: default value is false. + CC_Switch = true --cooperate control on + CC_Switch = false -- cooperate control off + + Name: `CC_Switch` + Default: False + """ + + def _get_kcq_drp2(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 38) + + def _set_kcq_drp2(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 38, value, flags) + + kcq_drp2 = property(_get_kcq_drp2, _set_kcq_drp2) # type: float + """ + kcq_drp2. the droop gain: 0.0~0.1 + + Name: `kcq_drp2` + Default: 0.0 + """ + + def _get_Volt_Trhd(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 39) + + def _set_Volt_Trhd(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 39, value, flags) + + Volt_Trhd = property(_get_Volt_Trhd, _set_Volt_Trhd) # type: float + """ + Volt_Trhd. 0.~0.05. 0 means v has to follow v_ref + + Name: `Volt_Trhd` + Default: 0.0 + """ + + def _get_Droop(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 40) + + def _set_Droop(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 40, value, flags) + + Droop = property(_get_Droop, _set_Droop) # type: int + """ + droop type: integer: 2- Q = kcq_drp2 * (1-v_dg). others: integral droop with kcq. + + Name: `Droop` + Default: 0 + """ + + def _get_Spectrum_str(self) -> str: + return self._get_prop_string(41) + + def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(41, value, flags) + + Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str + """ + Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. Current injection for inverter. + + Name: `Spectrum` + Default: default + """ + + def _get_Spectrum(self) -> SpectrumObj: + return self._get_obj(41, SpectrumObj) + + def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFlags = 0): + if isinstance(value, DSSObj) or value is None: + self._set_obj(41, value, flags) + return + + self._set_string_o(41, value, flags) + + Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj + """ + Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. Current injection for inverter. + + Name: `Spectrum` + Default: default + """ + + def _get_BaseFreq(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 42) + + def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 42, value, flags) + + BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: float + """ + Base Frequency for ratings. + + Name: `BaseFreq` + Units: Hz + """ + + def _get_Enabled(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 43) != 0 + + def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 43, value, flags) + + Enabled = property(_get_Enabled, _set_Enabled) # type: bool + """ + Indicates whether this element is enabled. + + Name: `Enabled` + Default: True + """ + + def Like(self, value: AnyStr): + """ + Make like another object, e.g.: + + New Capacitor.C2 like=c1 ... + + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` + """ + self._set_string_o(44, value) + + +class Generic5Properties(TypedDict): + Phases: int + Bus1: AnyStr + kV: float + kW: float + PF: float + Conn: Union[AnyStr, int, enums.Connection] + kVA: float + P_Ref1kW: float + P_Ref2kW: float + P_Ref3kW: float + V_Ref1kVLN: float + V_Ref2kVLN: float + V_Ref3kVLN: float + P_RefkW: float + Q_RefkVAr: float + Cluster_Num: int + V_refkVLN: float + Ctrl_Mode: int + QV_flag: int + kcd: float + kcq: float + kqi: float + Q_ref1kvar: float + Q_ref2kvar: float + Q_ref3kvar: float + PMaxkW: float + PMinkW: float + PQPriority: int + PmppkW: float + Pfctr1: float + Pfctr2: float + Pfctr3: float + Pfctr4: float + Pfctr5: float + Pfctr6: float + PbiaskW: float + CC_Switch: bool + kcq_drp2: float + Volt_Trhd: float + Droop: int + Spectrum: Union[AnyStr, SpectrumObj] + BaseFreq: float + Enabled: bool + Like: AnyStr + +class Generic5Batch(DSSBatch, CircuitElementBatchMixin, PCElementBatchMixin): + _cls_name = 'Generic5' + _obj_cls = Generic5 + _cls_idx = 52 + __slots__ = [] + + def __init__(self, api_util, **kwargs): + DSSBatch.__init__(self, api_util, **kwargs) + CircuitElementBatchMixin.__init__(self) + PCElementBatchMixin.__init__(self) + + def edit(self, **kwargs: Unpack[Generic5BatchProperties]) -> Generic5Batch: + """ + Edit this Generic5 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. + + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the objects. + :return: Returns itself to allow call chaining. + """ + + self._edit(props=kwargs) + return self + + + if TYPE_CHECKING: + def __iter__(self) -> Iterator[Generic5]: + yield from DSSBatch.__iter__(self) + + def _get_Phases(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 1) + + def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(1, value, flags) + + Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy + """ + Number of Phases, this Induction Machine. + + Name: `Phases` + Default: 3 + """ + + def _get_Bus1(self) -> List[str]: + return self._get_batch_str_prop(2) + + def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(2, value, flags) + + Bus1 = property(_get_Bus1, _set_Bus1) # type: List[str] + """ + Bus to which the Induction Machine is connected. May include specific node specification. + + Name: `Bus1` + """ + + def _get_kV(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 3) + + def _set_kV(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(3, value, flags) + + kV = property(_get_kV, _set_kV) # type: BatchFloat64ArrayProxy + """ + Nominal rated (1.0 per unit) voltage, kV. For 2- and 3-phase machines, specify phase-phase kV. Otherwise, specify actual kV across each branch of the machine. If wye (star), specify phase-neutral kV. If delta or phase-phase connected, specify phase-phase kV. + + Name: `kV` + Default: 12.47 + """ + + def _get_kW(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 4) + + def _set_kW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(4, value, flags) + + kW = property(_get_kW, _set_kW) # type: BatchFloat64ArrayProxy + """ + Shaft Power, kW, for the Induction Machine. Output limit of a DG + + Name: `kW` + Default: -0.001 + """ + + def _get_PF(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 5) + + def _set_PF(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(5, value, flags) + + PF = property(_get_PF, _set_PF) # type: BatchFloat64ArrayProxy + """ + Present power factor for the machine. + + **Read-only** + + Name: `PF` + """ + + def _get_Conn(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 6) + + def _set_Conn(self, value: Union[AnyStr, int, enums.Connection, List[AnyStr], List[int], List[enums.Connection], Int32Array], flags: enums.SetterFlags = 0): + if isinstance(value, (str, bytes)) or (isinstance(value, LIST_LIKE) and isinstance(value[0], (str, bytes))): + self._set_batch_string(6, value, flags) + return + + self._set_batch_int32_array(6, value, flags) + + Conn = property(_get_Conn, _set_Conn) # type: BatchInt32ArrayProxy + """ + Connection of stator: Delta or Wye. Default is Delta. + + Name: `Conn` + Default: Delta + """ + + def _get_Conn_str(self) -> List[str]: + return self._get_batch_str_prop(6) + + def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_Conn(value, flags) + + Conn_str = property(_get_Conn_str, _set_Conn_str) # type: List[str] + """ + Connection of stator: Delta or Wye. Default is Delta. + + Name: `Conn` + Default: Delta + """ + + def _get_kVA(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 7) + + def _set_kVA(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(7, value, flags) + + kVA = property(_get_kVA, _set_kVA) # type: BatchFloat64ArrayProxy + """ + Rated kVA for the machine. + + Name: `kVA` + Default: -0.0012 + """ + + def _get_P_Ref1kW(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 8) + + def _set_P_Ref1kW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(8, value, flags) + + P_Ref1kW = property(_get_P_Ref1kW, _set_P_Ref1kW) # type: BatchFloat64ArrayProxy + """ + P_ref1kW = 10, goes to P_ref1, unit kW, 1st phase set power + + Name: `P_Ref1kW` + Default: 0.0 + """ + + def _get_P_Ref2kW(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 9) + + def _set_P_Ref2kW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(9, value, flags) + + P_Ref2kW = property(_get_P_Ref2kW, _set_P_Ref2kW) # type: BatchFloat64ArrayProxy + """ + P_ref2kW = 10, goes to P_ref2, unit kW, 2nd phase set power + + Name: `P_Ref2kW` + Default: 0.0 + """ + + def _get_P_Ref3kW(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 10) + + def _set_P_Ref3kW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(10, value, flags) + + P_Ref3kW = property(_get_P_Ref3kW, _set_P_Ref3kW) # type: BatchFloat64ArrayProxy + """ + P_ref3kW = 10, goes to P_ref3, unit kW, 3rd phase set power + + Name: `P_Ref3kW` + Default: 0.0 + """ + + def _get_V_Ref1kVLN(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 11) + + def _set_V_Ref1kVLN(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(11, value, flags) + + V_Ref1kVLN = property(_get_V_Ref1kVLN, _set_V_Ref1kVLN) # type: BatchFloat64ArrayProxy + """ + V_ref1kVLN = 2.16, 1st phase set V, (Unit kV, L-N value): V mode will work if QV_flag =1(by default) V_ref is set which is prior to Q_ref + + Name: `V_Ref1kVLN` + Default: 0.0 + """ + + def _get_V_Ref2kVLN(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 12) + + def _set_V_Ref2kVLN(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(12, value, flags) + + V_Ref2kVLN = property(_get_V_Ref2kVLN, _set_V_Ref2kVLN) # type: BatchFloat64ArrayProxy + """ + V_ref2kVLN = 2.16, 2nd phase set V, (Unit kV, L-N value): V mode will work if QV_flag =1(by default) V_ref is set which is prior to Q_ref + + Name: `V_Ref2kVLN` + Default: 0.0 + """ + + def _get_V_Ref3kVLN(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 13) + + def _set_V_Ref3kVLN(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(13, value, flags) + + V_Ref3kVLN = property(_get_V_Ref3kVLN, _set_V_Ref3kVLN) # type: BatchFloat64ArrayProxy + """ + V_ref3kVLN = 2.16, 3rd phase set V, (Unit kV, L-N value): V mode will work if QV_flag =1(by default) V_ref is set which is prior to Q_ref + + Name: `V_Ref3kVLN` + Default: 0.0 + """ + + def _get_P_RefkW(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 14) + + def _set_P_RefkW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(14, value, flags) + + P_RefkW = property(_get_P_RefkW, _set_P_RefkW) # type: BatchFloat64ArrayProxy + """ + P_refkW = 10, goes to P_ref. Ref P Value (kW). P_ref has priority to kW which is nominal value. (Incide variable P_ref is W) + + Name: `P_RefkW` + Default: 0.0 + """ + + def _get_Q_RefkVAr(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 15) + + def _set_Q_RefkVAr(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(15, value, flags) + + Q_RefkVAr = property(_get_Q_RefkVAr, _set_Q_RefkVAr) # type: BatchFloat64ArrayProxy + """ + Q_refkVAr=10. Unit Qvar. Ref Q kVAr Value: work only when V_ref is not set + + Name: `Q_RefkVAr` + Default: 0.0 + """ + + def _get_Cluster_Num(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 16) + + def _set_Cluster_Num(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(16, value, flags) + + Cluster_Num = property(_get_Cluster_Num, _set_Cluster_Num) # type: BatchInt32ArrayProxy + """ + Cluster_num: has to be coincident with Fmonitor attached. Default value is 0 + + Name: `Cluster_Num` + Default: 0 + """ + + def _get_V_refkVLN(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 17) + + def _set_V_refkVLN(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(17, value, flags) + + V_refkVLN = property(_get_V_refkVLN, _set_V_refkVLN) # type: BatchFloat64ArrayProxy + """ + V_refkVLN = 2.16, pos sequence set V. V_ref (Unit kV, L-N value): V mode will work if QV_flag =1(by default) V_ref is set which is prior to Q_ref + + Name: `V_refkVLN` + Default: 0.001 + """ + + def _get_Ctrl_Mode(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 18) + + def _set_Ctrl_Mode(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(18, value, flags) + + Ctrl_Mode = property(_get_Ctrl_Mode, _set_Ctrl_Mode) # type: BatchInt32ArrayProxy + """ + ctrl mode: /// contrl mode /// ctrl_mode =0; phases = 3; // pos avg control---p_ref, V_ref, Q_ref \\n + /// ctrl_mode =1; phases = 1; bus1 = 452.1; ---p_ref1, V_ref1, Q_ref1 \\n + /// ctrl_mode =2; phases = 1; bus1 = 452.2; ---p_ref2, V_ref2, Q_ref2 \\n + /// ctrl_mode =3; phases = 1; bus1 = 452.3; ---p_ref3, V_ref3, Q_ref3 \\n + /// ctrl_mode =4; phases = 3; bus1 = 452.2; ---p_ref1,2,3, V_ref1,2,3, Q_ref1,2,3 + + Name: `Ctrl_Mode` + Default: 0 + """ + + def _get_QV_flag(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 19) + + def _set_QV_flag(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(19, value, flags) + + QV_flag = property(_get_QV_flag, _set_QV_flag) # type: BatchInt32ArrayProxy + """ + QV_flag : 0-Q_ref mode; 1- V_ref mode + + Name: `QV_flag` + Default: 0 + """ + + def _get_kcd(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 20) + + def _set_kcd(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(20, value, flags) + + kcd = property(_get_kcd, _set_kcd) # type: BatchFloat64ArrayProxy + """ + kcd: Idi control gain + + Name: `kcd` + Default: 0.1 + """ + + def _get_kcq(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 21) + + def _set_kcq(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(21, value, flags) + + kcq = property(_get_kcq, _set_kcq) # type: BatchFloat64ArrayProxy + """ + kcq: Iqi control gain to delta V + + Name: `kcq` + Default: 0.1 + """ + + def _get_kqi(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 22) + + def _set_kqi(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(22, value, flags) + + kqi = property(_get_kqi, _set_kqi) # type: BatchFloat64ArrayProxy + """ + kqi: Iqi control gain to delta Q + + Name: `kqi` + Default: 0.1 + """ + + def _get_Q_ref1kvar(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 23) + + def _set_Q_ref1kvar(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(23, value, flags) + + Q_ref1kvar = property(_get_Q_ref1kvar, _set_Q_ref1kvar) # type: BatchFloat64ArrayProxy + """ + Q_ref1kVAr=10. Unit Qvar. Ref Q kVAr Value: work only when V_ref is not set + + Name: `Q_ref1kvar` + Default: 0.0 + """ + + def _get_Q_ref2kvar(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 24) + + def _set_Q_ref2kvar(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(24, value, flags) + + Q_ref2kvar = property(_get_Q_ref2kvar, _set_Q_ref2kvar) # type: BatchFloat64ArrayProxy + """ + Q_ref2kVAr=10. Unit Qvar. Ref Q kVAr Value: work only when V_ref is not set + + Name: `Q_ref2kvar` + Default: 0.0 + """ + + def _get_Q_ref3kvar(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 25) + + def _set_Q_ref3kvar(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(25, value, flags) + + Q_ref3kvar = property(_get_Q_ref3kvar, _set_Q_ref3kvar) # type: BatchFloat64ArrayProxy + """ + Q_ref3kVAr=10. Unit Qvar. Ref Q kVAr Value: work only when V_ref is not set + + Name: `Q_ref3kvar` + Default: 0.0 + """ + + def _get_PMaxkW(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 26) + + def _set_PMaxkW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(26, value, flags) + + PMaxkW = property(_get_PMaxkW, _set_PMaxkW) # type: BatchFloat64ArrayProxy + """ + PmaxkW = 100, goes to Pmax, unit kW, set max active power output; Operation limit of active power for DG + Pmax should be less than or equal to kW + + Name: `PMaxkW` + Default: -0.001 + """ + + def _get_PMinkW(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 27) + + def _set_PMinkW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(27, value, flags) + + PMinkW = property(_get_PMinkW, _set_PMinkW) # type: BatchFloat64ArrayProxy + """ + PminkW = 10, goes to Pmin, unit kW; Operation limit of active power for DG + + Name: `PMinkW` + Default: 0.0 + """ + + def _get_PQPriority(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 28) + + def _set_PQPriority(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(28, value, flags) + + PQPriority = property(_get_PQPriority, _set_PQPriority) # type: BatchInt32ArrayProxy + """ + PQpriority, goes to PQpriority, define how to set Qmax. 0: Q,1: P + + Name: `PQPriority` + Default: 1 + """ + + def _get_PmppkW(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 29) + + def _set_PmppkW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(29, value, flags) + + PmppkW = property(_get_PmppkW, _set_PmppkW) # type: BatchFloat64ArrayProxy + """ + PmppkW = 100, goes to Pmpp, unit kW, input Pmpp to calculate kW; + kW := (Pmpp + Pbias)*Pfctr1*Pfctr2*Pfctr3*Pfctr4*Pfctr5*Pfctr6; + Pbias = 0 by default, Pfctr*=1 by default; These properties will overwrite kW. + + Name: `PmppkW` + Default: 0.001 + """ + + def _get_Pfctr1(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 30) + + def _set_Pfctr1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(30, value, flags) + + Pfctr1 = property(_get_Pfctr1, _set_Pfctr1) # type: BatchFloat64ArrayProxy + """ + Pfctr1 = 0.16, see PmppkW + + Name: `Pfctr1` + Default: 1.0 + """ + + def _get_Pfctr2(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 31) + + def _set_Pfctr2(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(31, value, flags) + + Pfctr2 = property(_get_Pfctr2, _set_Pfctr2) # type: BatchFloat64ArrayProxy + """ + Pfctr2 = 1, 1 by default, see PmppkW + + Name: `Pfctr2` + Default: 1.0 + """ + + def _get_Pfctr3(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 32) + + def _set_Pfctr3(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(32, value, flags) + + Pfctr3 = property(_get_Pfctr3, _set_Pfctr3) # type: BatchFloat64ArrayProxy + """ + Pfctr3 = 1, 1 by default, see PmppkW + + Name: `Pfctr3` + Default: 1.0 + """ + + def _get_Pfctr4(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 33) + + def _set_Pfctr4(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(33, value, flags) + + Pfctr4 = property(_get_Pfctr4, _set_Pfctr4) # type: BatchFloat64ArrayProxy + """ + Pfctr4= 1, 1 by default, see PmppkW + + Name: `Pfctr4` + Default: 1.0 + """ + + def _get_Pfctr5(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 34) + + def _set_Pfctr5(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(34, value, flags) + + Pfctr5 = property(_get_Pfctr5, _set_Pfctr5) # type: BatchFloat64ArrayProxy + """ + Pfctr5 =1, 1 by default, see PmppkW + + Name: `Pfctr5` + Default: 1.0 + """ + + def _get_Pfctr6(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 35) + + def _set_Pfctr6(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(35, value, flags) + + Pfctr6 = property(_get_Pfctr6, _set_Pfctr6) # type: BatchFloat64ArrayProxy + """ + Pfctr6 = 1, 1 by default, see PmppkW + + Name: `Pfctr6` + Default: 1.0 + """ + + def _get_PbiaskW(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 36) + + def _set_PbiaskW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(36, value, flags) + + PbiaskW = property(_get_PbiaskW, _set_PbiaskW) # type: BatchFloat64ArrayProxy + """ + Pbias = -0.1, 0 by default, see PmppkW + + Name: `PbiaskW` + Default: 0.0 + """ + + def _get_CC_Switch(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(37) + ] + + def _set_CC_Switch(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(37, value, flags) + + CC_Switch = property(_get_CC_Switch, _set_CC_Switch) # type: List[bool] + """ + CC_Switch: default value is false. + CC_Switch = true --cooperate control on + CC_Switch = false -- cooperate control off + + Name: `CC_Switch` + Default: False + """ + + def _get_kcq_drp2(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 38) + + def _set_kcq_drp2(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(38, value, flags) + + kcq_drp2 = property(_get_kcq_drp2, _set_kcq_drp2) # type: BatchFloat64ArrayProxy + """ + kcq_drp2. the droop gain: 0.0~0.1 + + Name: `kcq_drp2` + Default: 0.0 + """ + + def _get_Volt_Trhd(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 39) + + def _set_Volt_Trhd(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(39, value, flags) + + Volt_Trhd = property(_get_Volt_Trhd, _set_Volt_Trhd) # type: BatchFloat64ArrayProxy + """ + Volt_Trhd. 0.~0.05. 0 means v has to follow v_ref + + Name: `Volt_Trhd` + Default: 0.0 + """ + + def _get_Droop(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 40) + + def _set_Droop(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(40, value, flags) + + Droop = property(_get_Droop, _set_Droop) # type: BatchInt32ArrayProxy + """ + droop type: integer: 2- Q = kcq_drp2 * (1-v_dg). others: integral droop with kcq. + + Name: `Droop` + Default: 0 + """ + + def _get_Spectrum_str(self) -> List[str]: + return self._get_batch_str_prop(41) + + def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(41, value, flags) + + Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] + """ + Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. Current injection for inverter. + + Name: `Spectrum` + Default: default + """ + + def _get_Spectrum(self) -> List[SpectrumObj]: + return self._get_batch_obj_prop(41) + + def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[SpectrumObj]], flags: enums.SetterFlags = 0): + self._set_batch_obj_prop(41, value, flags) + + Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] + """ + Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. Current injection for inverter. + + Name: `Spectrum` + Default: default + """ + + def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 42) + + def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(42, value, flags) + + BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: BatchFloat64ArrayProxy + """ + Base Frequency for ratings. + + Name: `BaseFreq` + Units: Hz + """ + + def _get_Enabled(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(43) + ] + + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(43, value, flags) + + Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] + """ + Indicates whether this element is enabled. + + Name: `Enabled` + Default: True + """ + + def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): + """ + Make like another object, e.g.: + + New Capacitor.C2 like=c1 ... + + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` + """ + self._set_batch_string(44, value, flags) + +class Generic5BatchProperties(TypedDict): + Phases: Union[int, Int32Array] + Bus1: Union[AnyStr, List[AnyStr]] + kV: Union[float, Float64Array] + kW: Union[float, Float64Array] + PF: Union[float, Float64Array] + Conn: Union[AnyStr, int, enums.Connection, List[AnyStr], List[int], List[enums.Connection], Int32Array] + kVA: Union[float, Float64Array] + P_Ref1kW: Union[float, Float64Array] + P_Ref2kW: Union[float, Float64Array] + P_Ref3kW: Union[float, Float64Array] + V_Ref1kVLN: Union[float, Float64Array] + V_Ref2kVLN: Union[float, Float64Array] + V_Ref3kVLN: Union[float, Float64Array] + P_RefkW: Union[float, Float64Array] + Q_RefkVAr: Union[float, Float64Array] + Cluster_Num: Union[int, Int32Array] + V_refkVLN: Union[float, Float64Array] + Ctrl_Mode: Union[int, Int32Array] + QV_flag: Union[int, Int32Array] + kcd: Union[float, Float64Array] + kcq: Union[float, Float64Array] + kqi: Union[float, Float64Array] + Q_ref1kvar: Union[float, Float64Array] + Q_ref2kvar: Union[float, Float64Array] + Q_ref3kvar: Union[float, Float64Array] + PMaxkW: Union[float, Float64Array] + PMinkW: Union[float, Float64Array] + PQPriority: Union[int, Int32Array] + PmppkW: Union[float, Float64Array] + Pfctr1: Union[float, Float64Array] + Pfctr2: Union[float, Float64Array] + Pfctr3: Union[float, Float64Array] + Pfctr4: Union[float, Float64Array] + Pfctr5: Union[float, Float64Array] + Pfctr6: Union[float, Float64Array] + PbiaskW: Union[float, Float64Array] + CC_Switch: bool + kcq_drp2: Union[float, Float64Array] + Volt_Trhd: Union[float, Float64Array] + Droop: Union[int, Int32Array] + Spectrum: Union[AnyStr, SpectrumObj, List[AnyStr], List[SpectrumObj]] + BaseFreq: Union[float, Float64Array] + Enabled: bool + Like: AnyStr + +#TODO: warn that begin_edit=False with extra params will be ignored? + +class IGeneric5(IDSSObj, Generic5Batch): + __slots__ = IDSSObj._extra_slots + + def __init__(self, iobj): + IDSSObj.__init__(self, iobj, Generic5, Generic5Batch) + Generic5Batch.__init__(self, self._api_util, sync_cls_idx=Generic5._cls_idx) + + if TYPE_CHECKING: + def __getitem__(self, name_or_idx: Union[AnyStr, int]) -> Generic5: + return self.find(name_or_idx) + + def batch(self, **kwargs) -> Generic5Batch: #TODO: add annotation to kwargs (specialized typed dict) + """ + Creates a new batch handler of (existing) Generic5 objects + """ + return self._batch_cls(self._api_util, **kwargs) + + def __iter__(self) -> Iterator[Generic5]: + yield from Generic5Batch.__iter__(self) + + + def new(self, name: AnyStr, *, begin_edit: Optional[bool] = None, activate=False, **kwargs: Unpack[Generic5Properties]) -> Generic5: + """ + Creates a new Generic5. + + :param name: The object's name is a required positional argument. + + :param 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). + + :param 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 an `end_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. + + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the object. + :return: 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. + """ + return self._new(name, begin_edit=begin_edit, activate=activate, props=kwargs) + + def batch_new(self, names: Optional[List[AnyStr]] = None, *, df = None, count: Optional[int] = None, begin_edit: Optional[bool] = None, **kwargs: Unpack[Generic5BatchProperties]) -> Generic5Batch: + """ + Creates a new batch of Generic5 objects + + Either `names`, `count` or `df` is required. + + :param begin_edit: The argument `begin_edit` indicates if the user want to leave the elements in the edit state, and requires a call to `end_edit()` or equivalent. The default `begin_edit` is set to `None`. With `None`, the behavior will be adjusted according the default of how the batch is created. + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the object. + :param names: When using a list of names, each new object will match the names from this list. `begin_edit` defaults to `True` if no arguments for properties were passed, `False` otherwise. + :param count: When using `count`, new objects will be created with based on a random prefix, with an increasing integer up to `count`. `begin_edit` defaults to `True` if no arguments for properties were passed, `False` otherwise. + :param df: Currently **EXPERIMENTAL AND LIMITED**, tries to get the columns from a dataframe to populate the names and the DSS properties. `begin_edit` defaults to `False`. + :return: 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. + """ + return self._batch_new_aux(names=names, df=df, count=count, begin_edit=begin_edit, props=kwargs) diff --git a/altdss/GrowthShape.py b/altdss/GrowthShape.py index 85b040d..11ef20c 100644 --- a/altdss/GrowthShape.py +++ b/altdss/GrowthShape.py @@ -56,7 +56,7 @@ def _set_NPts(self, value: int, flags: enums.SetterFlags = 0): """ Number of points to expect in subsequent vector. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_Year(self) -> Float64Array: @@ -69,7 +69,7 @@ def _set_Year(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Array of year values, or a text file spec, corresponding to the multipliers. Enter only those years where the growth changes. May be any integer sequence -- just so it is consistent. See help on Mult. - DSS property name: `Year`, DSS property index: 2. + Name: `Year` """ def _get_Mult(self) -> Float64Array: @@ -89,7 +89,7 @@ def _set_Mult(self, value: Float64Array, flags: enums.SetterFlags = 0): Text files contain one value per line. - DSS property name: `Mult`, DSS property index: 3. + Name: `Mult` """ def _get_CSVFile(self) -> str: @@ -102,7 +102,7 @@ def _set_CSVFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of growth curve data to a csv file containing (year, mult) points, one per line. - DSS property name: `CSVFile`, DSS property index: 4. + Name: `CSVFile` """ def _get_SngFile(self) -> str: @@ -115,7 +115,7 @@ def _set_SngFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of growth curve data to a binary file of singles containing (year, mult) points, packed one after another. - DSS property name: `SngFile`, DSS property index: 5. + Name: `SngFile` """ def _get_DblFile(self) -> str: @@ -128,7 +128,7 @@ def _set_DblFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of growth curve data to a binary file of doubles containing (year, mult) points, packed one after another. - DSS property name: `DblFile`, DSS property index: 6. + Name: `DblFile` """ def Like(self, value: AnyStr): @@ -137,7 +137,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 7. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(7, value) @@ -189,7 +191,7 @@ def _set_NPts(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0) """ Number of points to expect in subsequent vector. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_Year(self) -> List[Float64Array]: @@ -205,7 +207,7 @@ def _set_Year(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Array of year values, or a text file spec, corresponding to the multipliers. Enter only those years where the growth changes. May be any integer sequence -- just so it is consistent. See help on Mult. - DSS property name: `Year`, DSS property index: 2. + Name: `Year` """ def _get_Mult(self) -> List[Float64Array]: @@ -228,7 +230,7 @@ def _set_Mult(self, value: Union[Float64Array, List[Float64Array]], flags: enums Text files contain one value per line. - DSS property name: `Mult`, DSS property index: 3. + Name: `Mult` """ def _get_CSVFile(self) -> List[str]: @@ -241,7 +243,7 @@ def _set_CSVFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of growth curve data to a csv file containing (year, mult) points, one per line. - DSS property name: `CSVFile`, DSS property index: 4. + Name: `CSVFile` """ def _get_SngFile(self) -> List[str]: @@ -254,7 +256,7 @@ def _set_SngFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of growth curve data to a binary file of singles containing (year, mult) points, packed one after another. - DSS property name: `SngFile`, DSS property index: 5. + Name: `SngFile` """ def _get_DblFile(self) -> List[str]: @@ -267,7 +269,7 @@ def _set_DblFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of growth curve data to a binary file of doubles containing (year, mult) points, packed one after another. - DSS property name: `DblFile`, DSS property index: 6. + Name: `DblFile` """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -276,7 +278,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 7. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(7, value, flags) diff --git a/altdss/IndMach012.py b/altdss/IndMach012.py index 1caee36..c8738c2 100644 --- a/altdss/IndMach012.py +++ b/altdss/IndMach012.py @@ -17,7 +17,7 @@ class IndMach012(DSSObj, CircuitElementMixin, PCElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PCElementMixin._extra_slots _cls_name = 'IndMach012' - _cls_idx = 39 + _cls_idx = 40 _cls_int_idx = { 1, 6, @@ -101,7 +101,8 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): """ Number of Phases, this Induction Machine. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Bus1(self) -> str: @@ -114,7 +115,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Bus to which the Induction Machine is connected. May include specific node specification. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kV(self) -> float: @@ -127,7 +128,9 @@ def _set_kV(self, value: float, flags: enums.SetterFlags = 0): """ Nominal rated (1.0 per unit) voltage, kV. For 2- and 3-phase machines, specify phase-phase kV. Otherwise, specify actual kV across each branch of the machine. If wye (star), specify phase-neutral kV. If delta or phase-phase connected, specify phase-phase kV. - DSS property name: `kV`, DSS property index: 3. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_kW(self) -> float: @@ -141,7 +144,8 @@ def _set_kW(self, value: float, flags: enums.SetterFlags = 0): Shaft Power, kW, for the Induction Machine. A positive value denotes power for a load. Negative value denotes an induction generator. - DSS property name: `kW`, DSS property index: 4. + Name: `kW` + Default: 1000.0 """ def _get_PF(self) -> float: @@ -152,9 +156,11 @@ def _set_PF(self, value: float, flags: enums.SetterFlags = 0): PF = property(_get_PF, _set_PF) # type: float """ - [Read Only] Present power factor for the machine. + Present power factor for the machine. - DSS property name: `PF`, DSS property index: 5. + **Read-only** + + Name: `PF` """ def _get_Conn(self) -> enums.Connection: @@ -170,7 +176,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection], flags: enums.Se """ Connection of stator: Delta or Wye. Default is Delta. - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Delta """ def _get_Conn_str(self) -> str: @@ -183,7 +190,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Connection of stator: Delta or Wye. Default is Delta. - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Delta """ def _get_kVA(self) -> float: @@ -196,7 +204,8 @@ def _set_kVA(self, value: float, flags: enums.SetterFlags = 0): """ Rated kVA for the machine. - DSS property name: `kVA`, DSS property index: 7. + Name: `kVA` + Default: 1200.0 """ def _get_H(self) -> float: @@ -207,9 +216,10 @@ def _set_H(self, value: float, flags: enums.SetterFlags = 0): H = property(_get_H, _set_H) # type: float """ - Per unit mass constant of the machine. MW-sec/MVA. Default is 1.0. + Per unit mass constant of the machine. MW-sec/MVA. - DSS property name: `H`, DSS property index: 8. + Name: `H` + Default: 1.0 """ def _get_D(self) -> float: @@ -220,9 +230,10 @@ def _set_D(self, value: float, flags: enums.SetterFlags = 0): D = property(_get_D, _set_D) # type: float """ - Damping constant. Usual range is 0 to 4. Default is 1.0. Adjust to get damping in Dynamics mode, + Damping constant. Usual range is 0 to 4. Adjust to get damping in Dynamics mode, - DSS property name: `D`, DSS property index: 9. + Name: `D` + Default: 1.0 """ def _get_puRs(self) -> float: @@ -233,9 +244,10 @@ def _set_puRs(self, value: float, flags: enums.SetterFlags = 0): puRs = property(_get_puRs, _set_puRs) # type: float """ - Per unit stator resistance. Default is 0.0053. + Per unit stator resistance. - DSS property name: `puRs`, DSS property index: 10. + Name: `puRs` + Default: 0.0053 """ def _get_puXs(self) -> float: @@ -246,9 +258,10 @@ def _set_puXs(self, value: float, flags: enums.SetterFlags = 0): puXs = property(_get_puXs, _set_puXs) # type: float """ - Per unit stator leakage reactance. Default is 0.106. + Per unit stator leakage reactance. - DSS property name: `puXs`, DSS property index: 11. + Name: `puXs` + Default: 0.106 """ def _get_puRr(self) -> float: @@ -259,9 +272,10 @@ def _set_puRr(self, value: float, flags: enums.SetterFlags = 0): puRr = property(_get_puRr, _set_puRr) # type: float """ - Per unit rotor resistance. Default is 0.007. + Per unit rotor resistance. - DSS property name: `puRr`, DSS property index: 12. + Name: `puRr` + Default: 0.007 """ def _get_puXr(self) -> float: @@ -272,9 +286,10 @@ def _set_puXr(self, value: float, flags: enums.SetterFlags = 0): puXr = property(_get_puXr, _set_puXr) # type: float """ - Per unit rotor leakage reactance. Default is 0.12. + Per unit rotor leakage reactance. - DSS property name: `puXr`, DSS property index: 13. + Name: `puXr` + Default: 0.12 """ def _get_puXm(self) -> float: @@ -285,9 +300,10 @@ def _set_puXm(self, value: float, flags: enums.SetterFlags = 0): puXm = property(_get_puXm, _set_puXm) # type: float """ - Per unit magnetizing reactance.Default is 4.0. + Per unit magnetizing reactance. - DSS property name: `puXm`, DSS property index: 14. + Name: `puXm` + Default: 4.0 """ def _get_Slip(self) -> float: @@ -298,9 +314,10 @@ def _set_Slip(self, value: float, flags: enums.SetterFlags = 0): Slip = property(_get_Slip, _set_Slip) # type: float """ - Initial slip value. Default is 0.007 + Initial slip value. - DSS property name: `Slip`, DSS property index: 15. + Name: `Slip` + Default: 0.007 """ def _get_MaxSlip(self) -> float: @@ -311,9 +328,10 @@ def _set_MaxSlip(self, value: float, flags: enums.SetterFlags = 0): MaxSlip = property(_get_MaxSlip, _set_MaxSlip) # type: float """ - Max slip value to allow. Default is 0.1. Set this before setting slip. + Max slip value to allow. Set this before setting slip. - DSS property name: `MaxSlip`, DSS property index: 16. + Name: `MaxSlip` + Default: 0.1 """ def _get_SlipOption(self) -> enums.IndMach012SlipOption: @@ -327,9 +345,10 @@ def _set_SlipOption(self, value: Union[AnyStr, int, enums.IndMach012SlipOption], SlipOption = property(_get_SlipOption, _set_SlipOption) # type: enums.IndMach012SlipOption """ - Option for slip model. One of {fixedslip | variableslip* } + Option for slip model. - DSS property name: `SlipOption`, DSS property index: 17. + Name: `SlipOption` + Default: VariableSlip """ def _get_SlipOption_str(self) -> str: @@ -340,9 +359,10 @@ def _set_SlipOption_str(self, value: AnyStr, flags: enums.SetterFlags = 0): SlipOption_str = property(_get_SlipOption_str, _set_SlipOption_str) # type: str """ - Option for slip model. One of {fixedslip | variableslip* } + Option for slip model. - DSS property name: `SlipOption`, DSS property index: 17. + Name: `SlipOption` + Default: VariableSlip """ def _get_Yearly_str(self) -> str: @@ -355,7 +375,7 @@ def _set_Yearly_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ LOADSHAPE object to use for yearly simulations. Must be previously defined as a Loadshape object. Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. The default is no variation. - DSS property name: `Yearly`, DSS property index: 18. + Name: `Yearly` """ def _get_Yearly(self) -> LoadShape: @@ -372,7 +392,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags """ LOADSHAPE object to use for yearly simulations. Must be previously defined as a Loadshape object. Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. The default is no variation. - DSS property name: `Yearly`, DSS property index: 18. + Name: `Yearly` """ def _get_Daily_str(self) -> str: @@ -385,7 +405,7 @@ def _set_Daily_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ LOADSHAPE object to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. Default is no variation (constant) if not defined. Side effect: Sets Yearly load shape if not already defined. - DSS property name: `Daily`, DSS property index: 19. + Name: `Daily` """ def _get_Daily(self) -> LoadShape: @@ -402,7 +422,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ LOADSHAPE object to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. Default is no variation (constant) if not defined. Side effect: Sets Yearly load shape if not already defined. - DSS property name: `Daily`, DSS property index: 19. + Name: `Daily` """ def _get_Duty_str(self) -> str: @@ -415,7 +435,7 @@ def _set_Duty_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ LOADSHAPE object to use for duty cycle simulations. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr. 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.Set to NONE to reset to no loadshape. Set Status=Fixed to ignore Loadshape designation. Defaults to Daily curve If not specified. - DSS property name: `Duty`, DSS property index: 20. + Name: `Duty` """ def _get_Duty(self) -> LoadShape: @@ -432,7 +452,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ LOADSHAPE object to use for duty cycle simulations. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr. 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.Set to NONE to reset to no loadshape. Set Status=Fixed to ignore Loadshape designation. Defaults to Daily curve If not specified. - DSS property name: `Duty`, DSS property index: 20. + Name: `Duty` """ def _get_DebugTrace(self) -> bool: @@ -443,9 +463,10 @@ def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: bool """ - [Yes | No*] Write DebugTrace file. + Write DebugTrace file. - DSS property name: `DebugTrace`, DSS property index: 21. + Name: `DebugTrace` + Default: False """ def _get_Spectrum_str(self) -> str: @@ -456,9 +477,10 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str """ - Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. Current injection for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. - DSS property name: `Spectrum`, DSS property index: 22. + Name: `Spectrum` + Default: default """ def _get_Spectrum(self) -> SpectrumObj: @@ -473,9 +495,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj """ - Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. Current injection for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. - DSS property name: `Spectrum`, DSS property index: 22. + Name: `Spectrum` + Default: default """ def _get_BaseFreq(self) -> float: @@ -488,7 +511,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 23. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -499,9 +523,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 24. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -510,7 +535,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 25. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(25, value) @@ -545,7 +572,7 @@ class IndMach012Properties(TypedDict): class IndMach012Batch(DSSBatch, CircuitElementBatchMixin, PCElementBatchMixin): _cls_name = 'IndMach012' _obj_cls = IndMach012 - _cls_idx = 39 + _cls_idx = 40 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -584,7 +611,8 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of Phases, this Induction Machine. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Bus1(self) -> List[str]: @@ -597,7 +625,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Bus to which the Induction Machine is connected. May include specific node specification. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kV(self) -> BatchFloat64ArrayProxy: @@ -610,7 +638,9 @@ def _set_kV(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Nominal rated (1.0 per unit) voltage, kV. For 2- and 3-phase machines, specify phase-phase kV. Otherwise, specify actual kV across each branch of the machine. If wye (star), specify phase-neutral kV. If delta or phase-phase connected, specify phase-phase kV. - DSS property name: `kV`, DSS property index: 3. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_kW(self) -> BatchFloat64ArrayProxy: @@ -624,7 +654,8 @@ def _set_kW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = Shaft Power, kW, for the Induction Machine. A positive value denotes power for a load. Negative value denotes an induction generator. - DSS property name: `kW`, DSS property index: 4. + Name: `kW` + Default: 1000.0 """ def _get_PF(self) -> BatchFloat64ArrayProxy: @@ -635,9 +666,11 @@ def _set_PF(self, value: Union[float, Float64Array], flags: enums.SetterFlags = PF = property(_get_PF, _set_PF) # type: BatchFloat64ArrayProxy """ - [Read Only] Present power factor for the machine. + Present power factor for the machine. + + **Read-only** - DSS property name: `PF`, DSS property index: 5. + Name: `PF` """ def _get_Conn(self) -> BatchInt32ArrayProxy: @@ -654,7 +687,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection, List[AnyStr], Li """ Connection of stator: Delta or Wye. Default is Delta. - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Delta """ def _get_Conn_str(self) -> List[str]: @@ -667,7 +701,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Connection of stator: Delta or Wye. Default is Delta. - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Delta """ def _get_kVA(self) -> BatchFloat64ArrayProxy: @@ -680,7 +715,8 @@ def _set_kVA(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Rated kVA for the machine. - DSS property name: `kVA`, DSS property index: 7. + Name: `kVA` + Default: 1200.0 """ def _get_H(self) -> BatchFloat64ArrayProxy: @@ -691,9 +727,10 @@ def _set_H(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 H = property(_get_H, _set_H) # type: BatchFloat64ArrayProxy """ - Per unit mass constant of the machine. MW-sec/MVA. Default is 1.0. + Per unit mass constant of the machine. MW-sec/MVA. - DSS property name: `H`, DSS property index: 8. + Name: `H` + Default: 1.0 """ def _get_D(self) -> BatchFloat64ArrayProxy: @@ -704,9 +741,10 @@ def _set_D(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 D = property(_get_D, _set_D) # type: BatchFloat64ArrayProxy """ - Damping constant. Usual range is 0 to 4. Default is 1.0. Adjust to get damping in Dynamics mode, + Damping constant. Usual range is 0 to 4. Adjust to get damping in Dynamics mode, - DSS property name: `D`, DSS property index: 9. + Name: `D` + Default: 1.0 """ def _get_puRs(self) -> BatchFloat64ArrayProxy: @@ -717,9 +755,10 @@ def _set_puRs(self, value: Union[float, Float64Array], flags: enums.SetterFlags puRs = property(_get_puRs, _set_puRs) # type: BatchFloat64ArrayProxy """ - Per unit stator resistance. Default is 0.0053. + Per unit stator resistance. - DSS property name: `puRs`, DSS property index: 10. + Name: `puRs` + Default: 0.0053 """ def _get_puXs(self) -> BatchFloat64ArrayProxy: @@ -730,9 +769,10 @@ def _set_puXs(self, value: Union[float, Float64Array], flags: enums.SetterFlags puXs = property(_get_puXs, _set_puXs) # type: BatchFloat64ArrayProxy """ - Per unit stator leakage reactance. Default is 0.106. + Per unit stator leakage reactance. - DSS property name: `puXs`, DSS property index: 11. + Name: `puXs` + Default: 0.106 """ def _get_puRr(self) -> BatchFloat64ArrayProxy: @@ -743,9 +783,10 @@ def _set_puRr(self, value: Union[float, Float64Array], flags: enums.SetterFlags puRr = property(_get_puRr, _set_puRr) # type: BatchFloat64ArrayProxy """ - Per unit rotor resistance. Default is 0.007. + Per unit rotor resistance. - DSS property name: `puRr`, DSS property index: 12. + Name: `puRr` + Default: 0.007 """ def _get_puXr(self) -> BatchFloat64ArrayProxy: @@ -756,9 +797,10 @@ def _set_puXr(self, value: Union[float, Float64Array], flags: enums.SetterFlags puXr = property(_get_puXr, _set_puXr) # type: BatchFloat64ArrayProxy """ - Per unit rotor leakage reactance. Default is 0.12. + Per unit rotor leakage reactance. - DSS property name: `puXr`, DSS property index: 13. + Name: `puXr` + Default: 0.12 """ def _get_puXm(self) -> BatchFloat64ArrayProxy: @@ -769,9 +811,10 @@ def _set_puXm(self, value: Union[float, Float64Array], flags: enums.SetterFlags puXm = property(_get_puXm, _set_puXm) # type: BatchFloat64ArrayProxy """ - Per unit magnetizing reactance.Default is 4.0. + Per unit magnetizing reactance. - DSS property name: `puXm`, DSS property index: 14. + Name: `puXm` + Default: 4.0 """ def _get_Slip(self) -> BatchFloat64ArrayProxy: @@ -782,9 +825,10 @@ def _set_Slip(self, value: Union[float, Float64Array], flags: enums.SetterFlags Slip = property(_get_Slip, _set_Slip) # type: BatchFloat64ArrayProxy """ - Initial slip value. Default is 0.007 + Initial slip value. - DSS property name: `Slip`, DSS property index: 15. + Name: `Slip` + Default: 0.007 """ def _get_MaxSlip(self) -> BatchFloat64ArrayProxy: @@ -795,9 +839,10 @@ def _set_MaxSlip(self, value: Union[float, Float64Array], flags: enums.SetterFla MaxSlip = property(_get_MaxSlip, _set_MaxSlip) # type: BatchFloat64ArrayProxy """ - Max slip value to allow. Default is 0.1. Set this before setting slip. + Max slip value to allow. Set this before setting slip. - DSS property name: `MaxSlip`, DSS property index: 16. + Name: `MaxSlip` + Default: 0.1 """ def _get_SlipOption(self) -> BatchInt32ArrayProxy: @@ -812,9 +857,10 @@ def _set_SlipOption(self, value: Union[AnyStr, int, enums.IndMach012SlipOption, SlipOption = property(_get_SlipOption, _set_SlipOption) # type: BatchInt32ArrayProxy """ - Option for slip model. One of {fixedslip | variableslip* } + Option for slip model. - DSS property name: `SlipOption`, DSS property index: 17. + Name: `SlipOption` + Default: VariableSlip """ def _get_SlipOption_str(self) -> List[str]: @@ -825,9 +871,10 @@ def _set_SlipOption_str(self, value: AnyStr, flags: enums.SetterFlags = 0): SlipOption_str = property(_get_SlipOption_str, _set_SlipOption_str) # type: List[str] """ - Option for slip model. One of {fixedslip | variableslip* } + Option for slip model. - DSS property name: `SlipOption`, DSS property index: 17. + Name: `SlipOption` + Default: VariableSlip """ def _get_Yearly_str(self) -> List[str]: @@ -840,7 +887,7 @@ def _set_Yearly_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ LOADSHAPE object to use for yearly simulations. Must be previously defined as a Loadshape object. Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. The default is no variation. - DSS property name: `Yearly`, DSS property index: 18. + Name: `Yearly` """ def _get_Yearly(self) -> List[LoadShape]: @@ -853,7 +900,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadSha """ LOADSHAPE object to use for yearly simulations. Must be previously defined as a Loadshape object. Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. The default is no variation. - DSS property name: `Yearly`, DSS property index: 18. + Name: `Yearly` """ def _get_Daily_str(self) -> List[str]: @@ -866,7 +913,7 @@ def _set_Daily_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ LOADSHAPE object to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. Default is no variation (constant) if not defined. Side effect: Sets Yearly load shape if not already defined. - DSS property name: `Daily`, DSS property index: 19. + Name: `Daily` """ def _get_Daily(self) -> List[LoadShape]: @@ -879,7 +926,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShap """ LOADSHAPE object to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. Default is no variation (constant) if not defined. Side effect: Sets Yearly load shape if not already defined. - DSS property name: `Daily`, DSS property index: 19. + Name: `Daily` """ def _get_Duty_str(self) -> List[str]: @@ -892,7 +939,7 @@ def _set_Duty_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ LOADSHAPE object to use for duty cycle simulations. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr. 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.Set to NONE to reset to no loadshape. Set Status=Fixed to ignore Loadshape designation. Defaults to Daily curve If not specified. - DSS property name: `Duty`, DSS property index: 20. + Name: `Duty` """ def _get_Duty(self) -> List[LoadShape]: @@ -905,7 +952,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape """ LOADSHAPE object to use for duty cycle simulations. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr. 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.Set to NONE to reset to no loadshape. Set Status=Fixed to ignore Loadshape designation. Defaults to Daily curve If not specified. - DSS property name: `Duty`, DSS property index: 20. + Name: `Duty` """ def _get_DebugTrace(self) -> List[bool]: @@ -913,14 +960,15 @@ def _get_DebugTrace(self) -> List[bool]: self._get_batch_int32_prop(21) ] - def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): + def _set_DebugTrace(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(21, value, flags) DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: List[bool] """ - [Yes | No*] Write DebugTrace file. + Write DebugTrace file. - DSS property name: `DebugTrace`, DSS property index: 21. + Name: `DebugTrace` + Default: False """ def _get_Spectrum_str(self) -> List[str]: @@ -931,9 +979,10 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] """ - Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. Current injection for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. - DSS property name: `Spectrum`, DSS property index: 22. + Name: `Spectrum` + Default: default """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -944,9 +993,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] """ - Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. Current injection for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this IndMach012. Voltage behind Xd" for machine - default. - DSS property name: `Spectrum`, DSS property index: 22. + Name: `Spectrum` + Default: default """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -959,7 +1009,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 23. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -967,14 +1018,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(24) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(24, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 24. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -983,7 +1035,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 25. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(25, value, flags) diff --git a/altdss/InvControl.py b/altdss/InvControl.py index fea0514..e704f30 100644 --- a/altdss/InvControl.py +++ b/altdss/InvControl.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -15,7 +15,7 @@ class InvControl(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'InvControl' - _cls_idx = 42 + _cls_idx = 43 _cls_int_idx = { 2, 3, @@ -27,8 +27,8 @@ class InvControl(DSSObj, CircuitElementMixin): 22, 23, 25, - 34, - 36, + 33, + 35, } _cls_float_idx = { 5, @@ -43,8 +43,8 @@ class InvControl(DSSObj, CircuitElementMixin): 20, 21, 24, - 33, - 35, + 32, + 34, } _cls_prop_idx = { 'derlist': 1, @@ -77,13 +77,12 @@ class InvControl(DSSObj, CircuitElementMixin): 'voltwattch_curve': 28, 'wattpf_curve': 29, 'wattvar_curve': 30, - 'vv_refreactivepower': 31, - 'pvsystemlist': 32, - 'vsetpoint': 33, - 'controlmodel': 34, - 'basefreq': 35, - 'enabled': 36, - 'like': 37, + 'pvsystemlist': 31, + 'vsetpoint': 32, + 'controlmodel': 33, + 'basefreq': 34, + 'enabled': 35, + 'like': 36, } def __init__(self, api_util, ptr): @@ -121,7 +120,9 @@ def _set_DERList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): No capability of hierarchical control between two controls for a single element is implemented at this time. - DSS property name: `DERList`, DSS property index: 1. + For DSS scripts, provide the full names, e.g. `DERList=[PVSystem.pv1, Storage.bat1]`. + + Name: `DERList` """ def _get_Mode(self) -> enums.InvControlControlMode: @@ -155,7 +156,8 @@ def _set_Mode(self, value: Union[AnyStr, int, enums.InvControlControlMode], flag NO DEFAULT - DSS property name: `Mode`, DSS property index: 2. + Name: `Mode` + Default: None """ def _get_Mode_str(self) -> str: @@ -186,7 +188,8 @@ def _set_Mode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): NO DEFAULT - DSS property name: `Mode`, DSS property index: 2. + Name: `Mode` + Default: None """ def _get_CombiMode(self) -> enums.InvControlCombiMode: @@ -209,7 +212,8 @@ def _set_CombiMode(self, value: Union[AnyStr, int, enums.InvControlCombiMode], f In combined VV_DRC, both the volt-var and the dynamic reactive current modes are simultaneously active. - DSS property name: `CombiMode`, DSS property index: 3. + Name: `CombiMode` + Default: None """ def _get_CombiMode_str(self) -> str: @@ -229,7 +233,8 @@ def _set_CombiMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): In combined VV_DRC, both the volt-var and the dynamic reactive current modes are simultaneously active. - DSS property name: `CombiMode`, DSS property index: 3. + Name: `CombiMode` + Default: None """ def _get_VVC_Curve1_str(self) -> str: @@ -247,7 +252,7 @@ def _set_VVC_Curve1_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Units for the x-axis are per-unit voltage, which may be in per unit of the rated voltage for the PVSystem/Storage, or may be in per unit of the average voltage at the terminals over a user-defined number of prior solutions. - DSS property name: `VVC_Curve1`, DSS property index: 4. + Name: `VVC_Curve1` """ def _get_VVC_Curve1(self) -> XYcurve: @@ -269,7 +274,7 @@ def _set_VVC_Curve1(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlag Units for the x-axis are per-unit voltage, which may be in per unit of the rated voltage for the PVSystem/Storage, or may be in per unit of the average voltage at the terminals over a user-defined number of prior solutions. - DSS property name: `VVC_Curve1`, DSS property index: 4. + Name: `VVC_Curve1` """ def _get_Hysteresis_Offset(self) -> float: @@ -280,7 +285,7 @@ def _set_Hysteresis_Offset(self, value: float, flags: enums.SetterFlags = 0): Hysteresis_Offset = property(_get_Hysteresis_Offset, _set_Hysteresis_Offset) # type: float """ - Required for VOLTVAR mode, and defaults to 0. + Required for VOLTVAR mode. for the times when the terminal voltage is decreasing, this is the off-set in per-unit voltage of a curve whose shape is the same as vvc_curve. It is offset by a certain negative value of per-unit voltage, which is defined by the base quantity for the x-axis of the volt-var curve (see help for voltage_curvex_ref) @@ -292,7 +297,8 @@ def _set_Hysteresis_Offset(self, value: float, flags: enums.SetterFlags = 0): if the terminal voltage has been decreasing and changes directions and begins to increase , then move from utilizing the offset curve, back to the vvc_curve1 for volt-var response, but stay at the same per-unit available vars output level. - DSS property name: `Hysteresis_Offset`, DSS property index: 5. + Name: `Hysteresis_Offset` + Default: 0.0 """ def _get_Voltage_CurveX_Ref(self) -> enums.InvControlVoltageCurveXRef: @@ -318,7 +324,8 @@ def _set_Voltage_CurveX_Ref(self, value: Union[AnyStr, int, enums.InvControlVolt ravg. Same as avg, with the exception that the avgerage terminal voltage is divided by the rated voltage. - DSS property name: `Voltage_CurveX_Ref`, DSS property index: 6. + Name: `Voltage_CurveX_Ref` + Default: Rated """ def _get_Voltage_CurveX_Ref_str(self) -> str: @@ -341,7 +348,8 @@ def _set_Voltage_CurveX_Ref_str(self, value: AnyStr, flags: enums.SetterFlags = ravg. Same as avg, with the exception that the avgerage terminal voltage is divided by the rated voltage. - DSS property name: `Voltage_CurveX_Ref`, DSS property index: 6. + Name: `Voltage_CurveX_Ref` + Default: Rated """ def _get_AvgWindowLen(self) -> int: @@ -362,7 +370,8 @@ def _set_AvgWindowLen(self, value: int, flags: enums.SetterFlags = 0): Note, if the solution stepsize is larger than the window length, then the voltage will be assumed to have been constant over the time-frame specified by the window length. - DSS property name: `AvgWindowLen`, DSS property index: 7. + Name: `AvgWindowLen` + Default: 1 """ def _get_VoltWatt_Curve_str(self) -> str: @@ -381,7 +390,7 @@ def _set_VoltWatt_Curve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Units for the y-axis are either in one of the options described in the VoltwattYAxis property. - DSS property name: `VoltWatt_Curve`, DSS property index: 8. + Name: `VoltWatt_Curve` """ def _get_VoltWatt_Curve(self) -> XYcurve: @@ -404,7 +413,7 @@ def _set_VoltWatt_Curve(self, value: Union[AnyStr, XYcurve], flags: enums.Setter Units for the y-axis are either in one of the options described in the VoltwattYAxis property. - DSS property name: `VoltWatt_Curve`, DSS property index: 8. + Name: `VoltWatt_Curve` """ def _get_DbVMin(self) -> float: @@ -419,7 +428,8 @@ def _set_DbVMin(self, value: float, flags: enums.SetterFlags = 0): This parameter is the minimum voltage that defines the voltage dead-band within which no reactive power is allowed to be generated. - DSS property name: `DbVMin`, DSS property index: 9. + Name: `DbVMin` + Default: 0.95 """ def _get_DbVMax(self) -> float: @@ -434,7 +444,8 @@ def _set_DbVMax(self, value: float, flags: enums.SetterFlags = 0): This parameter is the maximum voltage that defines the voltage dead-band within which no reactive power is allowed to be generated. - DSS property name: `DbVMax`, DSS property index: 10. + Name: `DbVMax` + Default: 1.05 """ def _get_ArGraLowV(self) -> float: @@ -453,7 +464,8 @@ def _set_ArGraLowV(self, value: float, flags: enums.SetterFlags = 0): Note, the moving average voltage for the dynamic reactive current mode is different than the moving average voltage for the volt-watt and volt-var modes. - DSS property name: `ArGraLowV`, DSS property index: 11. + Name: `ArGraLowV` + Default: 0.1 """ def _get_ArGraHiV(self) -> float: @@ -472,7 +484,8 @@ def _set_ArGraHiV(self, value: float, flags: enums.SetterFlags = 0): Note, the moving average voltage for the dynamic reactive current mode is different than the mmoving average voltage for the volt-watt and volt-var modes. - DSS property name: `ArGraHiV`, DSS property index: 12. + Name: `ArGraHiV` + Default: 0.1 """ def _get_DynReacAvgWindowLen(self) -> int: @@ -493,7 +506,8 @@ def _set_DynReacAvgWindowLen(self, value: int, flags: enums.SetterFlags = 0): The averaging window will calculate the average PVSystem/Storage terminal voltage over the specified period of time, up to and including the last power flow solution. Note, if the solution stepsize is larger than the window length, then the voltage will be assumed to have been constant over the time-frame specified by the window length. - DSS property name: `DynReacAvgWindowLen`, DSS property index: 13. + Name: `DynReacAvgWindowLen` + Default: 1 """ def _get_DeltaQ_Factor(self) -> float: @@ -517,7 +531,8 @@ def _set_DeltaQ_Factor(self, value: float, flags: enums.SetterFlags = 0): When operating the controller using exponential control model (see CtrlModel), this parameter represents the sampling time gain of the controller, which is used for accelrating the controller response in terms of control iterations required. - DSS property name: `DeltaQ_Factor`, DSS property index: 14. + Name: `DeltaQ_Factor` + Default: -1.0 """ def _get_VoltageChangeTolerance(self) -> float: @@ -536,7 +551,8 @@ def _set_VoltageChangeTolerance(self, value: float, flags: enums.SetterFlags = 0 If an InvControl is controlling more than one PVSystem/Storage, each PVSystem/Storage has this quantity calculated independently, and so an individual PVSystem/Storage may reach the tolerance within different numbers of control iterations. - DSS property name: `VoltageChangeTolerance`, DSS property index: 15. + Name: `VoltageChangeTolerance` + Default: 0.0001 """ def _get_VarChangeTolerance(self) -> float: @@ -555,7 +571,8 @@ def _set_VarChangeTolerance(self, value: float, flags: enums.SetterFlags = 0): If an InvControl is controlling more than one PVSystem/Storage, each PVSystem/Storage has this quantity calculated independently, and so an individual PVSystem/Storage may reach the tolerance within different numbers of control iterations. - DSS property name: `VarChangeTolerance`, DSS property index: 16. + Name: `VarChangeTolerance` + Default: 0.025 """ def _get_VoltWattYAxis(self) -> enums.InvControlVoltWattYAxis: @@ -569,7 +586,7 @@ def _set_VoltWattYAxis(self, value: Union[AnyStr, int, enums.InvControlVoltWattY VoltWattYAxis = property(_get_VoltWattYAxis, _set_VoltWattYAxis) # type: enums.InvControlVoltWattYAxis """ - Required for VOLTWATT mode. Must be one of: {PMPPPU* | PAVAILABLEPU| PCTPMPPPU | KVARATINGPU}. The default is PMPPPU. + Required for VOLTWATT mode. Units for the y-axis of the volt-watt curve while in volt-watt mode. @@ -581,7 +598,8 @@ def _set_VoltWattYAxis(self, value: Union[AnyStr, int, enums.InvControlVoltWattY When set to KVARATINGPU. The y-axis corresponds to the value in pu of the kVA property of the PVSystem. - DSS property name: `VoltWattYAxis`, DSS property index: 17. + Name: `VoltWattYAxis` + Default: PMPPPU """ def _get_VoltWattYAxis_str(self) -> str: @@ -592,7 +610,7 @@ def _set_VoltWattYAxis_str(self, value: AnyStr, flags: enums.SetterFlags = 0): VoltWattYAxis_str = property(_get_VoltWattYAxis_str, _set_VoltWattYAxis_str) # type: str """ - Required for VOLTWATT mode. Must be one of: {PMPPPU* | PAVAILABLEPU| PCTPMPPPU | KVARATINGPU}. The default is PMPPPU. + Required for VOLTWATT mode. Units for the y-axis of the volt-watt curve while in volt-watt mode. @@ -604,7 +622,8 @@ def _set_VoltWattYAxis_str(self, value: AnyStr, flags: enums.SetterFlags = 0): When set to KVARATINGPU. The y-axis corresponds to the value in pu of the kVA property of the PVSystem. - DSS property name: `VoltWattYAxis`, DSS property index: 17. + Name: `VoltWattYAxis` + Default: PMPPPU """ def _get_RateOfChangeMode(self) -> enums.InvControlRateOfChangeMode: @@ -618,7 +637,7 @@ def _set_RateOfChangeMode(self, value: Union[AnyStr, int, enums.InvControlRateOf RateOfChangeMode = property(_get_RateOfChangeMode, _set_RateOfChangeMode) # type: enums.InvControlRateOfChangeMode """ - Required for VOLTWATT and VOLTVAR mode. Must be one of: {INACTIVE* | LPF | RISEFALL }. The default is INACTIVE. + Required for VOLTWATT and VOLTVAR mode. Auxiliary option that aims to limit the changes of the desired reactive power and the active power limit between time steps, the alternatives are listed below: @@ -628,7 +647,8 @@ def _set_RateOfChangeMode(self, value: Union[AnyStr, int, enums.InvControlRateOf RISEFALL. A rise and fall limit in the change of active and/or reactive power expressed in terms of pu power per second, defined in the RiseFallLimit, is applied to the desired reactive power and/or the active power limit. - DSS property name: `RateOfChangeMode`, DSS property index: 18. + Name: `RateOfChangeMode` + Default: Inactive """ def _get_RateOfChangeMode_str(self) -> str: @@ -639,7 +659,7 @@ def _set_RateOfChangeMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0) RateOfChangeMode_str = property(_get_RateOfChangeMode_str, _set_RateOfChangeMode_str) # type: str """ - Required for VOLTWATT and VOLTVAR mode. Must be one of: {INACTIVE* | LPF | RISEFALL }. The default is INACTIVE. + Required for VOLTWATT and VOLTVAR mode. Auxiliary option that aims to limit the changes of the desired reactive power and the active power limit between time steps, the alternatives are listed below: @@ -649,7 +669,8 @@ def _set_RateOfChangeMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0) RISEFALL. A rise and fall limit in the change of active and/or reactive power expressed in terms of pu power per second, defined in the RiseFallLimit, is applied to the desired reactive power and/or the active power limit. - DSS property name: `RateOfChangeMode`, DSS property index: 18. + Name: `RateOfChangeMode` + Default: Inactive """ def _get_LPFTau(self) -> float: @@ -664,7 +685,9 @@ def _set_LPFTau(self, value: float, flags: enums.SetterFlags = 0): Filter time constant of the LPF option of the RateofChangeMode property. The time constant will cause the low-pass filter to achieve 95% of the target value in 3 time constants. - DSS property name: `LPFTau`, DSS property index: 19. + Name: `LPFTau` + Units: s + Default: 0.001 """ def _get_RiseFallLimit(self) -> float: @@ -679,7 +702,8 @@ def _set_RiseFallLimit(self, value: float, flags: enums.SetterFlags = 0): Limit in power in pu per second used by the RISEFALL option of the RateofChangeMode property.The base value for this ramp is defined in the RefReactivePower property and/or in VoltwattYAxis. - DSS property name: `RiseFallLimit`, DSS property index: 20. + Name: `RiseFallLimit` + Default: 0.001 """ def _get_DeltaP_Factor(self) -> float: @@ -701,7 +725,8 @@ def _set_DeltaP_Factor(self, value: float, flags: enums.SetterFlags = 0): If the maximum control iterations are exceeded, and no numerical instability is seen in the EventLog of via monitors, then try increasing the value of this parameter to reduce the number of control iterations needed to achieve the control criteria, and move to the power flow solution. - DSS property name: `DeltaP_Factor`, DSS property index: 21. + Name: `DeltaP_Factor` + Default: -1.0 """ def _get_EventLog(self) -> bool: @@ -712,9 +737,10 @@ def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): EventLog = property(_get_EventLog, _set_EventLog) # type: bool """ - {Yes/True | No/False*} Default is NO for InvControl. Log control actions to Eventlog. + Log control actions to Eventlog. - DSS property name: `EventLog`, DSS property index: 22. + Name: `EventLog` + Default: False """ def _get_RefReactivePower(self) -> enums.InvControlReactivePowerReference: @@ -736,7 +762,8 @@ def _set_RefReactivePower(self, value: Union[AnyStr, int, enums.InvControlReacti VARMAX: The base values of the provided and absorbed reactive power are equal to the value defined in the kvarMax and kvarMaxAbs properties, respectively. - DSS property name: `RefReactivePower`, DSS property index: 23. + Name: `RefReactivePower` + Default: VARAVAL """ def _get_RefReactivePower_str(self) -> str: @@ -755,7 +782,8 @@ def _set_RefReactivePower_str(self, value: AnyStr, flags: enums.SetterFlags = 0) VARMAX: The base values of the provided and absorbed reactive power are equal to the value defined in the kvarMax and kvarMaxAbs properties, respectively. - DSS property name: `RefReactivePower`, DSS property index: 23. + Name: `RefReactivePower` + Default: VARAVAL """ def _get_ActivePChangeTolerance(self) -> float: @@ -774,7 +802,8 @@ def _set_ActivePChangeTolerance(self, value: float, flags: enums.SetterFlags = 0 If an InvControl is controlling more than one PVSystem/Storage, each PVSystem/Storage has this quantity calculated independently, and so an individual PVSystem/Storage may reach the tolerance within different numbers of control iterations. - DSS property name: `ActivePChangeTolerance`, DSS property index: 24. + Name: `ActivePChangeTolerance` + Default: 0.01 """ def _get_MonVoltageCalc(self) -> Union[enums.MonitoredPhase, int]: @@ -794,7 +823,8 @@ def _set_MonVoltageCalc(self, value: Union[AnyStr, int, enums.MonitoredPhase], f """ Number of the phase being monitored or one of {AVG | MAX | MIN} for all phases. Default=AVG. - DSS property name: `MonVoltageCalc`, DSS property index: 25. + Name: `MonVoltageCalc` + Default: avg """ def _get_MonVoltageCalc_str(self) -> str: @@ -807,7 +837,8 @@ def _set_MonVoltageCalc_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Number of the phase being monitored or one of {AVG | MAX | MIN} for all phases. Default=AVG. - DSS property name: `MonVoltageCalc`, DSS property index: 25. + Name: `MonVoltageCalc` + Default: avg """ def _get_MonBus(self) -> List[str]: @@ -822,7 +853,7 @@ def _set_MonBus(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Name of monitored bus used by the voltage-dependent control modes. Default is bus of the controlled PVSystem/Storage or Storage. - DSS property name: `MonBus`, DSS property index: 26. + Name: `MonBus` """ def _get_MonBusesVBase(self) -> Float64Array: @@ -835,7 +866,7 @@ def _set_MonBusesVBase(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Array list of rated voltages of the buses and their nodes presented in the monBus property. This list may have different line-to-line and/or line-to-ground voltages. - DSS property name: `MonBusesVBase`, DSS property index: 27. + Name: `MonBusesVBase` """ def _get_VoltWattCH_Curve_str(self) -> str: @@ -856,7 +887,7 @@ def _set_VoltWattCH_Curve_str(self, value: AnyStr, flags: enums.SetterFlags = 0) No default -- must be specified for VOLTWATT mode for Storage element in CHARGING state. - DSS property name: `VoltWattCH_Curve`, DSS property index: 28. + Name: `VoltWattCH_Curve` """ def _get_VoltWattCH_Curve(self) -> XYcurve: @@ -881,7 +912,7 @@ def _set_VoltWattCH_Curve(self, value: Union[AnyStr, XYcurve], flags: enums.Sett No default -- must be specified for VOLTWATT mode for Storage element in CHARGING state. - DSS property name: `VoltWattCH_Curve`, DSS property index: 28. + Name: `VoltWattCH_Curve` """ def _get_WattPF_Curve_str(self) -> str: @@ -907,7 +938,7 @@ def _set_WattPF_Curve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Try to plot them considering the y-axis reference equal to 0 power factor. The discontinuity in 0.35pu is not a problem since var is zero for either power factor equal to 1 or -1. - DSS property name: `WattPF_Curve`, DSS property index: 29. + Name: `WattPF_Curve` """ def _get_WattPF_Curve(self) -> XYcurve: @@ -937,7 +968,7 @@ def _set_WattPF_Curve(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFl Try to plot them considering the y-axis reference equal to 0 power factor. The discontinuity in 0.35pu is not a problem since var is zero for either power factor equal to 1 or -1. - DSS property name: `WattPF_Curve`, DSS property index: 29. + Name: `WattPF_Curve` """ def _get_WattVar_Curve_str(self) -> str: @@ -955,7 +986,7 @@ def _set_WattVar_Curve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Units for the x-axis are per-unit output active power, and the base active power is the Pmpp for PVSystem and kWrated for Storage. - DSS property name: `WattVar_Curve`, DSS property index: 30. + Name: `WattVar_Curve` """ def _get_WattVar_Curve(self) -> XYcurve: @@ -977,27 +1008,28 @@ def _set_WattVar_Curve(self, value: Union[AnyStr, XYcurve], flags: enums.SetterF Units for the x-axis are per-unit output active power, and the base active power is the Pmpp for PVSystem and kWrated for Storage. - DSS property name: `WattVar_Curve`, DSS property index: 30. + Name: `WattVar_Curve` """ def _get_VSetPoint(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 33) + return self._lib.Obj_GetFloat64(self._ptr, 32) def _set_VSetPoint(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 33, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 32, value, flags) VSetPoint = property(_get_VSetPoint, _set_VSetPoint) # type: float """ Required for Active Voltage Regulation (AVR). - DSS property name: `VSetPoint`, DSS property index: 33. + Name: `VSetPoint` + Default: 1.0 """ def _get_ControlModel(self) -> enums.InvControlControlModel: - return enums.InvControlControlModel(self._lib.Obj_GetInt32(self._ptr, 34)) + return enums.InvControlControlModel(self._lib.Obj_GetInt32(self._ptr, 33)) def _set_ControlModel(self, value: Union[int, enums.InvControlControlModel], flags: enums.SetterFlags = 0): - self._lib.Obj_SetInt32(self._ptr, 34, value, flags) + self._lib.Obj_SetInt32(self._ptr, 33, value, flags) ControlModel = property(_get_ControlModel, _set_ControlModel) # type: enums.InvControlControlModel """ @@ -1009,33 +1041,36 @@ def _set_ControlModel(self, value: Union[int, enums.InvControlControlModel], fla Use this property for better tunning your controller and improve the controller response in terms of control iterations needed to reach the target. This property alters the meaning of deltaQ_factor and deltaP_factor properties according to its value (Check help). The method can also be combined with the controller tolerance for improving performance. - DSS property name: `ControlModel`, DSS property index: 34. + Name: `ControlModel` + Default: 0 """ def _get_BaseFreq(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 35) + return self._lib.Obj_GetFloat64(self._ptr, 34) def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 35, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 34, value, flags) BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: float """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 35. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: - return self._lib.Obj_GetInt32(self._ptr, 36) != 0 + return self._lib.Obj_GetInt32(self._ptr, 35) != 0 def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): - self._lib.Obj_SetInt32(self._ptr, 36, value, flags) + self._lib.Obj_SetInt32(self._ptr, 35, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 36. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -1044,9 +1079,11 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 37. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_string_o(37, value) + self._set_string_o(36, value) class InvControlProperties(TypedDict): @@ -1089,7 +1126,7 @@ class InvControlProperties(TypedDict): class InvControlBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'InvControl' _obj_cls = InvControl - _cls_idx = 42 + _cls_idx = 43 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -1133,7 +1170,9 @@ def _set_DERList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): No capability of hierarchical control between two controls for a single element is implemented at this time. - DSS property name: `DERList`, DSS property index: 1. + For DSS scripts, provide the full names, e.g. `DERList=[PVSystem.pv1, Storage.bat1]`. + + Name: `DERList` """ def _get_Mode(self) -> BatchInt32ArrayProxy: @@ -1168,7 +1207,8 @@ def _set_Mode(self, value: Union[AnyStr, int, enums.InvControlControlMode, List[ NO DEFAULT - DSS property name: `Mode`, DSS property index: 2. + Name: `Mode` + Default: None """ def _get_Mode_str(self) -> List[str]: @@ -1199,7 +1239,8 @@ def _set_Mode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): NO DEFAULT - DSS property name: `Mode`, DSS property index: 2. + Name: `Mode` + Default: None """ def _get_CombiMode(self) -> BatchInt32ArrayProxy: @@ -1223,7 +1264,8 @@ def _set_CombiMode(self, value: Union[AnyStr, int, enums.InvControlCombiMode, Li In combined VV_DRC, both the volt-var and the dynamic reactive current modes are simultaneously active. - DSS property name: `CombiMode`, DSS property index: 3. + Name: `CombiMode` + Default: None """ def _get_CombiMode_str(self) -> List[str]: @@ -1243,7 +1285,8 @@ def _set_CombiMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): In combined VV_DRC, both the volt-var and the dynamic reactive current modes are simultaneously active. - DSS property name: `CombiMode`, DSS property index: 3. + Name: `CombiMode` + Default: None """ def _get_VVC_Curve1_str(self) -> List[str]: @@ -1261,7 +1304,7 @@ def _set_VVC_Curve1_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.S Units for the x-axis are per-unit voltage, which may be in per unit of the rated voltage for the PVSystem/Storage, or may be in per unit of the average voltage at the terminals over a user-defined number of prior solutions. - DSS property name: `VVC_Curve1`, DSS property index: 4. + Name: `VVC_Curve1` """ def _get_VVC_Curve1(self) -> List[XYcurve]: @@ -1279,7 +1322,7 @@ def _set_VVC_Curve1(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcur Units for the x-axis are per-unit voltage, which may be in per unit of the rated voltage for the PVSystem/Storage, or may be in per unit of the average voltage at the terminals over a user-defined number of prior solutions. - DSS property name: `VVC_Curve1`, DSS property index: 4. + Name: `VVC_Curve1` """ def _get_Hysteresis_Offset(self) -> BatchFloat64ArrayProxy: @@ -1290,7 +1333,7 @@ def _set_Hysteresis_Offset(self, value: Union[float, Float64Array], flags: enums Hysteresis_Offset = property(_get_Hysteresis_Offset, _set_Hysteresis_Offset) # type: BatchFloat64ArrayProxy """ - Required for VOLTVAR mode, and defaults to 0. + Required for VOLTVAR mode. for the times when the terminal voltage is decreasing, this is the off-set in per-unit voltage of a curve whose shape is the same as vvc_curve. It is offset by a certain negative value of per-unit voltage, which is defined by the base quantity for the x-axis of the volt-var curve (see help for voltage_curvex_ref) @@ -1302,7 +1345,8 @@ def _set_Hysteresis_Offset(self, value: Union[float, Float64Array], flags: enums if the terminal voltage has been decreasing and changes directions and begins to increase , then move from utilizing the offset curve, back to the vvc_curve1 for volt-var response, but stay at the same per-unit available vars output level. - DSS property name: `Hysteresis_Offset`, DSS property index: 5. + Name: `Hysteresis_Offset` + Default: 0.0 """ def _get_Voltage_CurveX_Ref(self) -> BatchInt32ArrayProxy: @@ -1329,7 +1373,8 @@ def _set_Voltage_CurveX_Ref(self, value: Union[AnyStr, int, enums.InvControlVolt ravg. Same as avg, with the exception that the avgerage terminal voltage is divided by the rated voltage. - DSS property name: `Voltage_CurveX_Ref`, DSS property index: 6. + Name: `Voltage_CurveX_Ref` + Default: Rated """ def _get_Voltage_CurveX_Ref_str(self) -> List[str]: @@ -1352,7 +1397,8 @@ def _set_Voltage_CurveX_Ref_str(self, value: AnyStr, flags: enums.SetterFlags = ravg. Same as avg, with the exception that the avgerage terminal voltage is divided by the rated voltage. - DSS property name: `Voltage_CurveX_Ref`, DSS property index: 6. + Name: `Voltage_CurveX_Ref` + Default: Rated """ def _get_AvgWindowLen(self) -> BatchInt32ArrayProxy: @@ -1373,7 +1419,8 @@ def _set_AvgWindowLen(self, value: Union[int, Int32Array], flags: enums.SetterFl Note, if the solution stepsize is larger than the window length, then the voltage will be assumed to have been constant over the time-frame specified by the window length. - DSS property name: `AvgWindowLen`, DSS property index: 7. + Name: `AvgWindowLen` + Default: 1 """ def _get_VoltWatt_Curve_str(self) -> List[str]: @@ -1392,7 +1439,7 @@ def _set_VoltWatt_Curve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enu Units for the y-axis are either in one of the options described in the VoltwattYAxis property. - DSS property name: `VoltWatt_Curve`, DSS property index: 8. + Name: `VoltWatt_Curve` """ def _get_VoltWatt_Curve(self) -> List[XYcurve]: @@ -1411,7 +1458,7 @@ def _set_VoltWatt_Curve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[X Units for the y-axis are either in one of the options described in the VoltwattYAxis property. - DSS property name: `VoltWatt_Curve`, DSS property index: 8. + Name: `VoltWatt_Curve` """ def _get_DbVMin(self) -> BatchFloat64ArrayProxy: @@ -1426,7 +1473,8 @@ def _set_DbVMin(self, value: Union[float, Float64Array], flags: enums.SetterFlag This parameter is the minimum voltage that defines the voltage dead-band within which no reactive power is allowed to be generated. - DSS property name: `DbVMin`, DSS property index: 9. + Name: `DbVMin` + Default: 0.95 """ def _get_DbVMax(self) -> BatchFloat64ArrayProxy: @@ -1441,7 +1489,8 @@ def _set_DbVMax(self, value: Union[float, Float64Array], flags: enums.SetterFlag This parameter is the maximum voltage that defines the voltage dead-band within which no reactive power is allowed to be generated. - DSS property name: `DbVMax`, DSS property index: 10. + Name: `DbVMax` + Default: 1.05 """ def _get_ArGraLowV(self) -> BatchFloat64ArrayProxy: @@ -1460,7 +1509,8 @@ def _set_ArGraLowV(self, value: Union[float, Float64Array], flags: enums.SetterF Note, the moving average voltage for the dynamic reactive current mode is different than the moving average voltage for the volt-watt and volt-var modes. - DSS property name: `ArGraLowV`, DSS property index: 11. + Name: `ArGraLowV` + Default: 0.1 """ def _get_ArGraHiV(self) -> BatchFloat64ArrayProxy: @@ -1479,7 +1529,8 @@ def _set_ArGraHiV(self, value: Union[float, Float64Array], flags: enums.SetterFl Note, the moving average voltage for the dynamic reactive current mode is different than the mmoving average voltage for the volt-watt and volt-var modes. - DSS property name: `ArGraHiV`, DSS property index: 12. + Name: `ArGraHiV` + Default: 0.1 """ def _get_DynReacAvgWindowLen(self) -> BatchInt32ArrayProxy: @@ -1500,7 +1551,8 @@ def _set_DynReacAvgWindowLen(self, value: Union[int, Int32Array], flags: enums.S The averaging window will calculate the average PVSystem/Storage terminal voltage over the specified period of time, up to and including the last power flow solution. Note, if the solution stepsize is larger than the window length, then the voltage will be assumed to have been constant over the time-frame specified by the window length. - DSS property name: `DynReacAvgWindowLen`, DSS property index: 13. + Name: `DynReacAvgWindowLen` + Default: 1 """ def _get_DeltaQ_Factor(self) -> BatchFloat64ArrayProxy: @@ -1524,7 +1576,8 @@ def _set_DeltaQ_Factor(self, value: Union[float, Float64Array], flags: enums.Set When operating the controller using exponential control model (see CtrlModel), this parameter represents the sampling time gain of the controller, which is used for accelrating the controller response in terms of control iterations required. - DSS property name: `DeltaQ_Factor`, DSS property index: 14. + Name: `DeltaQ_Factor` + Default: -1.0 """ def _get_VoltageChangeTolerance(self) -> BatchFloat64ArrayProxy: @@ -1543,7 +1596,8 @@ def _set_VoltageChangeTolerance(self, value: Union[float, Float64Array], flags: If an InvControl is controlling more than one PVSystem/Storage, each PVSystem/Storage has this quantity calculated independently, and so an individual PVSystem/Storage may reach the tolerance within different numbers of control iterations. - DSS property name: `VoltageChangeTolerance`, DSS property index: 15. + Name: `VoltageChangeTolerance` + Default: 0.0001 """ def _get_VarChangeTolerance(self) -> BatchFloat64ArrayProxy: @@ -1562,7 +1616,8 @@ def _set_VarChangeTolerance(self, value: Union[float, Float64Array], flags: enum If an InvControl is controlling more than one PVSystem/Storage, each PVSystem/Storage has this quantity calculated independently, and so an individual PVSystem/Storage may reach the tolerance within different numbers of control iterations. - DSS property name: `VarChangeTolerance`, DSS property index: 16. + Name: `VarChangeTolerance` + Default: 0.025 """ def _get_VoltWattYAxis(self) -> BatchInt32ArrayProxy: @@ -1577,7 +1632,7 @@ def _set_VoltWattYAxis(self, value: Union[AnyStr, int, enums.InvControlVoltWattY VoltWattYAxis = property(_get_VoltWattYAxis, _set_VoltWattYAxis) # type: BatchInt32ArrayProxy """ - Required for VOLTWATT mode. Must be one of: {PMPPPU* | PAVAILABLEPU| PCTPMPPPU | KVARATINGPU}. The default is PMPPPU. + Required for VOLTWATT mode. Units for the y-axis of the volt-watt curve while in volt-watt mode. @@ -1589,7 +1644,8 @@ def _set_VoltWattYAxis(self, value: Union[AnyStr, int, enums.InvControlVoltWattY When set to KVARATINGPU. The y-axis corresponds to the value in pu of the kVA property of the PVSystem. - DSS property name: `VoltWattYAxis`, DSS property index: 17. + Name: `VoltWattYAxis` + Default: PMPPPU """ def _get_VoltWattYAxis_str(self) -> List[str]: @@ -1600,7 +1656,7 @@ def _set_VoltWattYAxis_str(self, value: AnyStr, flags: enums.SetterFlags = 0): VoltWattYAxis_str = property(_get_VoltWattYAxis_str, _set_VoltWattYAxis_str) # type: List[str] """ - Required for VOLTWATT mode. Must be one of: {PMPPPU* | PAVAILABLEPU| PCTPMPPPU | KVARATINGPU}. The default is PMPPPU. + Required for VOLTWATT mode. Units for the y-axis of the volt-watt curve while in volt-watt mode. @@ -1612,7 +1668,8 @@ def _set_VoltWattYAxis_str(self, value: AnyStr, flags: enums.SetterFlags = 0): When set to KVARATINGPU. The y-axis corresponds to the value in pu of the kVA property of the PVSystem. - DSS property name: `VoltWattYAxis`, DSS property index: 17. + Name: `VoltWattYAxis` + Default: PMPPPU """ def _get_RateOfChangeMode(self) -> BatchInt32ArrayProxy: @@ -1627,7 +1684,7 @@ def _set_RateOfChangeMode(self, value: Union[AnyStr, int, enums.InvControlRateOf RateOfChangeMode = property(_get_RateOfChangeMode, _set_RateOfChangeMode) # type: BatchInt32ArrayProxy """ - Required for VOLTWATT and VOLTVAR mode. Must be one of: {INACTIVE* | LPF | RISEFALL }. The default is INACTIVE. + Required for VOLTWATT and VOLTVAR mode. Auxiliary option that aims to limit the changes of the desired reactive power and the active power limit between time steps, the alternatives are listed below: @@ -1637,7 +1694,8 @@ def _set_RateOfChangeMode(self, value: Union[AnyStr, int, enums.InvControlRateOf RISEFALL. A rise and fall limit in the change of active and/or reactive power expressed in terms of pu power per second, defined in the RiseFallLimit, is applied to the desired reactive power and/or the active power limit. - DSS property name: `RateOfChangeMode`, DSS property index: 18. + Name: `RateOfChangeMode` + Default: Inactive """ def _get_RateOfChangeMode_str(self) -> List[str]: @@ -1648,7 +1706,7 @@ def _set_RateOfChangeMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0) RateOfChangeMode_str = property(_get_RateOfChangeMode_str, _set_RateOfChangeMode_str) # type: List[str] """ - Required for VOLTWATT and VOLTVAR mode. Must be one of: {INACTIVE* | LPF | RISEFALL }. The default is INACTIVE. + Required for VOLTWATT and VOLTVAR mode. Auxiliary option that aims to limit the changes of the desired reactive power and the active power limit between time steps, the alternatives are listed below: @@ -1658,7 +1716,8 @@ def _set_RateOfChangeMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0) RISEFALL. A rise and fall limit in the change of active and/or reactive power expressed in terms of pu power per second, defined in the RiseFallLimit, is applied to the desired reactive power and/or the active power limit. - DSS property name: `RateOfChangeMode`, DSS property index: 18. + Name: `RateOfChangeMode` + Default: Inactive """ def _get_LPFTau(self) -> BatchFloat64ArrayProxy: @@ -1673,7 +1732,9 @@ def _set_LPFTau(self, value: Union[float, Float64Array], flags: enums.SetterFlag Filter time constant of the LPF option of the RateofChangeMode property. The time constant will cause the low-pass filter to achieve 95% of the target value in 3 time constants. - DSS property name: `LPFTau`, DSS property index: 19. + Name: `LPFTau` + Units: s + Default: 0.001 """ def _get_RiseFallLimit(self) -> BatchFloat64ArrayProxy: @@ -1688,7 +1749,8 @@ def _set_RiseFallLimit(self, value: Union[float, Float64Array], flags: enums.Set Limit in power in pu per second used by the RISEFALL option of the RateofChangeMode property.The base value for this ramp is defined in the RefReactivePower property and/or in VoltwattYAxis. - DSS property name: `RiseFallLimit`, DSS property index: 20. + Name: `RiseFallLimit` + Default: 0.001 """ def _get_DeltaP_Factor(self) -> BatchFloat64ArrayProxy: @@ -1710,7 +1772,8 @@ def _set_DeltaP_Factor(self, value: Union[float, Float64Array], flags: enums.Set If the maximum control iterations are exceeded, and no numerical instability is seen in the EventLog of via monitors, then try increasing the value of this parameter to reduce the number of control iterations needed to achieve the control criteria, and move to the power flow solution. - DSS property name: `DeltaP_Factor`, DSS property index: 21. + Name: `DeltaP_Factor` + Default: -1.0 """ def _get_EventLog(self) -> List[bool]: @@ -1718,14 +1781,15 @@ def _get_EventLog(self) -> List[bool]: self._get_batch_int32_prop(22) ] - def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): + def _set_EventLog(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(22, value, flags) EventLog = property(_get_EventLog, _set_EventLog) # type: List[bool] """ - {Yes/True | No/False*} Default is NO for InvControl. Log control actions to Eventlog. + Log control actions to Eventlog. - DSS property name: `EventLog`, DSS property index: 22. + Name: `EventLog` + Default: False """ def _get_RefReactivePower(self) -> BatchInt32ArrayProxy: @@ -1748,7 +1812,8 @@ def _set_RefReactivePower(self, value: Union[AnyStr, int, enums.InvControlReacti VARMAX: The base values of the provided and absorbed reactive power are equal to the value defined in the kvarMax and kvarMaxAbs properties, respectively. - DSS property name: `RefReactivePower`, DSS property index: 23. + Name: `RefReactivePower` + Default: VARAVAL """ def _get_RefReactivePower_str(self) -> List[str]: @@ -1767,7 +1832,8 @@ def _set_RefReactivePower_str(self, value: AnyStr, flags: enums.SetterFlags = 0) VARMAX: The base values of the provided and absorbed reactive power are equal to the value defined in the kvarMax and kvarMaxAbs properties, respectively. - DSS property name: `RefReactivePower`, DSS property index: 23. + Name: `RefReactivePower` + Default: VARAVAL """ def _get_ActivePChangeTolerance(self) -> BatchFloat64ArrayProxy: @@ -1786,7 +1852,8 @@ def _set_ActivePChangeTolerance(self, value: Union[float, Float64Array], flags: If an InvControl is controlling more than one PVSystem/Storage, each PVSystem/Storage has this quantity calculated independently, and so an individual PVSystem/Storage may reach the tolerance within different numbers of control iterations. - DSS property name: `ActivePChangeTolerance`, DSS property index: 24. + Name: `ActivePChangeTolerance` + Default: 0.01 """ def _get_MonVoltageCalc(self) -> BatchInt32ArrayProxy: @@ -1803,7 +1870,8 @@ def _set_MonVoltageCalc(self, value: Union[AnyStr, int, enums.MonitoredPhase, Li """ Number of the phase being monitored or one of {AVG | MAX | MIN} for all phases. Default=AVG. - DSS property name: `MonVoltageCalc`, DSS property index: 25. + Name: `MonVoltageCalc` + Default: avg """ def _get_MonVoltageCalc_str(self) -> List[str]: @@ -1816,7 +1884,8 @@ def _set_MonVoltageCalc_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Number of the phase being monitored or one of {AVG | MAX | MIN} for all phases. Default=AVG. - DSS property name: `MonVoltageCalc`, DSS property index: 25. + Name: `MonVoltageCalc` + Default: avg """ def _get_MonBus(self) -> List[List[str]]: @@ -1833,7 +1902,7 @@ def _set_MonBus(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Name of monitored bus used by the voltage-dependent control modes. Default is bus of the controlled PVSystem/Storage or Storage. - DSS property name: `MonBus`, DSS property index: 26. + Name: `MonBus` """ def _get_MonBusesVBase(self) -> List[Float64Array]: @@ -1849,7 +1918,7 @@ def _set_MonBusesVBase(self, value: Union[Float64Array, List[Float64Array]], fla """ Array list of rated voltages of the buses and their nodes presented in the monBus property. This list may have different line-to-line and/or line-to-ground voltages. - DSS property name: `MonBusesVBase`, DSS property index: 27. + Name: `MonBusesVBase` """ def _get_VoltWattCH_Curve_str(self) -> List[str]: @@ -1870,7 +1939,7 @@ def _set_VoltWattCH_Curve_str(self, value: Union[AnyStr, List[AnyStr]], flags: e No default -- must be specified for VOLTWATT mode for Storage element in CHARGING state. - DSS property name: `VoltWattCH_Curve`, DSS property index: 28. + Name: `VoltWattCH_Curve` """ def _get_VoltWattCH_Curve(self) -> List[XYcurve]: @@ -1891,7 +1960,7 @@ def _set_VoltWattCH_Curve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List No default -- must be specified for VOLTWATT mode for Storage element in CHARGING state. - DSS property name: `VoltWattCH_Curve`, DSS property index: 28. + Name: `VoltWattCH_Curve` """ def _get_WattPF_Curve_str(self) -> List[str]: @@ -1917,7 +1986,7 @@ def _set_WattPF_Curve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums Try to plot them considering the y-axis reference equal to 0 power factor. The discontinuity in 0.35pu is not a problem since var is zero for either power factor equal to 1 or -1. - DSS property name: `WattPF_Curve`, DSS property index: 29. + Name: `WattPF_Curve` """ def _get_WattPF_Curve(self) -> List[XYcurve]: @@ -1943,7 +2012,7 @@ def _set_WattPF_Curve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYc Try to plot them considering the y-axis reference equal to 0 power factor. The discontinuity in 0.35pu is not a problem since var is zero for either power factor equal to 1 or -1. - DSS property name: `WattPF_Curve`, DSS property index: 29. + Name: `WattPF_Curve` """ def _get_WattVar_Curve_str(self) -> List[str]: @@ -1961,7 +2030,7 @@ def _set_WattVar_Curve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enum Units for the x-axis are per-unit output active power, and the base active power is the Pmpp for PVSystem and kWrated for Storage. - DSS property name: `WattVar_Curve`, DSS property index: 30. + Name: `WattVar_Curve` """ def _get_WattVar_Curve(self) -> List[XYcurve]: @@ -1979,27 +2048,28 @@ def _set_WattVar_Curve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XY Units for the x-axis are per-unit output active power, and the base active power is the Pmpp for PVSystem and kWrated for Storage. - DSS property name: `WattVar_Curve`, DSS property index: 30. + Name: `WattVar_Curve` """ def _get_VSetPoint(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 33) + return BatchFloat64ArrayProxy(self, 32) def _set_VSetPoint(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(33, value, flags) + self._set_batch_float64_array(32, value, flags) VSetPoint = property(_get_VSetPoint, _set_VSetPoint) # type: BatchFloat64ArrayProxy """ Required for Active Voltage Regulation (AVR). - DSS property name: `VSetPoint`, DSS property index: 33. + Name: `VSetPoint` + Default: 1.0 """ def _get_ControlModel(self) -> BatchInt32ArrayProxy: - return BatchInt32ArrayProxy(self, 34) + return BatchInt32ArrayProxy(self, 33) def _set_ControlModel(self, value: Union[int, enums.InvControlControlModel, Int32Array], flags: enums.SetterFlags = 0): - self._set_batch_int32_array(34, value, flags) + self._set_batch_int32_array(33, value, flags) ControlModel = property(_get_ControlModel, _set_ControlModel) # type: BatchInt32ArrayProxy """ @@ -2011,35 +2081,38 @@ def _set_ControlModel(self, value: Union[int, enums.InvControlControlModel, Int3 Use this property for better tunning your controller and improve the controller response in terms of control iterations needed to reach the target. This property alters the meaning of deltaQ_factor and deltaP_factor properties according to its value (Check help). The method can also be combined with the controller tolerance for improving performance. - DSS property name: `ControlModel`, DSS property index: 34. + Name: `ControlModel` + Default: 0 """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 35) + return BatchFloat64ArrayProxy(self, 34) def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(35, value, flags) + self._set_batch_float64_array(34, value, flags) BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: BatchFloat64ArrayProxy """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 35. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: return [v != 0 for v in - self._get_batch_int32_prop(36) + self._get_batch_int32_prop(35) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): - self._set_batch_int32_array(36, value, flags) + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(35, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 36. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -2048,9 +2121,11 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 37. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_batch_string(37, value, flags) + self._set_batch_string(36, value, flags) class InvControlBatchProperties(TypedDict): DERList: List[AnyStr] diff --git a/altdss/Isource.py b/altdss/Isource.py index 6515fe5..1ceee51 100644 --- a/altdss/Isource.py +++ b/altdss/Isource.py @@ -82,7 +82,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): bus1=busname bus1=busname.1.2.3 - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Amps(self) -> float: @@ -95,7 +95,8 @@ def _set_Amps(self, value: float, flags: enums.SetterFlags = 0): """ Magnitude of current source, each phase, in Amps. - DSS property name: `Amps`, DSS property index: 2. + Name: `Amps` + Units: A """ def _get_Angle(self) -> float: @@ -106,10 +107,12 @@ def _set_Angle(self, value: float, flags: enums.SetterFlags = 0): Angle = property(_get_Angle, _set_Angle) # type: float """ - Phase angle in degrees of first phase: e.g.,Angle=10.3. - Phase shift between phases is assumed 120 degrees when number of phases <= 3 + Phase angle of first phase: e.g., Angle=10.3. + Phase shift between phases is assumed 120 degrees when number of phases less than 3. - DSS property name: `Angle`, DSS property index: 3. + Name: `Angle` + Units: ° + Default: 0.0 """ def _get_Frequency(self) -> float: @@ -122,7 +125,8 @@ def _set_Frequency(self, value: float, flags: enums.SetterFlags = 0): """ Source frequency. Defaults to circuit fundamental frequency. - DSS property name: `Frequency`, DSS property index: 4. + Name: `Frequency` + Units: Hz """ def _get_Phases(self) -> int: @@ -133,9 +137,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of phases. Defaults to 3. For 3 or less, phase shift is 120 degrees. + Number of phases. For 3 or less, phase shift is 120 degrees. - DSS property name: `Phases`, DSS property index: 5. + Name: `Phases` + Default: 3 """ def _get_ScanType(self) -> enums.ScanType: @@ -149,9 +154,10 @@ def _set_ScanType(self, value: Union[AnyStr, int, enums.ScanType], flags: enums. ScanType = property(_get_ScanType, _set_ScanType) # type: enums.ScanType """ - {pos*| zero | none} Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. + Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. - DSS property name: `ScanType`, DSS property index: 6. + Name: `ScanType` + Default: Positive """ def _get_ScanType_str(self) -> str: @@ -162,9 +168,10 @@ def _set_ScanType_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ScanType_str = property(_get_ScanType_str, _set_ScanType_str) # type: str """ - {pos*| zero | none} Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. + Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. - DSS property name: `ScanType`, DSS property index: 6. + Name: `ScanType` + Default: Positive """ def _get_Sequence(self) -> enums.SequenceType: @@ -178,9 +185,10 @@ def _set_Sequence(self, value: Union[AnyStr, int, enums.SequenceType], flags: en Sequence = property(_get_Sequence, _set_Sequence) # type: enums.SequenceType """ - {pos*| neg | zero} Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. Default is positive sequence. + Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. - DSS property name: `Sequence`, DSS property index: 7. + Name: `Sequence` + Default: Positive """ def _get_Sequence_str(self) -> str: @@ -191,9 +199,10 @@ def _set_Sequence_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Sequence_str = property(_get_Sequence_str, _set_Sequence_str) # type: str """ - {pos*| neg | zero} Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. Default is positive sequence. + Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. - DSS property name: `Sequence`, DSS property index: 7. + Name: `Sequence` + Default: Positive """ def _get_Yearly_str(self) -> str: @@ -210,7 +219,7 @@ def _set_Yearly_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Yearly`, DSS property index: 8. + Name: `Yearly` """ def _get_Yearly(self) -> LoadShape: @@ -231,7 +240,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Yearly`, DSS property index: 8. + Name: `Yearly` """ def _get_Daily_str(self) -> str: @@ -248,7 +257,7 @@ def _set_Daily_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Sets Yearly curve if it is not already defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Daily`, DSS property index: 9. + Name: `Daily` """ def _get_Daily(self) -> LoadShape: @@ -269,7 +278,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = Sets Yearly curve if it is not already defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Daily`, DSS property index: 9. + Name: `Daily` """ def _get_Duty_str(self) -> str: @@ -286,7 +295,7 @@ def _set_Duty_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Defaults to Daily load shape when Daily is defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Duty`, DSS property index: 10. + Name: `Duty` """ def _get_Duty(self) -> LoadShape: @@ -307,7 +316,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = Defaults to Daily load shape when Daily is defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Duty`, DSS property index: 10. + Name: `Duty` """ def _get_Bus2(self) -> str: @@ -324,7 +333,7 @@ def _set_Bus2(self, value: AnyStr, flags: enums.SetterFlags = 0): Default is Bus1.0.0.0 (grounded-wye connection) - DSS property name: `Bus2`, DSS property index: 11. + Name: `Bus2` """ def _get_Spectrum_str(self) -> str: @@ -335,9 +344,10 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str """ - Harmonic spectrum assumed for this source. Default is "default". + Harmonic spectrum assumed for this source. - DSS property name: `Spectrum`, DSS property index: 12. + Name: `Spectrum` + Default: default """ def _get_Spectrum(self) -> SpectrumObj: @@ -352,9 +362,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj """ - Harmonic spectrum assumed for this source. Default is "default". + Harmonic spectrum assumed for this source. - DSS property name: `Spectrum`, DSS property index: 12. + Name: `Spectrum` + Default: default """ def _get_BaseFreq(self) -> float: @@ -367,7 +378,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 13. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -378,9 +390,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 14. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -389,7 +402,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 15. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(15, value) @@ -455,7 +470,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags bus1=busname bus1=busname.1.2.3 - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Amps(self) -> BatchFloat64ArrayProxy: @@ -468,7 +483,8 @@ def _set_Amps(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Magnitude of current source, each phase, in Amps. - DSS property name: `Amps`, DSS property index: 2. + Name: `Amps` + Units: A """ def _get_Angle(self) -> BatchFloat64ArrayProxy: @@ -479,10 +495,12 @@ def _set_Angle(self, value: Union[float, Float64Array], flags: enums.SetterFlags Angle = property(_get_Angle, _set_Angle) # type: BatchFloat64ArrayProxy """ - Phase angle in degrees of first phase: e.g.,Angle=10.3. - Phase shift between phases is assumed 120 degrees when number of phases <= 3 + Phase angle of first phase: e.g., Angle=10.3. + Phase shift between phases is assumed 120 degrees when number of phases less than 3. - DSS property name: `Angle`, DSS property index: 3. + Name: `Angle` + Units: ° + Default: 0.0 """ def _get_Frequency(self) -> BatchFloat64ArrayProxy: @@ -495,7 +513,8 @@ def _set_Frequency(self, value: Union[float, Float64Array], flags: enums.SetterF """ Source frequency. Defaults to circuit fundamental frequency. - DSS property name: `Frequency`, DSS property index: 4. + Name: `Frequency` + Units: Hz """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -506,9 +525,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of phases. Defaults to 3. For 3 or less, phase shift is 120 degrees. + Number of phases. For 3 or less, phase shift is 120 degrees. - DSS property name: `Phases`, DSS property index: 5. + Name: `Phases` + Default: 3 """ def _get_ScanType(self) -> BatchInt32ArrayProxy: @@ -523,9 +543,10 @@ def _set_ScanType(self, value: Union[AnyStr, int, enums.ScanType, List[AnyStr], ScanType = property(_get_ScanType, _set_ScanType) # type: BatchInt32ArrayProxy """ - {pos*| zero | none} Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. + Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. - DSS property name: `ScanType`, DSS property index: 6. + Name: `ScanType` + Default: Positive """ def _get_ScanType_str(self) -> List[str]: @@ -536,9 +557,10 @@ def _set_ScanType_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ScanType_str = property(_get_ScanType_str, _set_ScanType_str) # type: List[str] """ - {pos*| zero | none} Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. + Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. - DSS property name: `ScanType`, DSS property index: 6. + Name: `ScanType` + Default: Positive """ def _get_Sequence(self) -> BatchInt32ArrayProxy: @@ -553,9 +575,10 @@ def _set_Sequence(self, value: Union[AnyStr, int, enums.SequenceType, List[AnySt Sequence = property(_get_Sequence, _set_Sequence) # type: BatchInt32ArrayProxy """ - {pos*| neg | zero} Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. Default is positive sequence. + Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. - DSS property name: `Sequence`, DSS property index: 7. + Name: `Sequence` + Default: Positive """ def _get_Sequence_str(self) -> List[str]: @@ -566,9 +589,10 @@ def _set_Sequence_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Sequence_str = property(_get_Sequence_str, _set_Sequence_str) # type: List[str] """ - {pos*| neg | zero} Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. Default is positive sequence. + Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. - DSS property name: `Sequence`, DSS property index: 7. + Name: `Sequence` + Default: Positive """ def _get_Yearly_str(self) -> List[str]: @@ -585,7 +609,7 @@ def _set_Yearly_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Yearly`, DSS property index: 8. + Name: `Yearly` """ def _get_Yearly(self) -> List[LoadShape]: @@ -602,7 +626,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadSha Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Yearly`, DSS property index: 8. + Name: `Yearly` """ def _get_Daily_str(self) -> List[str]: @@ -619,7 +643,7 @@ def _set_Daily_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter Sets Yearly curve if it is not already defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Daily`, DSS property index: 9. + Name: `Daily` """ def _get_Daily(self) -> List[LoadShape]: @@ -636,7 +660,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShap Sets Yearly curve if it is not already defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Daily`, DSS property index: 9. + Name: `Daily` """ def _get_Duty_str(self) -> List[str]: @@ -653,7 +677,7 @@ def _set_Duty_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF Defaults to Daily load shape when Daily is defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Duty`, DSS property index: 10. + Name: `Duty` """ def _get_Duty(self) -> List[LoadShape]: @@ -670,7 +694,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape Defaults to Daily load shape when Daily is defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Duty`, DSS property index: 10. + Name: `Duty` """ def _get_Bus2(self) -> List[str]: @@ -687,7 +711,7 @@ def _set_Bus2(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags Default is Bus1.0.0.0 (grounded-wye connection) - DSS property name: `Bus2`, DSS property index: 11. + Name: `Bus2` """ def _get_Spectrum_str(self) -> List[str]: @@ -698,9 +722,10 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] """ - Harmonic spectrum assumed for this source. Default is "default". + Harmonic spectrum assumed for this source. - DSS property name: `Spectrum`, DSS property index: 12. + Name: `Spectrum` + Default: default """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -711,9 +736,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] """ - Harmonic spectrum assumed for this source. Default is "default". + Harmonic spectrum assumed for this source. - DSS property name: `Spectrum`, DSS property index: 12. + Name: `Spectrum` + Default: default """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -726,7 +752,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 13. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -734,14 +761,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(14) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(14, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 14. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -750,7 +778,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 15. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(15, value, flags) diff --git a/altdss/Line.py b/altdss/Line.py index 1566707..9874ddb 100644 --- a/altdss/Line.py +++ b/altdss/Line.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -18,6 +18,8 @@ from .TSData import TSData from .WireData import WireData +Conductor = Union[WireData, CNData, TSData] + class Line(DSSObj, CircuitElementMixin, PDElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PDElementMixin._extra_slots _cls_name = 'Line' @@ -29,7 +31,8 @@ class Line(DSSObj, CircuitElementMixin, PDElementMixin): 23, 28, 30, - 37, + 33, + 41, } _cls_float_idx = { 4, @@ -46,10 +49,12 @@ class Line(DSSObj, CircuitElementMixin, PDElementMixin): 27, 31, 32, - 33, - 34, 35, 36, + 37, + 38, + 39, + 40, } _cls_prop_idx = { 'bus1': 1, @@ -74,7 +79,6 @@ class Line(DSSObj, CircuitElementMixin, PDElementMixin): 'units': 20, 'spacing': 21, 'wires': 22, - 'conductors': 22, 'earthmodel': 23, 'cncables': 24, 'tscables': 25, @@ -83,14 +87,18 @@ class Line(DSSObj, CircuitElementMixin, PDElementMixin): 'seasons': 28, 'ratings': 29, 'linetype': 30, - 'normamps': 31, - 'emergamps': 32, - 'faultrate': 33, - 'pctperm': 34, - 'repair': 35, - 'basefreq': 36, - 'enabled': 37, - 'like': 38, + 'epsrmedium': 31, + 'heightoffset': 32, + 'heightunit': 33, + 'conductors': 34, + 'normamps': 35, + 'emergamps': 36, + 'faultrate': 37, + 'pctperm': 38, + 'repair': 39, + 'basefreq': 40, + 'enabled': 41, + 'like': 42, } def __init__(self, api_util, ptr): @@ -128,7 +136,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): bus1=busname (assumes all terminals connected in normal phase order) bus1=busname.3.1.2.0 (specify terminal to node connections explicitly) - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> str: @@ -141,7 +149,7 @@ def _set_Bus2(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of bus to which 2nd terminal is connected. - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_LineCode_str(self) -> str: @@ -155,7 +163,7 @@ def _set_LineCode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Name of linecode object describing line impedances. If you use a line code, you do not need to specify the impedances here. The line code must have been PREVIOUSLY defined. The values specified last will prevail over those specified earlier (left-to-right sequence of properties). You can subsequently change the number of phases if symmetrical component quantities are specified.If no line code or impedance data are specified, the line object defaults to 336 MCM ACSR on 4 ft spacing. - DSS property name: `LineCode`, DSS property index: 3. + Name: `LineCode` """ def _get_LineCode(self) -> LineCodeObj: @@ -173,7 +181,7 @@ def _set_LineCode(self, value: Union[AnyStr, LineCodeObj], flags: enums.SetterFl Name of linecode object describing line impedances. If you use a line code, you do not need to specify the impedances here. The line code must have been PREVIOUSLY defined. The values specified last will prevail over those specified earlier (left-to-right sequence of properties). You can subsequently change the number of phases if symmetrical component quantities are specified.If no line code or impedance data are specified, the line object defaults to 336 MCM ACSR on 4 ft spacing. - DSS property name: `LineCode`, DSS property index: 3. + Name: `LineCode` """ def _get_Length(self) -> float: @@ -184,9 +192,10 @@ def _set_Length(self, value: float, flags: enums.SetterFlags = 0): Length = property(_get_Length, _set_Length) # type: float """ - Length of line. Default is 1.0. If units do not match the impedance data, specify "units" property. + Length of line. If units do not match the impedance data, specify "units" property. - DSS property name: `Length`, DSS property index: 4. + Name: `Length` + Default: 1.0 """ def _get_Phases(self) -> int: @@ -199,7 +208,8 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): """ Number of phases, this line. - DSS property name: `Phases`, DSS property index: 5. + Name: `Phases` + Default: 3 """ def _get_R1(self) -> float: @@ -210,9 +220,11 @@ def _set_R1(self, value: float, flags: enums.SetterFlags = 0): R1 = property(_get_R1, _set_R1) # type: float """ - Positive-sequence Resistance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Rmatrix. + Positive-sequence Resistance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Rmatrix. - DSS property name: `R1`, DSS property index: 6. + Name: `R1` + Units: Ω/[length_unit] + Default: 0.058 """ def _get_X1(self) -> float: @@ -223,9 +235,11 @@ def _set_X1(self, value: float, flags: enums.SetterFlags = 0): X1 = property(_get_X1, _set_X1) # type: float """ - Positive-sequence Reactance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Xmatrix + Positive-sequence Reactance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Xmatrix - DSS property name: `X1`, DSS property index: 7. + Name: `X1` + Units: Ω/[length_unit] + Default: 0.1206 """ def _get_R0(self) -> float: @@ -236,9 +250,11 @@ def _set_R0(self, value: float, flags: enums.SetterFlags = 0): R0 = property(_get_R0, _set_R0) # type: float """ - Zero-sequence Resistance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. + Zero-sequence Resistance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. - DSS property name: `R0`, DSS property index: 8. + Name: `R0` + Units: Ω/[length_unit] + Default: 0.1784 """ def _get_X0(self) -> float: @@ -249,9 +265,11 @@ def _set_X0(self, value: float, flags: enums.SetterFlags = 0): X0 = property(_get_X0, _set_X0) # type: float """ - Zero-sequence Reactance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. + Zero-sequence Reactance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. - DSS property name: `X0`, DSS property index: 9. + Name: `X0` + Units: Ω/[length_unit] + Default: 0.4047 """ def _get_C1(self) -> float: @@ -262,9 +280,11 @@ def _set_C1(self, value: float, flags: enums.SetterFlags = 0): C1 = property(_get_C1, _set_C1) # type: float """ - Positive-sequence capacitance, nf per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Cmatrix and B1. + Positive-sequence capacitance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Cmatrix and B1. - DSS property name: `C1`, DSS property index: 10. + Name: `C1` + Units: nF/[length_unit] + Default: 3.3999999999999995 """ def _get_C0(self) -> float: @@ -275,9 +295,11 @@ def _set_C0(self, value: float, flags: enums.SetterFlags = 0): C0 = property(_get_C0, _set_C0) # type: float """ - Zero-sequence capacitance, nf per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition.See also B0. + Zero-sequence capacitance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition.See also B0. - DSS property name: `C0`, DSS property index: 11. + Name: `C0` + Units: nF/[length_unit] + Default: 1.5999999999999999 """ def _get_RMatrix(self) -> Float64Array: @@ -288,9 +310,10 @@ def _set_RMatrix(self, value: Float64Array, flags: enums.SetterFlags = 0): RMatrix = property(_get_RMatrix, _set_RMatrix) # type: Float64Array """ - Resistance matrix, lower triangle, ohms per unit length. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. + Resistance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `RMatrix`, DSS property index: 12. + Name: `RMatrix` + Units: Ω/[length_unit] """ def _get_XMatrix(self) -> Float64Array: @@ -301,9 +324,10 @@ def _set_XMatrix(self, value: Float64Array, flags: enums.SetterFlags = 0): XMatrix = property(_get_XMatrix, _set_XMatrix) # type: Float64Array """ - Reactance matrix, lower triangle, ohms per unit length. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. + Reactance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `XMatrix`, DSS property index: 13. + Name: `XMatrix` + Units: Ω/[length_unit] """ def _get_CMatrix(self) -> Float64Array: @@ -314,9 +338,11 @@ def _set_CMatrix(self, value: Float64Array, flags: enums.SetterFlags = 0): CMatrix = property(_get_CMatrix, _set_CMatrix) # type: Float64Array """ - Nodal Capacitance matrix, lower triangle, nf per unit length.Order of the matrix is the number of phases. May be used to specify the shunt capacitance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. + Nodal Capacitance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the shunt capacitance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `CMatrix`, DSS property index: 14. + Name: `CMatrix` + Units: nF/[length_unit] + Default: [[2.8, -0.5999999999999999, -0.5999999999999999], [-0.5999999999999999, 2.8, -0.5999999999999999], [-0.5999999999999999, -0.5999999999999999, 2.8]] """ def _get_Switch(self) -> bool: @@ -327,10 +353,11 @@ def _set_Switch(self, value: bool, flags: enums.SetterFlags = 0): Switch = property(_get_Switch, _set_Switch) # type: bool """ - {y/n | T/F} Default= no/false. Designates this line as a switch for graphics and algorithmic purposes. + Designates this line as a switch for graphics and algorithmic purposes. SIDE EFFECT: Sets r1 = 1.0; x1 = 1.0; r0 = 1.0; x0 = 1.0; c1 = 1.1 ; c0 = 1.0; length = 0.001; You must reset if you want something different. - DSS property name: `Switch`, DSS property index: 15. + Name: `Switch` + Default: False """ def _get_Rg(self) -> float: @@ -343,7 +370,9 @@ def _set_Rg(self, value: float, flags: enums.SetterFlags = 0): """ Carson earth return resistance per unit length used to compute impedance values at base frequency. Default is 0.01805 = 60 Hz value in ohms per kft (matches default line impedances). This value is required for harmonic solutions if you wish to adjust the earth return impedances for frequency. If not, set both Rg and Xg = 0. - DSS property name: `Rg`, DSS property index: 16. + Name: `Rg` + Units: Ω/[length_unit] + Default: 0.01805 """ def _get_Xg(self) -> float: @@ -356,7 +385,9 @@ def _set_Xg(self, value: float, flags: enums.SetterFlags = 0): """ Carson earth return reactance per unit length used to compute impedance values at base frequency. For making better frequency adjustments. Default is 0.155081 = 60 Hz value in ohms per kft (matches default line impedances). This value is required for harmonic solutions if you wish to adjust the earth return impedances for frequency. If not, set both Rg and Xg = 0. - DSS property name: `Xg`, DSS property index: 17. + Name: `Xg` + Units: Ω/[length_unit] + Default: 0.155081 """ def _get_rho(self) -> float: @@ -367,9 +398,11 @@ def _set_rho(self, value: float, flags: enums.SetterFlags = 0): rho = property(_get_rho, _set_rho) # type: float """ - Default=100 meter ohms. Earth resistivity used to compute earth correction factor. Overrides Line geometry definition if specified. + Earth resistivity used to compute earth correction factor. Overrides Line geometry definition if specified. - DSS property name: `rho`, DSS property index: 18. + Name: `rho` + Units: Ωm + Default: 100.0 """ def _get_Geometry_str(self) -> str: @@ -382,7 +415,7 @@ def _set_Geometry_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Geometry code for LineGeometry Object. Supersedes any previous definition of line impedance. Line constants are computed for each frequency change or rho change. CAUTION: may alter number of phases. You cannot subsequently change the number of phases unless you change how the line impedance is defined. - DSS property name: `Geometry`, DSS property index: 19. + Name: `Geometry` """ def _get_Geometry(self) -> LineGeometry: @@ -399,7 +432,7 @@ def _set_Geometry(self, value: Union[AnyStr, LineGeometry], flags: enums.SetterF """ Geometry code for LineGeometry Object. Supersedes any previous definition of line impedance. Line constants are computed for each frequency change or rho change. CAUTION: may alter number of phases. You cannot subsequently change the number of phases unless you change how the line impedance is defined. - DSS property name: `Geometry`, DSS property index: 19. + Name: `Geometry` """ def _get_Units(self) -> enums.LengthUnit: @@ -413,9 +446,11 @@ def _set_Units(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enums.S Units = property(_get_Units, _set_Units) # type: enums.LengthUnit """ - Length Units = {none | mi|kft|km|m|Ft|in|cm } Default is None - assumes length units match impedance units. + Length Units. Default is None - assumes length units match impedance units. + This property is reset to its default value when impedances are specified or edited. Make sure to specify desired value after specifying or editing any impedance property. - DSS property name: `Units`, DSS property index: 20. + Name: `Units` + Default: none """ def _get_Units_str(self) -> str: @@ -426,9 +461,11 @@ def _set_Units_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Units_str = property(_get_Units_str, _set_Units_str) # type: str """ - Length Units = {none | mi|kft|km|m|Ft|in|cm } Default is None - assumes length units match impedance units. + Length Units. Default is None - assumes length units match impedance units. + This property is reset to its default value when impedances are specified or edited. Make sure to specify desired value after specifying or editing any impedance property. - DSS property name: `Units`, DSS property index: 20. + Name: `Units` + Default: none """ def _get_Spacing_str(self) -> str: @@ -443,7 +480,7 @@ def _set_Spacing_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Must be used in conjunction with the Wires property. Specify this before the wires property. - DSS property name: `Spacing`, DSS property index: 21. + Name: `Spacing` """ def _get_Spacing(self) -> LineSpacing: @@ -462,43 +499,7 @@ def _set_Spacing(self, value: Union[AnyStr, LineSpacing], flags: enums.SetterFla Must be used in conjunction with the Wires property. Specify this before the wires property. - DSS property name: `Spacing`, DSS property index: 21. - """ - - def _get_Conductors_str(self) -> List[str]: - return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 22) - - def _set_Conductors_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): - self._set_string_array_o(22, value, flags | enums.SetterFlags.AllowAllConductors) - - Conductors_str = property(_get_Conductors_str, _set_Conductors_str) # type: List[str] - """ - Array of WireData names for use in an overhead line constants calculation. - Must be used in conjunction with the Spacing property. - Specify the Spacing first, and "ncond" wires. - May also be used to specify bare neutrals with cables, using "ncond-nphase" wires. - - DSS property name: `Wires`, DSS property index: 22. - """ - - def _get_Conductors(self) -> List[Union[WireData, CNData, TSData]]: - return self._get_obj_array(22, None) - - def _set_Conductors(self, value: List[Union[AnyStr, Union[WireData, CNData, TSData]]], flags: enums.SetterFlags = 0): - if value is None or len(value) == 0 or not isinstance(value[0], DSSObj): - self._set_string_array_o(22, value, flags | enums.SetterFlags.AllowAllConductors) - return - - self._set_obj_array(22, value, flags | enums.SetterFlags.AllowAllConductors) - - Conductors = property(_get_Conductors, _set_Conductors) # type: List[Union[WireData, CNData, TSData]] - """ - Array of WireData names for use in an overhead line constants calculation. - Must be used in conjunction with the Spacing property. - Specify the Spacing first, and "ncond" wires. - May also be used to specify bare neutrals with cables, using "ncond-nphase" wires. - - DSS property name: `Wires`, DSS property index: 22. + Name: `Spacing` """ def _get_EarthModel(self) -> enums.EarthModel: @@ -514,7 +515,8 @@ def _set_EarthModel(self, value: Union[AnyStr, int, enums.EarthModel], flags: en """ One of {Carson | FullCarson | Deri}. Default is the global value established with the Set EarthModel command. See the Options Help on EarthModel option. This is used to override the global value for this line. This option applies only when the "geometry" property is used. - DSS property name: `EarthModel`, DSS property index: 23. + Name: `EarthModel` + Default: Deri """ def _get_EarthModel_str(self) -> str: @@ -527,7 +529,8 @@ def _set_EarthModel_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ One of {Carson | FullCarson | Deri}. Default is the global value established with the Set EarthModel command. See the Options Help on EarthModel option. This is used to override the global value for this line. This option applies only when the "geometry" property is used. - DSS property name: `EarthModel`, DSS property index: 23. + Name: `EarthModel` + Default: Deri """ def _get_B1(self) -> float: @@ -540,7 +543,8 @@ def _set_B1(self, value: float, flags: enums.SetterFlags = 0): """ Alternate way to specify C1. MicroS per unit length - DSS property name: `B1`, DSS property index: 26. + Name: `B1` + Units: μS/[length_unit] """ def _get_B0(self) -> float: @@ -553,7 +557,8 @@ def _set_B0(self, value: float, flags: enums.SetterFlags = 0): """ Alternate way to specify C0. MicroS per unit length - DSS property name: `B0`, DSS property index: 27. + Name: `B0` + Units: μS/[length_unit] """ def _get_Seasons(self) -> int: @@ -566,7 +571,7 @@ def _set_Seasons(self, value: int, flags: enums.SetterFlags = 0): """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 28. + Name: `Seasons` """ def _get_Ratings(self) -> Float64Array: @@ -580,7 +585,8 @@ def _set_Ratings(self, value: Float64Array, flags: enums.SetterFlags = 0): An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. - DSS property name: `Ratings`, DSS property index: 29. + Name: `Ratings` + Default: [400.0] """ def _get_LineType(self) -> enums.LineType: @@ -594,12 +600,11 @@ def _set_LineType(self, value: Union[AnyStr, int, enums.LineType], flags: enums. LineType = property(_get_LineType, _set_LineType) # type: enums.LineType """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR - - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. - DSS property name: `LineType`, DSS property index: 30. + Name: `LineType` + Default: oh """ def _get_LineType_str(self) -> str: @@ -610,103 +615,208 @@ def _set_LineType_str(self, value: AnyStr, flags: enums.SetterFlags = 0): LineType_str = property(_get_LineType_str, _set_LineType_str) # type: str """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. + Name: `LineType` + Default: oh + """ + + def _get_EpsRMedium(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 31) - DSS property name: `LineType`, DSS property index: 30. + def _set_EpsRMedium(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 31, value, flags) + + EpsRMedium = property(_get_EpsRMedium, _set_EpsRMedium) # type: float + """ + Relative permittivity of the medium. Used by lines with a geometry definition. + Defaults to 1.0 for air. + + Name: `EpsRMedium` + Default: 1.0 + """ + + def _get_HeightOffset(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 32) + + def _set_HeightOffset(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 32, value, flags) + + HeightOffset = property(_get_HeightOffset, _set_HeightOffset) # type: float + """ + Average Height (or depth) offset to be applied on top of coordinates of geometry or spacing. + Use negative value for depth in underground lines. + + Name: `HeightOffset` + Default: 0.0 + """ + + def _get_HeightUnit(self) -> enums.LengthUnit: + return enums.LengthUnit(self._lib.Obj_GetInt32(self._ptr, 33)) + + def _set_HeightUnit(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enums.SetterFlags = 0): + if not isinstance(value, int): + self._set_string_o(33, value, flags) + return + self._lib.Obj_SetInt32(self._ptr, 33, value, flags) + + HeightUnit = property(_get_HeightUnit, _set_HeightUnit) # type: enums.LengthUnit + """ + Height offset units. If none is detected, meters is assumed. + + Name: `HeightUnit` + Default: m + """ + + def _get_HeightUnit_str(self) -> str: + return self._get_prop_string(33) + + def _set_HeightUnit_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_HeightUnit(value, flags) + + HeightUnit_str = property(_get_HeightUnit_str, _set_HeightUnit_str) # type: str + """ + Height offset units. If none is detected, meters is assumed. + + Name: `HeightUnit` + Default: m + """ + + def _get_Conductors_str(self) -> List[str]: + return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 34) + + def _set_Conductors_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): + self._set_string_array_o(34, value, flags) + + Conductors_str = property(_get_Conductors_str, _set_Conductors_str) # type: List[str] + """ + Array of conductor names for use in line constants calculation. + Must be used in conjunction with the "Spacing" property. + Specify the Spacing first, and "NCond" wires. + Specify the conductor type followed by the conductor name. e.g., "conductors=[CNData.cncablename, TSData.tscablename, WireData.wirename]" + If a given position in the spacing is not to be used in the line, use "none" in the entry of the conductors array. + + Name: `Conductors` + """ + + def _get_Conductors(self) -> List[Conductor]: + return self._get_obj_array(34, None) + + def _set_Conductors(self, value: Union[List[AnyStr], List[Conductor]], flags: enums.SetterFlags = 0): + if value is None or len(value) == 0 or not isinstance(value[0], DSSObj): + self._set_string_array_o(34, value, flags) + return + + self._set_obj_array(34, value, flags) + + Conductors = property(_get_Conductors, _set_Conductors) # type: List[Conductor] + """ + Array of conductor names for use in line constants calculation. + Must be used in conjunction with the "Spacing" property. + Specify the Spacing first, and "NCond" wires. + Specify the conductor type followed by the conductor name. e.g., "conductors=[CNData.cncablename, TSData.tscablename, WireData.wirename]" + If a given position in the spacing is not to be used in the line, use "none" in the entry of the conductors array. + + Name: `Conductors` """ def _get_NormAmps(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 31) + return self._lib.Obj_GetFloat64(self._ptr, 35) def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 31, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 35, value, flags) NormAmps = property(_get_NormAmps, _set_NormAmps) # type: float """ Normal rated current. - DSS property name: `NormAmps`, DSS property index: 31. + Name: `NormAmps` + Default: 400.0 """ def _get_EmergAmps(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 32) + return self._lib.Obj_GetFloat64(self._ptr, 36) def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 32, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 36, value, flags) EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: float """ - Maximum or emerg current. + Maximum or emergency current rating. - DSS property name: `EmergAmps`, DSS property index: 32. + Name: `EmergAmps` + Default: 600.0 """ def _get_FaultRate(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 33) + return self._lib.Obj_GetFloat64(self._ptr, 37) def _set_FaultRate(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 33, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 37, value, flags) FaultRate = property(_get_FaultRate, _set_FaultRate) # type: float """ Failure rate PER UNIT LENGTH per year. Length must be same units as LENGTH property. Default is 0.1 fault per unit length per year. - DSS property name: `FaultRate`, DSS property index: 33. + Name: `FaultRate` + Default: 0.1 """ def _get_pctPerm(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 34) + return self._lib.Obj_GetFloat64(self._ptr, 38) def _set_pctPerm(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 34, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 38, value, flags) pctPerm = property(_get_pctPerm, _set_pctPerm) # type: float """ - Percent of failures that become permanent. Default is 20. + Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 34. + Name: `pctPerm` + Default: 20.0 """ def _get_Repair(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 35) + return self._lib.Obj_GetFloat64(self._ptr, 39) def _set_Repair(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 35, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 39, value, flags) Repair = property(_get_Repair, _set_Repair) # type: float """ - Hours to repair. Default is 3 hr. + Hours to repair. - DSS property name: `Repair`, DSS property index: 35. + Name: `Repair` + Default: 3.0 """ def _get_BaseFreq(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 36) + return self._lib.Obj_GetFloat64(self._ptr, 40) def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 36, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 40, value, flags) BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: float """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 36. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: - return self._lib.Obj_GetInt32(self._ptr, 37) != 0 + return self._lib.Obj_GetInt32(self._ptr, 41) != 0 def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): - self._lib.Obj_SetInt32(self._ptr, 37, value, flags) + self._lib.Obj_SetInt32(self._ptr, 41, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 37. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -715,9 +825,11 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 38. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_string_o(38, value) + self._set_string_o(42, value) class LineProperties(TypedDict): @@ -742,13 +854,16 @@ class LineProperties(TypedDict): Geometry: Union[AnyStr, LineGeometry] Units: Union[AnyStr, int, enums.LengthUnit] Spacing: Union[AnyStr, LineSpacing] - Conductors: List[Union[AnyStr, Union[WireData, CNData, TSData]]] EarthModel: Union[AnyStr, int, enums.EarthModel] B1: float B0: float Seasons: int Ratings: Float64Array LineType: Union[AnyStr, int, enums.LineType] + EpsRMedium: float + HeightOffset: float + HeightUnit: Union[AnyStr, int, enums.LengthUnit] + Conductors: Union[List[AnyStr], List[Conductor]] NormAmps: float EmergAmps: float FaultRate: float @@ -803,7 +918,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags bus1=busname (assumes all terminals connected in normal phase order) bus1=busname.3.1.2.0 (specify terminal to node connections explicitly) - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> List[str]: @@ -816,7 +931,7 @@ def _set_Bus2(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Name of bus to which 2nd terminal is connected. - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_LineCode_str(self) -> List[str]: @@ -830,7 +945,7 @@ def _set_LineCode_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Name of linecode object describing line impedances. If you use a line code, you do not need to specify the impedances here. The line code must have been PREVIOUSLY defined. The values specified last will prevail over those specified earlier (left-to-right sequence of properties). You can subsequently change the number of phases if symmetrical component quantities are specified.If no line code or impedance data are specified, the line object defaults to 336 MCM ACSR on 4 ft spacing. - DSS property name: `LineCode`, DSS property index: 3. + Name: `LineCode` """ def _get_LineCode(self) -> List[LineCodeObj]: @@ -844,7 +959,7 @@ def _set_LineCode(self, value: Union[AnyStr, LineCodeObj, List[AnyStr], List[Lin Name of linecode object describing line impedances. If you use a line code, you do not need to specify the impedances here. The line code must have been PREVIOUSLY defined. The values specified last will prevail over those specified earlier (left-to-right sequence of properties). You can subsequently change the number of phases if symmetrical component quantities are specified.If no line code or impedance data are specified, the line object defaults to 336 MCM ACSR on 4 ft spacing. - DSS property name: `LineCode`, DSS property index: 3. + Name: `LineCode` """ def _get_Length(self) -> BatchFloat64ArrayProxy: @@ -855,9 +970,10 @@ def _set_Length(self, value: Union[float, Float64Array], flags: enums.SetterFlag Length = property(_get_Length, _set_Length) # type: BatchFloat64ArrayProxy """ - Length of line. Default is 1.0. If units do not match the impedance data, specify "units" property. + Length of line. If units do not match the impedance data, specify "units" property. - DSS property name: `Length`, DSS property index: 4. + Name: `Length` + Default: 1.0 """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -870,7 +986,8 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of phases, this line. - DSS property name: `Phases`, DSS property index: 5. + Name: `Phases` + Default: 3 """ def _get_R1(self) -> BatchFloat64ArrayProxy: @@ -881,9 +998,11 @@ def _set_R1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = R1 = property(_get_R1, _set_R1) # type: BatchFloat64ArrayProxy """ - Positive-sequence Resistance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Rmatrix. + Positive-sequence Resistance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Rmatrix. - DSS property name: `R1`, DSS property index: 6. + Name: `R1` + Units: Ω/[length_unit] + Default: 0.058 """ def _get_X1(self) -> BatchFloat64ArrayProxy: @@ -894,9 +1013,11 @@ def _set_X1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = X1 = property(_get_X1, _set_X1) # type: BatchFloat64ArrayProxy """ - Positive-sequence Reactance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Xmatrix + Positive-sequence Reactance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Xmatrix - DSS property name: `X1`, DSS property index: 7. + Name: `X1` + Units: Ω/[length_unit] + Default: 0.1206 """ def _get_R0(self) -> BatchFloat64ArrayProxy: @@ -907,9 +1028,11 @@ def _set_R0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = R0 = property(_get_R0, _set_R0) # type: BatchFloat64ArrayProxy """ - Zero-sequence Resistance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. + Zero-sequence Resistance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. - DSS property name: `R0`, DSS property index: 8. + Name: `R0` + Units: Ω/[length_unit] + Default: 0.1784 """ def _get_X0(self) -> BatchFloat64ArrayProxy: @@ -920,9 +1043,11 @@ def _set_X0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = X0 = property(_get_X0, _set_X0) # type: BatchFloat64ArrayProxy """ - Zero-sequence Reactance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. + Zero-sequence Reactance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. - DSS property name: `X0`, DSS property index: 9. + Name: `X0` + Units: Ω/[length_unit] + Default: 0.4047 """ def _get_C1(self) -> BatchFloat64ArrayProxy: @@ -933,9 +1058,11 @@ def _set_C1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = C1 = property(_get_C1, _set_C1) # type: BatchFloat64ArrayProxy """ - Positive-sequence capacitance, nf per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Cmatrix and B1. + Positive-sequence capacitance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Cmatrix and B1. - DSS property name: `C1`, DSS property index: 10. + Name: `C1` + Units: nF/[length_unit] + Default: 3.3999999999999995 """ def _get_C0(self) -> BatchFloat64ArrayProxy: @@ -946,9 +1073,11 @@ def _set_C0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = C0 = property(_get_C0, _set_C0) # type: BatchFloat64ArrayProxy """ - Zero-sequence capacitance, nf per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition.See also B0. + Zero-sequence capacitance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition.See also B0. - DSS property name: `C0`, DSS property index: 11. + Name: `C0` + Units: nF/[length_unit] + Default: 1.5999999999999999 """ def _get_RMatrix(self) -> List[Float64Array]: @@ -962,9 +1091,10 @@ def _set_RMatrix(self, value: Union[Float64Array, List[Float64Array]], flags: en RMatrix = property(_get_RMatrix, _set_RMatrix) # type: List[Float64Array] """ - Resistance matrix, lower triangle, ohms per unit length. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. + Resistance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `RMatrix`, DSS property index: 12. + Name: `RMatrix` + Units: Ω/[length_unit] """ def _get_XMatrix(self) -> List[Float64Array]: @@ -978,9 +1108,10 @@ def _set_XMatrix(self, value: Union[Float64Array, List[Float64Array]], flags: en XMatrix = property(_get_XMatrix, _set_XMatrix) # type: List[Float64Array] """ - Reactance matrix, lower triangle, ohms per unit length. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. + Reactance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `XMatrix`, DSS property index: 13. + Name: `XMatrix` + Units: Ω/[length_unit] """ def _get_CMatrix(self) -> List[Float64Array]: @@ -994,9 +1125,11 @@ def _set_CMatrix(self, value: Union[Float64Array, List[Float64Array]], flags: en CMatrix = property(_get_CMatrix, _set_CMatrix) # type: List[Float64Array] """ - Nodal Capacitance matrix, lower triangle, nf per unit length.Order of the matrix is the number of phases. May be used to specify the shunt capacitance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. + Nodal Capacitance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the shunt capacitance of any line configuration. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `CMatrix`, DSS property index: 14. + Name: `CMatrix` + Units: nF/[length_unit] + Default: [[2.8, -0.5999999999999999, -0.5999999999999999], [-0.5999999999999999, 2.8, -0.5999999999999999], [-0.5999999999999999, -0.5999999999999999, 2.8]] """ def _get_Switch(self) -> List[bool]: @@ -1004,15 +1137,16 @@ def _get_Switch(self) -> List[bool]: self._get_batch_int32_prop(15) ] - def _set_Switch(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Switch(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(15, value, flags) Switch = property(_get_Switch, _set_Switch) # type: List[bool] """ - {y/n | T/F} Default= no/false. Designates this line as a switch for graphics and algorithmic purposes. + Designates this line as a switch for graphics and algorithmic purposes. SIDE EFFECT: Sets r1 = 1.0; x1 = 1.0; r0 = 1.0; x0 = 1.0; c1 = 1.1 ; c0 = 1.0; length = 0.001; You must reset if you want something different. - DSS property name: `Switch`, DSS property index: 15. + Name: `Switch` + Default: False """ def _get_Rg(self) -> BatchFloat64ArrayProxy: @@ -1025,7 +1159,9 @@ def _set_Rg(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Carson earth return resistance per unit length used to compute impedance values at base frequency. Default is 0.01805 = 60 Hz value in ohms per kft (matches default line impedances). This value is required for harmonic solutions if you wish to adjust the earth return impedances for frequency. If not, set both Rg and Xg = 0. - DSS property name: `Rg`, DSS property index: 16. + Name: `Rg` + Units: Ω/[length_unit] + Default: 0.01805 """ def _get_Xg(self) -> BatchFloat64ArrayProxy: @@ -1038,7 +1174,9 @@ def _set_Xg(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Carson earth return reactance per unit length used to compute impedance values at base frequency. For making better frequency adjustments. Default is 0.155081 = 60 Hz value in ohms per kft (matches default line impedances). This value is required for harmonic solutions if you wish to adjust the earth return impedances for frequency. If not, set both Rg and Xg = 0. - DSS property name: `Xg`, DSS property index: 17. + Name: `Xg` + Units: Ω/[length_unit] + Default: 0.155081 """ def _get_rho(self) -> BatchFloat64ArrayProxy: @@ -1049,9 +1187,11 @@ def _set_rho(self, value: Union[float, Float64Array], flags: enums.SetterFlags = rho = property(_get_rho, _set_rho) # type: BatchFloat64ArrayProxy """ - Default=100 meter ohms. Earth resistivity used to compute earth correction factor. Overrides Line geometry definition if specified. + Earth resistivity used to compute earth correction factor. Overrides Line geometry definition if specified. - DSS property name: `rho`, DSS property index: 18. + Name: `rho` + Units: Ωm + Default: 100.0 """ def _get_Geometry_str(self) -> List[str]: @@ -1064,7 +1204,7 @@ def _set_Geometry_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set """ Geometry code for LineGeometry Object. Supersedes any previous definition of line impedance. Line constants are computed for each frequency change or rho change. CAUTION: may alter number of phases. You cannot subsequently change the number of phases unless you change how the line impedance is defined. - DSS property name: `Geometry`, DSS property index: 19. + Name: `Geometry` """ def _get_Geometry(self) -> List[LineGeometry]: @@ -1077,7 +1217,7 @@ def _set_Geometry(self, value: Union[AnyStr, LineGeometry, List[AnyStr], List[Li """ Geometry code for LineGeometry Object. Supersedes any previous definition of line impedance. Line constants are computed for each frequency change or rho change. CAUTION: may alter number of phases. You cannot subsequently change the number of phases unless you change how the line impedance is defined. - DSS property name: `Geometry`, DSS property index: 19. + Name: `Geometry` """ def _get_Units(self) -> BatchInt32ArrayProxy: @@ -1092,9 +1232,11 @@ def _set_Units(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], L Units = property(_get_Units, _set_Units) # type: BatchInt32ArrayProxy """ - Length Units = {none | mi|kft|km|m|Ft|in|cm } Default is None - assumes length units match impedance units. + Length Units. Default is None - assumes length units match impedance units. + This property is reset to its default value when impedances are specified or edited. Make sure to specify desired value after specifying or editing any impedance property. - DSS property name: `Units`, DSS property index: 20. + Name: `Units` + Default: none """ def _get_Units_str(self) -> List[str]: @@ -1105,9 +1247,11 @@ def _set_Units_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Units_str = property(_get_Units_str, _set_Units_str) # type: List[str] """ - Length Units = {none | mi|kft|km|m|Ft|in|cm } Default is None - assumes length units match impedance units. + Length Units. Default is None - assumes length units match impedance units. + This property is reset to its default value when impedances are specified or edited. Make sure to specify desired value after specifying or editing any impedance property. - DSS property name: `Units`, DSS property index: 20. + Name: `Units` + Default: none """ def _get_Spacing_str(self) -> List[str]: @@ -1122,7 +1266,7 @@ def _set_Spacing_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett Must be used in conjunction with the Wires property. Specify this before the wires property. - DSS property name: `Spacing`, DSS property index: 21. + Name: `Spacing` """ def _get_Spacing(self) -> List[LineSpacing]: @@ -1137,43 +1281,7 @@ def _set_Spacing(self, value: Union[AnyStr, LineSpacing, List[AnyStr], List[Line Must be used in conjunction with the Wires property. Specify this before the wires property. - DSS property name: `Spacing`, DSS property index: 21. - """ - - def _get_Conductors_str(self) -> List[List[str]]: - return self._get_string_ll(22) - - def _set_Conductors_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): - self._set_batch_stringlist_prop(22, value, flags | enums.SetterFlags.AllowAllConductors) - - Conductors_str = property(_get_Conductors_str, _set_Conductors_str) # type: List[List[str]] - """ - Array of WireData names for use in an overhead line constants calculation. - Must be used in conjunction with the Spacing property. - Specify the Spacing first, and "ncond" wires. - May also be used to specify bare neutrals with cables, using "ncond-nphase" wires. - - DSS property name: `Wires`, DSS property index: 22. - """ - - def _get_Conductors(self) -> List[List[Union[WireData, CNData, TSData]]]: - return self._get_obj_ll(22, None) - - def _set_Conductors(self, value: Union[List[AnyStr], List[Union[WireData, CNData, TSData]]], flags: enums.SetterFlags = 0): - if (not len(value)) or isinstance(value[0], (bytes, str)) or (len(value[0]) and isinstance(value[0][0], (bytes, str))): - self._set_batch_stringlist_prop(22, value, flags | enums.SetterFlags.AllowAllConductors) - return - - self._set_batch_objlist_prop(22, value, flags | enums.SetterFlags.AllowAllConductors) - - Conductors = property(_get_Conductors, _set_Conductors) # type: List[List[Union[WireData, CNData, TSData]]] - """ - Array of WireData names for use in an overhead line constants calculation. - Must be used in conjunction with the Spacing property. - Specify the Spacing first, and "ncond" wires. - May also be used to specify bare neutrals with cables, using "ncond-nphase" wires. - - DSS property name: `Wires`, DSS property index: 22. + Name: `Spacing` """ def _get_EarthModel(self) -> BatchInt32ArrayProxy: @@ -1190,7 +1298,8 @@ def _set_EarthModel(self, value: Union[AnyStr, int, enums.EarthModel, List[AnySt """ One of {Carson | FullCarson | Deri}. Default is the global value established with the Set EarthModel command. See the Options Help on EarthModel option. This is used to override the global value for this line. This option applies only when the "geometry" property is used. - DSS property name: `EarthModel`, DSS property index: 23. + Name: `EarthModel` + Default: Deri """ def _get_EarthModel_str(self) -> List[str]: @@ -1203,7 +1312,8 @@ def _set_EarthModel_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ One of {Carson | FullCarson | Deri}. Default is the global value established with the Set EarthModel command. See the Options Help on EarthModel option. This is used to override the global value for this line. This option applies only when the "geometry" property is used. - DSS property name: `EarthModel`, DSS property index: 23. + Name: `EarthModel` + Default: Deri """ def _get_B1(self) -> BatchFloat64ArrayProxy: @@ -1216,7 +1326,8 @@ def _set_B1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Alternate way to specify C1. MicroS per unit length - DSS property name: `B1`, DSS property index: 26. + Name: `B1` + Units: μS/[length_unit] """ def _get_B0(self) -> BatchFloat64ArrayProxy: @@ -1229,7 +1340,8 @@ def _set_B0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Alternate way to specify C0. MicroS per unit length - DSS property name: `B0`, DSS property index: 27. + Name: `B0` + Units: μS/[length_unit] """ def _get_Seasons(self) -> BatchInt32ArrayProxy: @@ -1242,7 +1354,7 @@ def _set_Seasons(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 28. + Name: `Seasons` """ def _get_Ratings(self) -> List[Float64Array]: @@ -1259,7 +1371,8 @@ def _set_Ratings(self, value: Union[Float64Array, List[Float64Array]], flags: en An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. - DSS property name: `Ratings`, DSS property index: 29. + Name: `Ratings` + Default: [400.0] """ def _get_LineType(self) -> BatchInt32ArrayProxy: @@ -1274,12 +1387,11 @@ def _set_LineType(self, value: Union[AnyStr, int, enums.LineType, List[AnyStr], LineType = property(_get_LineType, _set_LineType) # type: BatchInt32ArrayProxy """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR - - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. - DSS property name: `LineType`, DSS property index: 30. + Name: `LineType` + Default: oh """ def _get_LineType_str(self) -> List[str]: @@ -1290,105 +1402,211 @@ def _set_LineType_str(self, value: AnyStr, flags: enums.SetterFlags = 0): LineType_str = property(_get_LineType_str, _set_LineType_str) # type: List[str] """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. + Name: `LineType` + Default: oh + """ + + def _get_EpsRMedium(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 31) - DSS property name: `LineType`, DSS property index: 30. + def _set_EpsRMedium(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(31, value, flags) + + EpsRMedium = property(_get_EpsRMedium, _set_EpsRMedium) # type: BatchFloat64ArrayProxy + """ + Relative permittivity of the medium. Used by lines with a geometry definition. + Defaults to 1.0 for air. + + Name: `EpsRMedium` + Default: 1.0 + """ + + def _get_HeightOffset(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 32) + + def _set_HeightOffset(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(32, value, flags) + + HeightOffset = property(_get_HeightOffset, _set_HeightOffset) # type: BatchFloat64ArrayProxy + """ + Average Height (or depth) offset to be applied on top of coordinates of geometry or spacing. + Use negative value for depth in underground lines. + + Name: `HeightOffset` + Default: 0.0 + """ + + def _get_HeightUnit(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 33) + + def _set_HeightUnit(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], List[int], List[enums.LengthUnit], Int32Array], flags: enums.SetterFlags = 0): + if isinstance(value, (str, bytes)) or (isinstance(value, LIST_LIKE) and isinstance(value[0], (str, bytes))): + self._set_batch_string(33, value, flags) + return + + self._set_batch_int32_array(33, value, flags) + + HeightUnit = property(_get_HeightUnit, _set_HeightUnit) # type: BatchInt32ArrayProxy + """ + Height offset units. If none is detected, meters is assumed. + + Name: `HeightUnit` + Default: m + """ + + def _get_HeightUnit_str(self) -> List[str]: + return self._get_batch_str_prop(33) + + def _set_HeightUnit_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_HeightUnit(value, flags) + + HeightUnit_str = property(_get_HeightUnit_str, _set_HeightUnit_str) # type: List[str] + """ + Height offset units. If none is detected, meters is assumed. + + Name: `HeightUnit` + Default: m + """ + + def _get_Conductors_str(self) -> List[List[str]]: + return self._get_string_ll(34) + + def _set_Conductors_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): + self._set_batch_stringlist_prop(34, value, flags) + + Conductors_str = property(_get_Conductors_str, _set_Conductors_str) # type: List[List[str]] + """ + Array of conductor names for use in line constants calculation. + Must be used in conjunction with the "Spacing" property. + Specify the Spacing first, and "NCond" wires. + Specify the conductor type followed by the conductor name. e.g., "conductors=[CNData.cncablename, TSData.tscablename, WireData.wirename]" + If a given position in the spacing is not to be used in the line, use "none" in the entry of the conductors array. + + Name: `Conductors` + """ + + def _get_Conductors(self) -> List[List[Conductor]]: + return self._get_obj_ll(34, None) + + def _set_Conductors(self, value: Union[List[AnyStr], List[Conductor]], flags: enums.SetterFlags = 0): + if (not len(value)) or isinstance(value[0], (bytes, str)) or (len(value[0]) and isinstance(value[0][0], (bytes, str))): + self._set_batch_stringlist_prop(34, value, flags) + return + + self._set_batch_objlist_prop(34, value, flags) + + Conductors = property(_get_Conductors, _set_Conductors) # type: List[List[Conductor]] + """ + Array of conductor names for use in line constants calculation. + Must be used in conjunction with the "Spacing" property. + Specify the Spacing first, and "NCond" wires. + Specify the conductor type followed by the conductor name. e.g., "conductors=[CNData.cncablename, TSData.tscablename, WireData.wirename]" + If a given position in the spacing is not to be used in the line, use "none" in the entry of the conductors array. + + Name: `Conductors` """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 31) + return BatchFloat64ArrayProxy(self, 35) def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(31, value, flags) + self._set_batch_float64_array(35, value, flags) NormAmps = property(_get_NormAmps, _set_NormAmps) # type: BatchFloat64ArrayProxy """ Normal rated current. - DSS property name: `NormAmps`, DSS property index: 31. + Name: `NormAmps` + Default: 400.0 """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 32) + return BatchFloat64ArrayProxy(self, 36) def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(32, value, flags) + self._set_batch_float64_array(36, value, flags) EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: BatchFloat64ArrayProxy """ - Maximum or emerg current. + Maximum or emergency current rating. - DSS property name: `EmergAmps`, DSS property index: 32. + Name: `EmergAmps` + Default: 600.0 """ def _get_FaultRate(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 33) + return BatchFloat64ArrayProxy(self, 37) def _set_FaultRate(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(33, value, flags) + self._set_batch_float64_array(37, value, flags) FaultRate = property(_get_FaultRate, _set_FaultRate) # type: BatchFloat64ArrayProxy """ Failure rate PER UNIT LENGTH per year. Length must be same units as LENGTH property. Default is 0.1 fault per unit length per year. - DSS property name: `FaultRate`, DSS property index: 33. + Name: `FaultRate` + Default: 0.1 """ def _get_pctPerm(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 34) + return BatchFloat64ArrayProxy(self, 38) def _set_pctPerm(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(34, value, flags) + self._set_batch_float64_array(38, value, flags) pctPerm = property(_get_pctPerm, _set_pctPerm) # type: BatchFloat64ArrayProxy """ - Percent of failures that become permanent. Default is 20. + Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 34. + Name: `pctPerm` + Default: 20.0 """ def _get_Repair(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 35) + return BatchFloat64ArrayProxy(self, 39) def _set_Repair(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(35, value, flags) + self._set_batch_float64_array(39, value, flags) Repair = property(_get_Repair, _set_Repair) # type: BatchFloat64ArrayProxy """ - Hours to repair. Default is 3 hr. + Hours to repair. - DSS property name: `Repair`, DSS property index: 35. + Name: `Repair` + Default: 3.0 """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 36) + return BatchFloat64ArrayProxy(self, 40) def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(36, value, flags) + self._set_batch_float64_array(40, value, flags) BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: BatchFloat64ArrayProxy """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 36. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: return [v != 0 for v in - self._get_batch_int32_prop(37) + self._get_batch_int32_prop(41) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): - self._set_batch_int32_array(37, value, flags) + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(41, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 37. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1397,9 +1615,11 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 38. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_batch_string(38, value, flags) + self._set_batch_string(42, value, flags) class LineBatchProperties(TypedDict): Bus1: Union[AnyStr, List[AnyStr]] @@ -1423,13 +1643,16 @@ class LineBatchProperties(TypedDict): Geometry: Union[AnyStr, LineGeometry, List[AnyStr], List[LineGeometry]] Units: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], List[int], List[enums.LengthUnit], Int32Array] Spacing: Union[AnyStr, LineSpacing, List[AnyStr], List[LineSpacing]] - Conductors: Union[List[AnyStr], List[Union[WireData, CNData, TSData]]] EarthModel: Union[AnyStr, int, enums.EarthModel, List[AnyStr], List[int], List[enums.EarthModel], Int32Array] B1: Union[float, Float64Array] B0: Union[float, Float64Array] Seasons: Union[int, Int32Array] Ratings: Float64Array LineType: Union[AnyStr, int, enums.LineType, List[AnyStr], List[int], List[enums.LineType], Int32Array] + EpsRMedium: Union[float, Float64Array] + HeightOffset: Union[float, Float64Array] + HeightUnit: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], List[int], List[enums.LengthUnit], Int32Array] + Conductors: Union[List[AnyStr], List[Conductor]] NormAmps: Union[float, Float64Array] EmergAmps: Union[float, Float64Array] FaultRate: Union[float, Float64Array] diff --git a/altdss/LineCode.py b/altdss/LineCode.py index f525060..09b21e2 100644 --- a/altdss/LineCode.py +++ b/altdss/LineCode.py @@ -99,7 +99,8 @@ def _set_NPhases(self, value: int, flags: enums.SetterFlags = 0): """ Number of phases in the line this line code data represents. Setting this property reinitializes the line code. Impedance matrix is reset for default symmetrical component. - DSS property name: `NPhases`, DSS property index: 1. + Name: `NPhases` + Default: 3 """ def _get_R1(self) -> float: @@ -110,9 +111,11 @@ def _set_R1(self, value: float, flags: enums.SetterFlags = 0): R1 = property(_get_R1, _set_R1) # type: float """ - Positive-sequence Resistance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Rmatrix. + Positive-sequence Resistance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Rmatrix. - DSS property name: `R1`, DSS property index: 2. + Name: `R1` + Units: Ω/[length_unit] + Default: 0.058 """ def _get_X1(self) -> float: @@ -123,9 +126,11 @@ def _set_X1(self, value: float, flags: enums.SetterFlags = 0): X1 = property(_get_X1, _set_X1) # type: float """ - Positive-sequence Reactance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Xmatrix + Positive-sequence Reactance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Xmatrix - DSS property name: `X1`, DSS property index: 3. + Name: `X1` + Units: Ω/[length_unit] + Default: 0.1206 """ def _get_R0(self) -> float: @@ -136,9 +141,11 @@ def _set_R0(self, value: float, flags: enums.SetterFlags = 0): R0 = property(_get_R0, _set_R0) # type: float """ - Zero-sequence Resistance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. + Zero-sequence Resistance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. - DSS property name: `R0`, DSS property index: 4. + Name: `R0` + Units: Ω/[length_unit] + Default: 0.1784 """ def _get_X0(self) -> float: @@ -149,9 +156,11 @@ def _set_X0(self, value: float, flags: enums.SetterFlags = 0): X0 = property(_get_X0, _set_X0) # type: float """ - Zero-sequence Reactance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. + Zero-sequence Reactance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. - DSS property name: `X0`, DSS property index: 5. + Name: `X0` + Units: Ω/[length_unit] + Default: 0.4047 """ def _get_C1(self) -> float: @@ -162,9 +171,11 @@ def _set_C1(self, value: float, flags: enums.SetterFlags = 0): C1 = property(_get_C1, _set_C1) # type: float """ - Positive-sequence capacitance, nf per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Cmatrix and B1. + Positive-sequence capacitance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Cmatrix and B1. - DSS property name: `C1`, DSS property index: 6. + Name: `C1` + Units: nF/[length_unit] + Default: 3.3999999999999995 """ def _get_C0(self) -> float: @@ -175,9 +186,11 @@ def _set_C0(self, value: float, flags: enums.SetterFlags = 0): C0 = property(_get_C0, _set_C0) # type: float """ - Zero-sequence capacitance, nf per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also B0. + Zero-sequence capacitance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also B0. - DSS property name: `C0`, DSS property index: 7. + Name: `C0` + Units: nF/[length_unit] + Default: 1.5999999999999999 """ def _get_Units(self) -> enums.LengthUnit: @@ -191,9 +204,10 @@ def _set_Units(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enums.S Units = property(_get_Units, _set_Units) # type: enums.LengthUnit """ - One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. Default is none; assumes units agree with length units given in Line object + One of (ohms per ...). Assumes units agree with length units given in Line object. - DSS property name: `Units`, DSS property index: 8. + Name: `Units` + Default: none """ def _get_Units_str(self) -> str: @@ -204,9 +218,10 @@ def _set_Units_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Units_str = property(_get_Units_str, _set_Units_str) # type: str """ - One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. Default is none; assumes units agree with length units given in Line object + One of (ohms per ...). Assumes units agree with length units given in Line object. - DSS property name: `Units`, DSS property index: 8. + Name: `Units` + Default: none """ def _get_RMatrix(self) -> Float64Array: @@ -217,9 +232,11 @@ def _set_RMatrix(self, value: Float64Array, flags: enums.SetterFlags = 0): RMatrix = property(_get_RMatrix, _set_RMatrix) # type: Float64Array """ - Resistance matrix, lower triangle, ohms per unit length. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. + Resistance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `RMatrix`, DSS property index: 9. + Name: `RMatrix` + Units: Ω/[length_unit] + Default: [[0.09813333333333332, 0.04013333333333333, 0.04013333333333333], [0.04013333333333333, 0.09813333333333332, 0.04013333333333333], [0.04013333333333333, 0.04013333333333333, 0.09813333333333332]] """ def _get_XMatrix(self) -> Float64Array: @@ -230,9 +247,11 @@ def _set_XMatrix(self, value: Float64Array, flags: enums.SetterFlags = 0): XMatrix = property(_get_XMatrix, _set_XMatrix) # type: Float64Array """ - Reactance matrix, lower triangle, ohms per unit length. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. + Reactance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `XMatrix`, DSS property index: 10. + Name: `XMatrix` + Units: Ω/[length_unit] + Default: [[0.2153, 0.0947, 0.0947], [0.0947, 0.2153, 0.0947], [0.0947, 0.0947, 0.2153]] """ def _get_CMatrix(self) -> Float64Array: @@ -243,9 +262,11 @@ def _set_CMatrix(self, value: Float64Array, flags: enums.SetterFlags = 0): CMatrix = property(_get_CMatrix, _set_CMatrix) # type: Float64Array """ - Nodal Capacitance matrix, lower triangle, nf per unit length.Order of the matrix is the number of phases. May be used to specify the shunt capacitance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. + Nodal Capacitance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the shunt capacitance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `CMatrix`, DSS property index: 11. + Name: `CMatrix` + Units: nF/[length_unit] + Default: [[2.8, -0.5999999999999999, -0.5999999999999999], [-0.5999999999999999, 2.8, -0.5999999999999999], [-0.5999999999999999, -0.5999999999999999, 2.8]] """ def _get_BaseFreq(self) -> float: @@ -258,7 +279,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Frequency at which impedances are specified. - DSS property name: `BaseFreq`, DSS property index: 12. + Name: `BaseFreq` + Units: Hz """ def _get_NormAmps(self) -> float: @@ -271,7 +293,8 @@ def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): """ Normal ampere limit on line. This is the so-called Planning Limit. It may also be the value above which load will have to be dropped in a contingency. Usually about 75% - 80% of the emergency (one-hour) rating. - DSS property name: `NormAmps`, DSS property index: 13. + Name: `NormAmps` + Default: 400.0 """ def _get_EmergAmps(self) -> float: @@ -284,7 +307,8 @@ def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): """ Emergency ampere limit on line (usually one-hour rating). - DSS property name: `EmergAmps`, DSS property index: 14. + Name: `EmergAmps` + Default: 600.0 """ def _get_FaultRate(self) -> float: @@ -297,7 +321,11 @@ def _set_FaultRate(self, value: float, flags: enums.SetterFlags = 0): """ Number of faults per unit length per year. - DSS property name: `FaultRate`, DSS property index: 15. + **Unused** (unused internally by the models, but can be used to transport data) + **Deprecated:** In LineCode objects, "FaultRate" is not used in the DSS engine since 2014. Be sure to fill the values in each Line individually since they are not propagated from the LineCode! + + Name: `FaultRate` + Default: 0.1 """ def _get_PctPerm(self) -> float: @@ -310,7 +338,11 @@ def _set_PctPerm(self, value: float, flags: enums.SetterFlags = 0): """ Percentage of the faults that become permanent. - DSS property name: `PctPerm`, DSS property index: 16. + **Unused** (unused internally by the models, but can be used to transport data) + **Deprecated:** In LineCode objects, "PctPerm" is not used in the DSS engine since 2014. Be sure to fill the values in each Line individually since they are not propagated from the LineCode! + + Name: `PctPerm` + Default: 20.0 """ def _get_Repair(self) -> float: @@ -323,14 +355,19 @@ def _set_Repair(self, value: float, flags: enums.SetterFlags = 0): """ Hours to repair. - DSS property name: `Repair`, DSS property index: 17. + **Unused** (unused internally by the models, but can be used to transport data) + **Deprecated:** In LineCode objects, "Repair" is not used in the DSS engine since 2014. Be sure to fill the values in each Line individually since they are not propagated from the LineCode! + + Name: `Repair` + Default: 3.0 """ def Kron(self, value: bool = True, flags: enums.SetterFlags = 0): """ - Kron = Y/N. Default=N. Perform Kron reduction on the impedance matrix after it is formed, reducing order by 1. Eliminates the conductor designated by the "Neutral=" property. Do this after the R, X, and C matrices are defined. Ignored for symmetrical components. May be issued more than once to eliminate more than one conductor by resetting the Neutral property after the previous invoking of this property. Generally, you do not want to do a Kron reduction on the matrix if you intend to solve at a frequency other than the base frequency and exploit the Rg and Xg values. + Perform Kron reduction on the impedance matrix after it is formed, reducing order by 1. Eliminates the conductor designated by the "Neutral=" property. Do this after the R, X, and C matrices are defined. Ignored for symmetrical components. May be issued more than once to eliminate more than one conductor by resetting the Neutral property after the previous invoking of this property. Generally, you do not want to do a Kron reduction on the matrix if you intend to solve at a frequency other than the base frequency and exploit the Rg and Xg values. - DSS property name: `Kron`, DSS property index: 18. + Name: `Kron` + Default: False """ self._lib.Obj_SetInt32(self._ptr, 18, value, flags) @@ -344,7 +381,9 @@ def _set_Rg(self, value: float, flags: enums.SetterFlags = 0): """ Carson earth return resistance per unit length used to compute impedance values at base frequency. For making better frequency adjustments. Default is 0.01805 = 60 Hz value in ohms per kft (matches default line impedances). This value is required for harmonic solutions if you wish to adjust the earth return impedances for frequency. If not, set both Rg and Xg = 0. - DSS property name: `Rg`, DSS property index: 19. + Name: `Rg` + Units: Ω/[length_unit] + Default: 0.01805 """ def _get_Xg(self) -> float: @@ -357,7 +396,9 @@ def _set_Xg(self, value: float, flags: enums.SetterFlags = 0): """ Carson earth return reactance per unit length used to compute impedance values at base frequency. For making better frequency adjustments. Default value is 0.155081 = 60 Hz value in ohms per kft (matches default line impedances). This value is required for harmonic solutions if you wish to adjust the earth return impedances for frequency. If not, set both Rg and Xg = 0. - DSS property name: `Xg`, DSS property index: 20. + Name: `Xg` + Units: Ω/[length_unit] + Default: 0.155081 """ def _get_rho(self) -> float: @@ -368,9 +409,11 @@ def _set_rho(self, value: float, flags: enums.SetterFlags = 0): rho = property(_get_rho, _set_rho) # type: float """ - Default=100 meter ohms. Earth resitivity used to compute earth correction factor. + Earth resistivity used to compute earth correction factor. - DSS property name: `rho`, DSS property index: 21. + Name: `rho` + Units: Ωm + Default: 100.0 """ def _get_Neutral(self) -> int: @@ -383,7 +426,8 @@ def _set_Neutral(self, value: int, flags: enums.SetterFlags = 0): """ Designates which conductor is the "neutral" conductor that will be eliminated by Kron reduction. Default is the last conductor (nphases value). After Kron reduction is set to 0. Subsequent issuing of Kron=Yes will not do anything until this property is set to a legal value. Applies only to LineCodes defined by R, X, and C matrix. - DSS property name: `Neutral`, DSS property index: 22. + Name: `Neutral` + Default: 3 """ def _get_B1(self) -> float: @@ -394,9 +438,10 @@ def _set_B1(self, value: float, flags: enums.SetterFlags = 0): B1 = property(_get_B1, _set_B1) # type: float """ - Alternate way to specify C1. MicroS per unit length + Alternate way to specify C1. - DSS property name: `B1`, DSS property index: 23. + Name: `B1` + Units: μS/[length_unit] """ def _get_B0(self) -> float: @@ -407,9 +452,10 @@ def _set_B0(self, value: float, flags: enums.SetterFlags = 0): B0 = property(_get_B0, _set_B0) # type: float """ - Alternate way to specify C0. MicroS per unit length + Alternate way to specify C0. - DSS property name: `B0`, DSS property index: 24. + Name: `B0` + Units: μS/[length_unit] """ def _get_Seasons(self) -> int: @@ -422,7 +468,7 @@ def _set_Seasons(self, value: int, flags: enums.SetterFlags = 0): """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 25. + Name: `Seasons` """ def _get_Ratings(self) -> Float64Array: @@ -436,7 +482,8 @@ def _set_Ratings(self, value: Float64Array, flags: enums.SetterFlags = 0): An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. - DSS property name: `Ratings`, DSS property index: 26. + Name: `Ratings` + Default: [400.0] """ def _get_LineType(self) -> enums.LineType: @@ -450,12 +497,11 @@ def _set_LineType(self, value: Union[AnyStr, int, enums.LineType], flags: enums. LineType = property(_get_LineType, _set_LineType) # type: enums.LineType """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. - - DSS property name: `LineType`, DSS property index: 27. + Name: `LineType` + Default: oh """ def _get_LineType_str(self) -> str: @@ -466,12 +512,11 @@ def _set_LineType_str(self, value: AnyStr, flags: enums.SetterFlags = 0): LineType_str = property(_get_LineType_str, _set_LineType_str) # type: str """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR - - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. - DSS property name: `LineType`, DSS property index: 27. + Name: `LineType` + Default: oh """ def Like(self, value: AnyStr): @@ -480,7 +525,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 28. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(28, value) @@ -553,7 +600,8 @@ def _set_NPhases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of phases in the line this line code data represents. Setting this property reinitializes the line code. Impedance matrix is reset for default symmetrical component. - DSS property name: `NPhases`, DSS property index: 1. + Name: `NPhases` + Default: 3 """ def _get_R1(self) -> BatchFloat64ArrayProxy: @@ -564,9 +612,11 @@ def _set_R1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = R1 = property(_get_R1, _set_R1) # type: BatchFloat64ArrayProxy """ - Positive-sequence Resistance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Rmatrix. + Positive-sequence Resistance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Rmatrix. - DSS property name: `R1`, DSS property index: 2. + Name: `R1` + Units: Ω/[length_unit] + Default: 0.058 """ def _get_X1(self) -> BatchFloat64ArrayProxy: @@ -577,9 +627,11 @@ def _set_X1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = X1 = property(_get_X1, _set_X1) # type: BatchFloat64ArrayProxy """ - Positive-sequence Reactance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Xmatrix + Positive-sequence Reactance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Xmatrix - DSS property name: `X1`, DSS property index: 3. + Name: `X1` + Units: Ω/[length_unit] + Default: 0.1206 """ def _get_R0(self) -> BatchFloat64ArrayProxy: @@ -590,9 +642,11 @@ def _set_R0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = R0 = property(_get_R0, _set_R0) # type: BatchFloat64ArrayProxy """ - Zero-sequence Resistance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. + Zero-sequence Resistance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. - DSS property name: `R0`, DSS property index: 4. + Name: `R0` + Units: Ω/[length_unit] + Default: 0.1784 """ def _get_X0(self) -> BatchFloat64ArrayProxy: @@ -603,9 +657,11 @@ def _set_X0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = X0 = property(_get_X0, _set_X0) # type: BatchFloat64ArrayProxy """ - Zero-sequence Reactance, ohms per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. + Zero-sequence Reactance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. - DSS property name: `X0`, DSS property index: 5. + Name: `X0` + Units: Ω/[length_unit] + Default: 0.4047 """ def _get_C1(self) -> BatchFloat64ArrayProxy: @@ -616,9 +672,11 @@ def _set_C1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = C1 = property(_get_C1, _set_C1) # type: BatchFloat64ArrayProxy """ - Positive-sequence capacitance, nf per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Cmatrix and B1. + Positive-sequence capacitance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Cmatrix and B1. - DSS property name: `C1`, DSS property index: 6. + Name: `C1` + Units: nF/[length_unit] + Default: 3.3999999999999995 """ def _get_C0(self) -> BatchFloat64ArrayProxy: @@ -629,9 +687,11 @@ def _set_C0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = C0 = property(_get_C0, _set_C0) # type: BatchFloat64ArrayProxy """ - Zero-sequence capacitance, nf per unit length. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also B0. + Zero-sequence capacitance. Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also B0. - DSS property name: `C0`, DSS property index: 7. + Name: `C0` + Units: nF/[length_unit] + Default: 1.5999999999999999 """ def _get_Units(self) -> BatchInt32ArrayProxy: @@ -646,9 +706,10 @@ def _set_Units(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], L Units = property(_get_Units, _set_Units) # type: BatchInt32ArrayProxy """ - One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. Default is none; assumes units agree with length units given in Line object + One of (ohms per ...). Assumes units agree with length units given in Line object. - DSS property name: `Units`, DSS property index: 8. + Name: `Units` + Default: none """ def _get_Units_str(self) -> List[str]: @@ -659,9 +720,10 @@ def _set_Units_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Units_str = property(_get_Units_str, _set_Units_str) # type: List[str] """ - One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. Default is none; assumes units agree with length units given in Line object + One of (ohms per ...). Assumes units agree with length units given in Line object. - DSS property name: `Units`, DSS property index: 8. + Name: `Units` + Default: none """ def _get_RMatrix(self) -> List[Float64Array]: @@ -675,9 +737,11 @@ def _set_RMatrix(self, value: Union[Float64Array, List[Float64Array]], flags: en RMatrix = property(_get_RMatrix, _set_RMatrix) # type: List[Float64Array] """ - Resistance matrix, lower triangle, ohms per unit length. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. + Resistance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `RMatrix`, DSS property index: 9. + Name: `RMatrix` + Units: Ω/[length_unit] + Default: [[0.09813333333333332, 0.04013333333333333, 0.04013333333333333], [0.04013333333333333, 0.09813333333333332, 0.04013333333333333], [0.04013333333333333, 0.04013333333333333, 0.09813333333333332]] """ def _get_XMatrix(self) -> List[Float64Array]: @@ -691,9 +755,11 @@ def _set_XMatrix(self, value: Union[Float64Array, List[Float64Array]], flags: en XMatrix = property(_get_XMatrix, _set_XMatrix) # type: List[Float64Array] """ - Reactance matrix, lower triangle, ohms per unit length. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. + Reactance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `XMatrix`, DSS property index: 10. + Name: `XMatrix` + Units: Ω/[length_unit] + Default: [[0.2153, 0.0947, 0.0947], [0.0947, 0.2153, 0.0947], [0.0947, 0.0947, 0.2153]] """ def _get_CMatrix(self) -> List[Float64Array]: @@ -707,9 +773,11 @@ def _set_CMatrix(self, value: Union[Float64Array, List[Float64Array]], flags: en CMatrix = property(_get_CMatrix, _set_CMatrix) # type: List[Float64Array] """ - Nodal Capacitance matrix, lower triangle, nf per unit length.Order of the matrix is the number of phases. May be used to specify the shunt capacitance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. + Nodal Capacitance matrix, lower triangle. Order of the matrix is the number of phases. May be used to specify the shunt capacitance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead. - DSS property name: `CMatrix`, DSS property index: 11. + Name: `CMatrix` + Units: nF/[length_unit] + Default: [[2.8, -0.5999999999999999, -0.5999999999999999], [-0.5999999999999999, 2.8, -0.5999999999999999], [-0.5999999999999999, -0.5999999999999999, 2.8]] """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -722,7 +790,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Frequency at which impedances are specified. - DSS property name: `BaseFreq`, DSS property index: 12. + Name: `BaseFreq` + Units: Hz """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: @@ -735,7 +804,8 @@ def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Normal ampere limit on line. This is the so-called Planning Limit. It may also be the value above which load will have to be dropped in a contingency. Usually about 75% - 80% of the emergency (one-hour) rating. - DSS property name: `NormAmps`, DSS property index: 13. + Name: `NormAmps` + Default: 400.0 """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: @@ -748,7 +818,8 @@ def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterF """ Emergency ampere limit on line (usually one-hour rating). - DSS property name: `EmergAmps`, DSS property index: 14. + Name: `EmergAmps` + Default: 600.0 """ def _get_FaultRate(self) -> BatchFloat64ArrayProxy: @@ -761,7 +832,11 @@ def _set_FaultRate(self, value: Union[float, Float64Array], flags: enums.SetterF """ Number of faults per unit length per year. - DSS property name: `FaultRate`, DSS property index: 15. + **Unused** (unused internally by the models, but can be used to transport data) + **Deprecated:** In LineCode objects, "FaultRate" is not used in the DSS engine since 2014. Be sure to fill the values in each Line individually since they are not propagated from the LineCode! + + Name: `FaultRate` + Default: 0.1 """ def _get_PctPerm(self) -> BatchFloat64ArrayProxy: @@ -774,7 +849,11 @@ def _set_PctPerm(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Percentage of the faults that become permanent. - DSS property name: `PctPerm`, DSS property index: 16. + **Unused** (unused internally by the models, but can be used to transport data) + **Deprecated:** In LineCode objects, "PctPerm" is not used in the DSS engine since 2014. Be sure to fill the values in each Line individually since they are not propagated from the LineCode! + + Name: `PctPerm` + Default: 20.0 """ def _get_Repair(self) -> BatchFloat64ArrayProxy: @@ -787,14 +866,19 @@ def _set_Repair(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Hours to repair. - DSS property name: `Repair`, DSS property index: 17. + **Unused** (unused internally by the models, but can be used to transport data) + **Deprecated:** In LineCode objects, "Repair" is not used in the DSS engine since 2014. Be sure to fill the values in each Line individually since they are not propagated from the LineCode! + + Name: `Repair` + Default: 3.0 """ def Kron(self, value: Union[bool, List[bool]] = True, flags: enums.SetterFlags = 0): """ - Kron = Y/N. Default=N. Perform Kron reduction on the impedance matrix after it is formed, reducing order by 1. Eliminates the conductor designated by the "Neutral=" property. Do this after the R, X, and C matrices are defined. Ignored for symmetrical components. May be issued more than once to eliminate more than one conductor by resetting the Neutral property after the previous invoking of this property. Generally, you do not want to do a Kron reduction on the matrix if you intend to solve at a frequency other than the base frequency and exploit the Rg and Xg values. + Perform Kron reduction on the impedance matrix after it is formed, reducing order by 1. Eliminates the conductor designated by the "Neutral=" property. Do this after the R, X, and C matrices are defined. Ignored for symmetrical components. May be issued more than once to eliminate more than one conductor by resetting the Neutral property after the previous invoking of this property. Generally, you do not want to do a Kron reduction on the matrix if you intend to solve at a frequency other than the base frequency and exploit the Rg and Xg values. - DSS property name: `Kron`, DSS property index: 18. + Name: `Kron` + Default: False """ self._set_batch_int32_array(18, value, flags) @@ -808,7 +892,9 @@ def _set_Rg(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Carson earth return resistance per unit length used to compute impedance values at base frequency. For making better frequency adjustments. Default is 0.01805 = 60 Hz value in ohms per kft (matches default line impedances). This value is required for harmonic solutions if you wish to adjust the earth return impedances for frequency. If not, set both Rg and Xg = 0. - DSS property name: `Rg`, DSS property index: 19. + Name: `Rg` + Units: Ω/[length_unit] + Default: 0.01805 """ def _get_Xg(self) -> BatchFloat64ArrayProxy: @@ -821,7 +907,9 @@ def _set_Xg(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Carson earth return reactance per unit length used to compute impedance values at base frequency. For making better frequency adjustments. Default value is 0.155081 = 60 Hz value in ohms per kft (matches default line impedances). This value is required for harmonic solutions if you wish to adjust the earth return impedances for frequency. If not, set both Rg and Xg = 0. - DSS property name: `Xg`, DSS property index: 20. + Name: `Xg` + Units: Ω/[length_unit] + Default: 0.155081 """ def _get_rho(self) -> BatchFloat64ArrayProxy: @@ -832,9 +920,11 @@ def _set_rho(self, value: Union[float, Float64Array], flags: enums.SetterFlags = rho = property(_get_rho, _set_rho) # type: BatchFloat64ArrayProxy """ - Default=100 meter ohms. Earth resitivity used to compute earth correction factor. + Earth resistivity used to compute earth correction factor. - DSS property name: `rho`, DSS property index: 21. + Name: `rho` + Units: Ωm + Default: 100.0 """ def _get_Neutral(self) -> BatchInt32ArrayProxy: @@ -847,7 +937,8 @@ def _set_Neutral(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Designates which conductor is the "neutral" conductor that will be eliminated by Kron reduction. Default is the last conductor (nphases value). After Kron reduction is set to 0. Subsequent issuing of Kron=Yes will not do anything until this property is set to a legal value. Applies only to LineCodes defined by R, X, and C matrix. - DSS property name: `Neutral`, DSS property index: 22. + Name: `Neutral` + Default: 3 """ def _get_B1(self) -> BatchFloat64ArrayProxy: @@ -858,9 +949,10 @@ def _set_B1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = B1 = property(_get_B1, _set_B1) # type: BatchFloat64ArrayProxy """ - Alternate way to specify C1. MicroS per unit length + Alternate way to specify C1. - DSS property name: `B1`, DSS property index: 23. + Name: `B1` + Units: μS/[length_unit] """ def _get_B0(self) -> BatchFloat64ArrayProxy: @@ -871,9 +963,10 @@ def _set_B0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = B0 = property(_get_B0, _set_B0) # type: BatchFloat64ArrayProxy """ - Alternate way to specify C0. MicroS per unit length + Alternate way to specify C0. - DSS property name: `B0`, DSS property index: 24. + Name: `B0` + Units: μS/[length_unit] """ def _get_Seasons(self) -> BatchInt32ArrayProxy: @@ -886,7 +979,7 @@ def _set_Seasons(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 25. + Name: `Seasons` """ def _get_Ratings(self) -> List[Float64Array]: @@ -903,7 +996,8 @@ def _set_Ratings(self, value: Union[Float64Array, List[Float64Array]], flags: en An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. - DSS property name: `Ratings`, DSS property index: 26. + Name: `Ratings` + Default: [400.0] """ def _get_LineType(self) -> BatchInt32ArrayProxy: @@ -918,12 +1012,11 @@ def _set_LineType(self, value: Union[AnyStr, int, enums.LineType, List[AnyStr], LineType = property(_get_LineType, _set_LineType) # type: BatchInt32ArrayProxy """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. - - DSS property name: `LineType`, DSS property index: 27. + Name: `LineType` + Default: oh """ def _get_LineType_str(self) -> List[str]: @@ -934,12 +1027,11 @@ def _set_LineType_str(self, value: AnyStr, flags: enums.SetterFlags = 0): LineType_str = property(_get_LineType_str, _set_LineType_str) # type: List[str] """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR - - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. - DSS property name: `LineType`, DSS property index: 27. + Name: `LineType` + Default: oh """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -948,7 +1040,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 28. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(28, value, flags) diff --git a/altdss/LineGeometry.py b/altdss/LineGeometry.py index 9b68635..d5bfef5 100644 --- a/altdss/LineGeometry.py +++ b/altdss/LineGeometry.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -14,6 +14,8 @@ from .TSData import TSData from .WireData import WireData +Conductor = Union[WireData, CNData, TSData] + class LineGeometry(DSSObj): __slots__ = DSSObj._extra_slots _cls_name = 'LineGeometry' @@ -46,7 +48,6 @@ class LineGeometry(DSSObj): 'reduce': 10, 'spacing': 11, 'wires': 12, - 'conductors': 12, 'cncable': 13, 'tscable': 14, 'cncables': 15, @@ -54,7 +55,8 @@ class LineGeometry(DSSObj): 'seasons': 17, 'ratings': 18, 'linetype': 19, - 'like': 20, + 'conductors': 20, + 'like': 21, } @@ -83,9 +85,10 @@ def _set_NConds(self, value: int, flags: enums.SetterFlags = 0): NConds = property(_get_NConds, _set_NConds) # type: int """ - Number of conductors in this geometry. Default is 3. Triggers memory allocations. Define first! + Number of conductors in this geometry. Triggers memory allocations. Define first! - DSS property name: `NConds`, DSS property index: 1. + Name: `NConds` + Default: 0 """ def _get_NPhases(self) -> int: @@ -96,43 +99,10 @@ def _set_NPhases(self, value: int, flags: enums.SetterFlags = 0): NPhases = property(_get_NPhases, _set_NPhases) # type: int """ - Number of phases. Default =3; All other conductors are considered neutrals and might be reduced out. - - DSS property name: `NPhases`, DSS property index: 2. - """ - - def _get_Conductors_str(self) -> List[str]: - return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 12) - - def _set_Conductors_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): - self._set_string_array_o(12, value, flags | enums.SetterFlags.AllowAllConductors) - - Conductors_str = property(_get_Conductors_str, _set_Conductors_str) # type: List[str] - """ - Code from WireData. MUST BE PREVIOUSLY DEFINED. no default. - Specifies use of Overhead Line parameter calculation, - Unless Tape Shield cable previously assigned to phases, and this wire is a neutral. - - DSS property name: `Wire`, DSS property index: 4. - """ + Number of phases. All other conductors are considered neutrals and might be reduced out. - def _get_Conductors(self) -> List[Union[WireData, CNData, TSData]]: - return self._get_obj_array(12, None) - - def _set_Conductors(self, value: List[Union[AnyStr, Union[WireData, CNData, TSData]]], flags: enums.SetterFlags = 0): - if value is None or len(value) == 0 or not isinstance(value[0], DSSObj): - self._set_string_array_o(12, value, flags | enums.SetterFlags.AllowAllConductors) - return - - self._set_obj_array(12, value, flags | enums.SetterFlags.AllowAllConductors) - - Conductors = property(_get_Conductors, _set_Conductors) # type: List[Union[WireData, CNData, TSData]] - """ - Code from WireData. MUST BE PREVIOUSLY DEFINED. no default. - Specifies use of Overhead Line parameter calculation, - Unless Tape Shield cable previously assigned to phases, and this wire is a neutral. - - DSS property name: `Wire`, DSS property index: 4. + Name: `NPhases` + Default: 0 """ def _get_X(self) -> Float64Array: @@ -145,7 +115,7 @@ def _set_X(self, value: Float64Array, flags: enums.SetterFlags = 0): """ x coordinate. - DSS property name: `X`, DSS property index: 5. + Name: `X` """ def _get_H(self) -> Float64Array: @@ -158,36 +128,45 @@ def _set_H(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Height of conductor. - DSS property name: `H`, DSS property index: 6. + Name: `H` """ - def _get_Units(self) -> enums.LengthUnit: - return enums.LengthUnit(self._lib.Obj_GetInt32(self._ptr, 7)) + def _get_Units(self) -> List[enums.LengthUnit]: + return [enums.LengthUnit(val) for val in self._get_int32_list(self._lib.Obj_GetInt32Array, self._ptr, 7)] - def _set_Units(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enums.SetterFlags = 0): - if not isinstance(value, int): + def _set_Units(self, value: Union[List[Union[int, enums.LengthUnit]], List[AnyStr], int, enums.LengthUnit, AnyStr], flags: enums.SetterFlags = 0): + flags |= enums.SetterFlags.Broadcast + if isinstance(value, (str, bytes)): self._set_string_o(7, value, flags) return - self._lib.Obj_SetInt32(self._ptr, 7, value, flags) + + if isinstance(value, int): + self._lib.Obj_SetInt32(self._ptr, 7, value, flags) + return + + if len(value) and not isinstance(value[0], int): + self._set_string_array_o(7, value, flags) + return + self._set_int32_array_o(7, value, flags) Units = property(_get_Units, _set_Units) # type: enums.LengthUnit """ - Units for x and h: {mi|kft|km|m|Ft|in|cm } Initial default is "ft", but defaults to last unit defined + Units for x and h. Initial default is "ft", but defaults to last unit defined - DSS property name: `Units`, DSS property index: 7. + Name: `Units` """ - def _get_Units_str(self) -> str: - return self._get_prop_string(7) + def _get_Units_str(self) -> List[str]: + return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 7) - def _set_Units_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + def _set_Units_str(self, value: Union[List[AnyStr], AnyStr], flags: enums.SetterFlags = 0): self._set_Units(value, flags) - Units_str = property(_get_Units_str, _set_Units_str) # type: str + Units_str = property(_get_Units_str, _set_Units_str) # type: List[str] """ - Units for x and h: {mi|kft|km|m|Ft|in|cm } Initial default is "ft", but defaults to last unit defined + Units for x and h. Initial default is "ft", but defaults to last unit defined - DSS property name: `Units`, DSS property index: 7. + Name: `Units` """ def _get_NormAmps(self) -> float: @@ -200,7 +179,8 @@ def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): """ Normal ampacity, amperes for the line. Defaults to first conductor if not specified. - DSS property name: `NormAmps`, DSS property index: 8. + Name: `NormAmps` + Default: 0.0 """ def _get_EmergAmps(self) -> float: @@ -213,7 +193,8 @@ def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): """ Emergency ampacity, amperes. Defaults to first conductor if not specified. - DSS property name: `EmergAmps`, DSS property index: 9. + Name: `EmergAmps` + Default: 0.0 """ def _get_Reduce(self) -> bool: @@ -224,9 +205,10 @@ def _set_Reduce(self, value: bool, flags: enums.SetterFlags = 0): Reduce = property(_get_Reduce, _set_Reduce) # type: bool """ - {Yes | No} Default = no. Reduce to Nphases (Kron Reduction). Reduce out neutrals. + Reduce to Nphases (Kron Reduction). Reduce out neutrals. - DSS property name: `Reduce`, DSS property index: 10. + Name: `Reduce` + Default: False """ def _get_Spacing_str(self) -> str: @@ -242,7 +224,7 @@ def _set_Spacing_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Must match "nconds" as previously defined for this geometry. Must be used in conjunction with the Wires property. - DSS property name: `Spacing`, DSS property index: 11. + Name: `Spacing` """ def _get_Spacing(self) -> LineSpacing: @@ -262,7 +244,7 @@ def _set_Spacing(self, value: Union[AnyStr, LineSpacing], flags: enums.SetterFla Must match "nconds" as previously defined for this geometry. Must be used in conjunction with the Wires property. - DSS property name: `Spacing`, DSS property index: 11. + Name: `Spacing` """ def _get_Seasons(self) -> int: @@ -275,7 +257,7 @@ def _set_Seasons(self, value: int, flags: enums.SetterFlags = 0): """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. Defaults to first conductor if not specified. - DSS property name: `Seasons`, DSS property index: 17. + Name: `Seasons` """ def _get_Ratings(self) -> Float64Array: @@ -287,9 +269,10 @@ def _set_Ratings(self, value: Float64Array, flags: enums.SetterFlags = 0): Ratings = property(_get_Ratings, _set_Ratings) # type: Float64Array """ An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert - multiple ratings to change during a QSTS simulation to evaluate different ratings in lines.Defaults to first conductor if not specified. + multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. Defaults to first conductor if not specified. - DSS property name: `Ratings`, DSS property index: 18. + Name: `Ratings` + Default: [0.0] """ def _get_LineType(self) -> enums.LineType: @@ -303,12 +286,11 @@ def _set_LineType(self, value: Union[AnyStr, int, enums.LineType], flags: enums. LineType = property(_get_LineType, _set_LineType) # type: enums.LineType """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. - - DSS property name: `LineType`, DSS property index: 19. + Name: `LineType` + Default: oh """ def _get_LineType_str(self) -> str: @@ -319,12 +301,49 @@ def _set_LineType_str(self, value: AnyStr, flags: enums.SetterFlags = 0): LineType_str = property(_get_LineType_str, _set_LineType_str) # type: str """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. + + Name: `LineType` + Default: oh + """ - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. + def _get_Conductors_str(self) -> List[str]: + return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 20) + + def _set_Conductors_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): + self._set_string_array_o(20, value, flags) + + Conductors_str = property(_get_Conductors_str, _set_Conductors_str) # type: List[str] + """ + Array of conductor names for use in line constants calculation. + Must be used in conjunction with the Spacing property. + Specify the Spacing first, and `ncond` wires. + Specify the conductor type followed by the conductor name. e.g., "conductors=[cndata.cncablename, tsdata.tscablename, wiredata.wirename]" + If a given position in the spacing is not to be used in the line, use "none" in the entry of the conductors array. - DSS property name: `LineType`, DSS property index: 19. + Name: `Conductors` + """ + + def _get_Conductors(self) -> List[Conductor]: + return self._get_obj_array(20, None) + + def _set_Conductors(self, value: Union[List[AnyStr], List[Conductor]], flags: enums.SetterFlags = 0): + if value is None or len(value) == 0 or not isinstance(value[0], DSSObj): + self._set_string_array_o(20, value, flags) + return + + self._set_obj_array(20, value, flags) + + Conductors = property(_get_Conductors, _set_Conductors) # type: List[Conductor] + """ + Array of conductor names for use in line constants calculation. + Must be used in conjunction with the Spacing property. + Specify the Spacing first, and `ncond` wires. + Specify the conductor type followed by the conductor name. e.g., "conductors=[cndata.cncablename, tsdata.tscablename, wiredata.wirename]" + If a given position in the spacing is not to be used in the line, use "none" in the entry of the conductors array. + + Name: `Conductors` """ def Like(self, value: AnyStr): @@ -333,18 +352,19 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 20. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_string_o(20, value) + self._set_string_o(21, value) class LineGeometryProperties(TypedDict): NConds: int NPhases: int - Conductors: List[Union[AnyStr, Union[WireData, CNData, TSData]]] X: Float64Array H: Float64Array - Units: Union[AnyStr, int, enums.LengthUnit] + Units: Union[List[Union[int, enums.LengthUnit]], List[AnyStr]] NormAmps: float EmergAmps: float Reduce: bool @@ -352,6 +372,7 @@ class LineGeometryProperties(TypedDict): Seasons: int Ratings: Float64Array LineType: Union[AnyStr, int, enums.LineType] + Conductors: Union[List[AnyStr], List[Conductor]] Like: AnyStr class LineGeometryBatch(DSSBatch): @@ -390,9 +411,10 @@ def _set_NConds(self, value: Union[int, Int32Array], flags: enums.SetterFlags = NConds = property(_get_NConds, _set_NConds) # type: BatchInt32ArrayProxy """ - Number of conductors in this geometry. Default is 3. Triggers memory allocations. Define first! + Number of conductors in this geometry. Triggers memory allocations. Define first! - DSS property name: `NConds`, DSS property index: 1. + Name: `NConds` + Default: 0 """ def _get_NPhases(self) -> BatchInt32ArrayProxy: @@ -403,43 +425,10 @@ def _set_NPhases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = NPhases = property(_get_NPhases, _set_NPhases) # type: BatchInt32ArrayProxy """ - Number of phases. Default =3; All other conductors are considered neutrals and might be reduced out. + Number of phases. All other conductors are considered neutrals and might be reduced out. - DSS property name: `NPhases`, DSS property index: 2. - """ - - def _get_Conductors_str(self) -> List[List[str]]: - return self._get_string_ll(12) - - def _set_Conductors_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): - self._set_batch_stringlist_prop(12, value, flags | enums.SetterFlags.AllowAllConductors) - - Conductors_str = property(_get_Conductors_str, _set_Conductors_str) # type: List[List[str]] - """ - Code from WireData. MUST BE PREVIOUSLY DEFINED. no default. - Specifies use of Overhead Line parameter calculation, - Unless Tape Shield cable previously assigned to phases, and this wire is a neutral. - - DSS property name: `Wire`, DSS property index: 4. - """ - - def _get_Conductors(self) -> List[List[Union[WireData, CNData, TSData]]]: - return self._get_obj_ll(12, None) - - def _set_Conductors(self, value: Union[List[AnyStr], List[Union[WireData, CNData, TSData]]], flags: enums.SetterFlags = 0): - if (not len(value)) or isinstance(value[0], (bytes, str)) or (len(value[0]) and isinstance(value[0][0], (bytes, str))): - self._set_batch_stringlist_prop(12, value, flags | enums.SetterFlags.AllowAllConductors) - return - - self._set_batch_objlist_prop(12, value, flags | enums.SetterFlags.AllowAllConductors) - - Conductors = property(_get_Conductors, _set_Conductors) # type: List[List[Union[WireData, CNData, TSData]]] - """ - Code from WireData. MUST BE PREVIOUSLY DEFINED. no default. - Specifies use of Overhead Line parameter calculation, - Unless Tape Shield cable previously assigned to phases, and this wire is a neutral. - - DSS property name: `Wire`, DSS property index: 4. + Name: `NPhases` + Default: 0 """ def _get_X(self) -> List[Float64Array]: @@ -455,7 +444,7 @@ def _set_X(self, value: Union[Float64Array, List[Float64Array]], flags: enums.Se """ x coordinate. - DSS property name: `X`, DSS property index: 5. + Name: `X` """ def _get_H(self) -> List[Float64Array]: @@ -471,37 +460,49 @@ def _set_H(self, value: Union[Float64Array, List[Float64Array]], flags: enums.Se """ Height of conductor. - DSS property name: `H`, DSS property index: 6. + Name: `H` """ - def _get_Units(self) -> BatchInt32ArrayProxy: - return BatchInt32ArrayProxy(self, 7) + def _get_Units(self) -> List[Int32Array]: + return [ + self._get_int32_array(self._lib.Obj_GetInt32Array, x, 7) + for x in self._unpack() + ] - def _set_Units(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], List[int], List[enums.LengthUnit], Int32Array], flags: enums.SetterFlags = 0): - if isinstance(value, (str, bytes)) or (isinstance(value, LIST_LIKE) and isinstance(value[0], (str, bytes))): + def _set_Units(self, value: Union[List[Union[int, enums.LengthUnit]], List[AnyStr], int, enums.LengthUnit, AnyStr], flags: enums.SetterFlags = 0): #TODO: list of lists + flags |= enums.SetterFlags.Broadcast + if isinstance(value, (str, bytes)): self._set_batch_string(7, value, flags) return + if len(value) and not isinstance(value[0], int): + value, value_ptr, value_count = self._prepare_string_array(value) + for x in self._unpack(): + self._lib.Obj_SetStringArray(x, 7, value_ptr, value_count, flags) + + self._check_for_error() + return + self._set_batch_int32_array(7, value, flags) - Units = property(_get_Units, _set_Units) # type: BatchInt32ArrayProxy + Units = property(_get_Units, _set_Units) # type: List[Int32Array] """ - Units for x and h: {mi|kft|km|m|Ft|in|cm } Initial default is "ft", but defaults to last unit defined + Units for x and h. Initial default is "ft", but defaults to last unit defined - DSS property name: `Units`, DSS property index: 7. + Name: `Units` """ - def _get_Units_str(self) -> List[str]: - return self._get_batch_str_prop(7) + def _get_Units_str(self) -> List[List[str]]: + return self._get_string_ll(7) def _set_Units_str(self, value: AnyStr, flags: enums.SetterFlags = 0): self._set_Units(value, flags) - Units_str = property(_get_Units_str, _set_Units_str) # type: List[str] + Units_str = property(_get_Units_str, _set_Units_str) # type: List[List[str]] """ - Units for x and h: {mi|kft|km|m|Ft|in|cm } Initial default is "ft", but defaults to last unit defined + Units for x and h. Initial default is "ft", but defaults to last unit defined - DSS property name: `Units`, DSS property index: 7. + Name: `Units` """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: @@ -514,7 +515,8 @@ def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Normal ampacity, amperes for the line. Defaults to first conductor if not specified. - DSS property name: `NormAmps`, DSS property index: 8. + Name: `NormAmps` + Default: 0.0 """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: @@ -527,7 +529,8 @@ def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterF """ Emergency ampacity, amperes. Defaults to first conductor if not specified. - DSS property name: `EmergAmps`, DSS property index: 9. + Name: `EmergAmps` + Default: 0.0 """ def _get_Reduce(self) -> List[bool]: @@ -535,14 +538,15 @@ def _get_Reduce(self) -> List[bool]: self._get_batch_int32_prop(10) ] - def _set_Reduce(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Reduce(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(10, value, flags) Reduce = property(_get_Reduce, _set_Reduce) # type: List[bool] """ - {Yes | No} Default = no. Reduce to Nphases (Kron Reduction). Reduce out neutrals. + Reduce to Nphases (Kron Reduction). Reduce out neutrals. - DSS property name: `Reduce`, DSS property index: 10. + Name: `Reduce` + Default: False """ def _get_Spacing_str(self) -> List[str]: @@ -558,7 +562,7 @@ def _set_Spacing_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett Must match "nconds" as previously defined for this geometry. Must be used in conjunction with the Wires property. - DSS property name: `Spacing`, DSS property index: 11. + Name: `Spacing` """ def _get_Spacing(self) -> List[LineSpacing]: @@ -574,7 +578,7 @@ def _set_Spacing(self, value: Union[AnyStr, LineSpacing, List[AnyStr], List[Line Must match "nconds" as previously defined for this geometry. Must be used in conjunction with the Wires property. - DSS property name: `Spacing`, DSS property index: 11. + Name: `Spacing` """ def _get_Seasons(self) -> BatchInt32ArrayProxy: @@ -587,7 +591,7 @@ def _set_Seasons(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. Defaults to first conductor if not specified. - DSS property name: `Seasons`, DSS property index: 17. + Name: `Seasons` """ def _get_Ratings(self) -> List[Float64Array]: @@ -602,9 +606,10 @@ def _set_Ratings(self, value: Union[Float64Array, List[Float64Array]], flags: en Ratings = property(_get_Ratings, _set_Ratings) # type: List[Float64Array] """ An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert - multiple ratings to change during a QSTS simulation to evaluate different ratings in lines.Defaults to first conductor if not specified. + multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. Defaults to first conductor if not specified. - DSS property name: `Ratings`, DSS property index: 18. + Name: `Ratings` + Default: [0.0] """ def _get_LineType(self) -> BatchInt32ArrayProxy: @@ -619,12 +624,11 @@ def _set_LineType(self, value: Union[AnyStr, int, enums.LineType, List[AnyStr], LineType = property(_get_LineType, _set_LineType) # type: BatchInt32ArrayProxy """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR - - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. - DSS property name: `LineType`, DSS property index: 19. + Name: `LineType` + Default: oh """ def _get_LineType_str(self) -> List[str]: @@ -635,12 +639,49 @@ def _set_LineType_str(self, value: AnyStr, flags: enums.SetterFlags = 0): LineType_str = property(_get_LineType_str, _set_LineType_str) # type: List[str] """ - Code designating the type of line. - One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW, BUSBAR + Code designating the type of line. + OpenDSS currently does not use this internally. For whatever purpose the user defines. + + Name: `LineType` + Default: oh + """ + + def _get_Conductors_str(self) -> List[List[str]]: + return self._get_string_ll(20) - OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH. + def _set_Conductors_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): + self._set_batch_stringlist_prop(20, value, flags) - DSS property name: `LineType`, DSS property index: 19. + Conductors_str = property(_get_Conductors_str, _set_Conductors_str) # type: List[List[str]] + """ + Array of conductor names for use in line constants calculation. + Must be used in conjunction with the Spacing property. + Specify the Spacing first, and `ncond` wires. + Specify the conductor type followed by the conductor name. e.g., "conductors=[cndata.cncablename, tsdata.tscablename, wiredata.wirename]" + If a given position in the spacing is not to be used in the line, use "none" in the entry of the conductors array. + + Name: `Conductors` + """ + + def _get_Conductors(self) -> List[List[Conductor]]: + return self._get_obj_ll(20, None) + + def _set_Conductors(self, value: Union[List[AnyStr], List[Conductor]], flags: enums.SetterFlags = 0): + if (not len(value)) or isinstance(value[0], (bytes, str)) or (len(value[0]) and isinstance(value[0][0], (bytes, str))): + self._set_batch_stringlist_prop(20, value, flags) + return + + self._set_batch_objlist_prop(20, value, flags) + + Conductors = property(_get_Conductors, _set_Conductors) # type: List[List[Conductor]] + """ + Array of conductor names for use in line constants calculation. + Must be used in conjunction with the Spacing property. + Specify the Spacing first, and `ncond` wires. + Specify the conductor type followed by the conductor name. e.g., "conductors=[cndata.cncablename, tsdata.tscablename, wiredata.wirename]" + If a given position in the spacing is not to be used in the line, use "none" in the entry of the conductors array. + + Name: `Conductors` """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -649,17 +690,18 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 20. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_batch_string(20, value, flags) + self._set_batch_string(21, value, flags) class LineGeometryBatchProperties(TypedDict): NConds: Union[int, Int32Array] NPhases: Union[int, Int32Array] - Conductors: Union[List[AnyStr], List[Union[WireData, CNData, TSData]]] X: Float64Array H: Float64Array - Units: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], List[int], List[enums.LengthUnit], Int32Array] + Units: Union[List[Union[int, enums.LengthUnit]], List[AnyStr], int, enums.LengthUnit, AnyStr] NormAmps: Union[float, Float64Array] EmergAmps: Union[float, Float64Array] Reduce: bool @@ -667,6 +709,7 @@ class LineGeometryBatchProperties(TypedDict): Seasons: Union[int, Int32Array] Ratings: Float64Array LineType: Union[AnyStr, int, enums.LineType, List[AnyStr], List[int], List[enums.LineType], Int32Array] + Conductors: Union[List[AnyStr], List[Conductor]] Like: AnyStr class ILineGeometry(IDSSObj, LineGeometryBatch): diff --git a/altdss/LineSpacing.py b/altdss/LineSpacing.py index a8c8508..1717761 100644 --- a/altdss/LineSpacing.py +++ b/altdss/LineSpacing.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -7,7 +7,7 @@ from . import enums from .DSSObj import IDSSObj, DSSObj from .Batch import DSSBatch -from .ArrayProxy import BatchInt32ArrayProxy +from .ArrayProxy import BatchFloat64ArrayProxy, BatchInt32ArrayProxy from .common import LIST_LIKE class LineSpacing(DSSObj): @@ -18,8 +18,13 @@ class LineSpacing(DSSObj): 1, 2, 5, + 6, } _cls_float_idx = { + 7, + 8, + 9, + 10, } _cls_prop_idx = { 'nconds': 1, @@ -27,7 +32,12 @@ class LineSpacing(DSSObj): 'x': 3, 'h': 4, 'units': 5, - 'like': 6, + 'detailed': 6, + 'eqdistphph': 7, + 'eqdistphn': 8, + 'avgphaseheight': 9, + 'avgneutralheight': 10, + 'like': 11, } @@ -56,9 +66,9 @@ def _set_NConds(self, value: int, flags: enums.SetterFlags = 0): NConds = property(_get_NConds, _set_NConds) # type: int """ - Number of wires in this geometry. Default is 3. Triggers memory allocations. Define first! + Number of wires in this geometry. Triggers memory allocations. Define first! - DSS property name: `NConds`, DSS property index: 1. + Name: `NConds` """ def _get_NPhases(self) -> int: @@ -71,7 +81,8 @@ def _set_NPhases(self, value: int, flags: enums.SetterFlags = 0): """ Number of retained phase conductors. If less than the number of wires, list the retained phase coordinates first. - DSS property name: `NPhases`, DSS property index: 2. + Name: `NPhases` + Default: 3 """ def _get_X(self) -> Float64Array: @@ -84,7 +95,8 @@ def _set_X(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Array of wire X coordinates. - DSS property name: `X`, DSS property index: 3. + Name: `X` + Default: [0.0, 0.0, 0.0] """ def _get_H(self) -> Float64Array: @@ -97,7 +109,8 @@ def _set_H(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Array of wire Heights. - DSS property name: `H`, DSS property index: 4. + Name: `H` + Default: [0.0, 0.0, 0.0] """ def _get_Units(self) -> enums.LengthUnit: @@ -111,9 +124,10 @@ def _set_Units(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enums.S Units = property(_get_Units, _set_Units) # type: enums.LengthUnit """ - Units for x and h: {mi|kft|km|m|Ft|in|cm } Initial default is "ft", but defaults to last unit defined + Units for x and h. Initial default is "ft", but defaults to last unit defined - DSS property name: `Units`, DSS property index: 5. + Name: `Units` + Default: ft """ def _get_Units_str(self) -> str: @@ -124,9 +138,80 @@ def _set_Units_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Units_str = property(_get_Units_str, _set_Units_str) # type: str """ - Units for x and h: {mi|kft|km|m|Ft|in|cm } Initial default is "ft", but defaults to last unit defined + Units for x and h. Initial default is "ft", but defaults to last unit defined - DSS property name: `Units`, DSS property index: 5. + Name: `Units` + Default: ft + """ + + def _get_Detailed(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 6) != 0 + + def _set_Detailed(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 6, value, flags) + + Detailed = property(_get_Detailed, _set_Detailed) # type: bool + """ + Determines whether the spacing uses a detailed cross-section coordinates with x and h arrays (Yes/True), or uses equivalent spacing fields (No/False). The equivalent spacing fields are `EqDistPhPh`, `EqDistPhN`, `AvgPhaseHeight` and `AvgNeutralHeight`. + + Name: `Detailed` + Default: True + """ + + def _get_EqDistPhPh(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 7) + + def _set_EqDistPhPh(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 7, value, flags) + + EqDistPhPh = property(_get_EqDistPhPh, _set_EqDistPhPh) # type: float + """ + Equivalent distance between phase conductors. Used for equivalent distance modeling (`Detailed=yes`) as opposed to detailed cross-section coordinates. + + Name: `EqDistPhPh` + Default: 0.0 + """ + + def _get_EqDistPhN(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 8) + + def _set_EqDistPhN(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 8, value, flags) + + EqDistPhN = property(_get_EqDistPhN, _set_EqDistPhN) # type: float + """ + Equivalent distance between phase and neutral conductors. Used for equivalent distance modeling (`Detailed=yes`) as opposed to detailed cross-section coordinates. + + Name: `EqDistPhN` + Default: 0.0 + """ + + def _get_AvgPhaseHeight(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 9) + + def _set_AvgPhaseHeight(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 9, value, flags) + + AvgPhaseHeight = property(_get_AvgPhaseHeight, _set_AvgPhaseHeight) # type: float + """ + Average height of phase conductors. Used for equivalent distance modeling (`Detailed=yes`) as opposed to detailed cross-section coordinates. + + Name: `AvgPhaseHeight` + Default: 0.0 + """ + + def _get_AvgNeutralHeight(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 10) + + def _set_AvgNeutralHeight(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 10, value, flags) + + AvgNeutralHeight = property(_get_AvgNeutralHeight, _set_AvgNeutralHeight) # type: float + """ + Average height of neutral conductors. Used for equivalent distance modeling (`Detailed=yes`) as opposed to detailed cross-section coordinates. + + Name: `AvgNeutralHeight` + Default: 0.0 """ def Like(self, value: AnyStr): @@ -135,9 +220,11 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 6. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_string_o(6, value) + self._set_string_o(11, value) class LineSpacingProperties(TypedDict): @@ -146,6 +233,11 @@ class LineSpacingProperties(TypedDict): X: Float64Array H: Float64Array Units: Union[AnyStr, int, enums.LengthUnit] + Detailed: bool + EqDistPhPh: float + EqDistPhN: float + AvgPhaseHeight: float + AvgNeutralHeight: float Like: AnyStr class LineSpacingBatch(DSSBatch): @@ -184,9 +276,9 @@ def _set_NConds(self, value: Union[int, Int32Array], flags: enums.SetterFlags = NConds = property(_get_NConds, _set_NConds) # type: BatchInt32ArrayProxy """ - Number of wires in this geometry. Default is 3. Triggers memory allocations. Define first! + Number of wires in this geometry. Triggers memory allocations. Define first! - DSS property name: `NConds`, DSS property index: 1. + Name: `NConds` """ def _get_NPhases(self) -> BatchInt32ArrayProxy: @@ -199,7 +291,8 @@ def _set_NPhases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of retained phase conductors. If less than the number of wires, list the retained phase coordinates first. - DSS property name: `NPhases`, DSS property index: 2. + Name: `NPhases` + Default: 3 """ def _get_X(self) -> List[Float64Array]: @@ -215,7 +308,8 @@ def _set_X(self, value: Union[Float64Array, List[Float64Array]], flags: enums.Se """ Array of wire X coordinates. - DSS property name: `X`, DSS property index: 3. + Name: `X` + Default: [0.0, 0.0, 0.0] """ def _get_H(self) -> List[Float64Array]: @@ -231,7 +325,8 @@ def _set_H(self, value: Union[Float64Array, List[Float64Array]], flags: enums.Se """ Array of wire Heights. - DSS property name: `H`, DSS property index: 4. + Name: `H` + Default: [0.0, 0.0, 0.0] """ def _get_Units(self) -> BatchInt32ArrayProxy: @@ -246,9 +341,10 @@ def _set_Units(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], L Units = property(_get_Units, _set_Units) # type: BatchInt32ArrayProxy """ - Units for x and h: {mi|kft|km|m|Ft|in|cm } Initial default is "ft", but defaults to last unit defined + Units for x and h. Initial default is "ft", but defaults to last unit defined - DSS property name: `Units`, DSS property index: 5. + Name: `Units` + Default: ft """ def _get_Units_str(self) -> List[str]: @@ -259,9 +355,82 @@ def _set_Units_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Units_str = property(_get_Units_str, _set_Units_str) # type: List[str] """ - Units for x and h: {mi|kft|km|m|Ft|in|cm } Initial default is "ft", but defaults to last unit defined + Units for x and h. Initial default is "ft", but defaults to last unit defined - DSS property name: `Units`, DSS property index: 5. + Name: `Units` + Default: ft + """ + + def _get_Detailed(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(6) + ] + + def _set_Detailed(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(6, value, flags) + + Detailed = property(_get_Detailed, _set_Detailed) # type: List[bool] + """ + Determines whether the spacing uses a detailed cross-section coordinates with x and h arrays (Yes/True), or uses equivalent spacing fields (No/False). The equivalent spacing fields are `EqDistPhPh`, `EqDistPhN`, `AvgPhaseHeight` and `AvgNeutralHeight`. + + Name: `Detailed` + Default: True + """ + + def _get_EqDistPhPh(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 7) + + def _set_EqDistPhPh(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(7, value, flags) + + EqDistPhPh = property(_get_EqDistPhPh, _set_EqDistPhPh) # type: BatchFloat64ArrayProxy + """ + Equivalent distance between phase conductors. Used for equivalent distance modeling (`Detailed=yes`) as opposed to detailed cross-section coordinates. + + Name: `EqDistPhPh` + Default: 0.0 + """ + + def _get_EqDistPhN(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 8) + + def _set_EqDistPhN(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(8, value, flags) + + EqDistPhN = property(_get_EqDistPhN, _set_EqDistPhN) # type: BatchFloat64ArrayProxy + """ + Equivalent distance between phase and neutral conductors. Used for equivalent distance modeling (`Detailed=yes`) as opposed to detailed cross-section coordinates. + + Name: `EqDistPhN` + Default: 0.0 + """ + + def _get_AvgPhaseHeight(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 9) + + def _set_AvgPhaseHeight(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(9, value, flags) + + AvgPhaseHeight = property(_get_AvgPhaseHeight, _set_AvgPhaseHeight) # type: BatchFloat64ArrayProxy + """ + Average height of phase conductors. Used for equivalent distance modeling (`Detailed=yes`) as opposed to detailed cross-section coordinates. + + Name: `AvgPhaseHeight` + Default: 0.0 + """ + + def _get_AvgNeutralHeight(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 10) + + def _set_AvgNeutralHeight(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(10, value, flags) + + AvgNeutralHeight = property(_get_AvgNeutralHeight, _set_AvgNeutralHeight) # type: BatchFloat64ArrayProxy + """ + Average height of neutral conductors. Used for equivalent distance modeling (`Detailed=yes`) as opposed to detailed cross-section coordinates. + + Name: `AvgNeutralHeight` + Default: 0.0 """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -270,9 +439,11 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 6. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_batch_string(6, value, flags) + self._set_batch_string(11, value, flags) class LineSpacingBatchProperties(TypedDict): NConds: Union[int, Int32Array] @@ -280,6 +451,11 @@ class LineSpacingBatchProperties(TypedDict): X: Float64Array H: Float64Array Units: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], List[int], List[enums.LengthUnit], Int32Array] + Detailed: bool + EqDistPhPh: Union[float, Float64Array] + EqDistPhN: Union[float, Float64Array] + AvgPhaseHeight: Union[float, Float64Array] + AvgNeutralHeight: Union[float, Float64Array] Like: AnyStr class ILineSpacing(IDSSObj, LineSpacingBatch): diff --git a/altdss/Load.py b/altdss/Load.py index fea3c3c..9aa21e6 100644 --- a/altdss/Load.py +++ b/altdss/Load.py @@ -137,7 +137,8 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): """ Number of Phases, this load. Load is evenly divided among phases. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Bus1(self) -> str: @@ -150,7 +151,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Bus to which the load is connected. May include specific node specification. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kV(self) -> float: @@ -163,7 +164,9 @@ def _set_kV(self, value: float, flags: enums.SetterFlags = 0): """ Nominal rated (1.0 per unit) voltage, kV, for load. For 2- and 3-phase loads, specify phase-phase kV. Otherwise, specify actual kV across each branch of the load. If wye (star), specify phase-neutral kV. If delta or phase-phase connected, specify phase-phase kV. - DSS property name: `kV`, DSS property index: 3. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_kW(self) -> float: @@ -180,10 +183,12 @@ def _set_kW(self, value: float, flags: enums.SetterFlags = 0): kW, PF kW, kvar kVA, PF - XFKVA * Allocationfactor, PF - kWh/(kWhdays*24) * Cfactor, PF + XFKVA × Allocationfactor, PF + kWh / (kWhdays × 24) × Cfactor, PF - DSS property name: `kW`, DSS property index: 4. + Name: `kW` + Units: kW + Default: 10.0 """ def _get_PF(self) -> float: @@ -196,7 +201,8 @@ def _set_PF(self, value: float, flags: enums.SetterFlags = 0): """ Load power factor. Enter negative for leading powerfactor (when kW and kvar have opposite signs.) - DSS property name: `PF`, DSS property index: 5. + Name: `PF` + Default: 0.88 """ def _get_Model(self) -> enums.LoadModel: @@ -209,18 +215,19 @@ def _set_Model(self, value: Union[int, enums.LoadModel], flags: enums.SetterFlag """ Integer code for the model to use for load variation with voltage. Valid values are: - 1:Standard constant P+jQ load. (Default) - 2:Constant impedance load. - 3:Const P, Quadratic Q (like a motor). - 4:Nominal Linear P, Quadratic Q (feeder mix). Use this with CVRfactor. - 5:Constant Current Magnitude - 6:Const P, Fixed Q - 7:Const P, Fixed Impedance Q - 8:ZIPV (7 values) + - 1: Standard constant P+jQ load. (Default) + - 2: Constant impedance load. + - 3: Const P, Quadratic Q (like a motor). + - 4: Nominal Linear P, Quadratic Q (feeder mix). Use this with CVRfactor. + - 5: Constant Current Magnitude + - 6: Const P, Fixed Q + - 7: Const P, Fixed Impedance Q + - 8: ZIPV (7 values) For Types 6 and 7, only the P is modified by load multipliers. - DSS property name: `Model`, DSS property index: 6. + Name: `Model` + Default: 1 """ def _get_Yearly_str(self) -> str: @@ -233,7 +240,7 @@ def _set_Yearly_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ LOADSHAPE object to use for yearly simulations. Must be previously defined as a Loadshape object. Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. The default is no variation. - DSS property name: `Yearly`, DSS property index: 7. + Name: `Yearly` """ def _get_Yearly(self) -> LoadShape: @@ -250,7 +257,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags """ LOADSHAPE object to use for yearly simulations. Must be previously defined as a Loadshape object. Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. The default is no variation. - DSS property name: `Yearly`, DSS property index: 7. + Name: `Yearly` """ def _get_Daily_str(self) -> str: @@ -263,7 +270,7 @@ def _set_Daily_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ LOADSHAPE object to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. Default is no variation (constant) if not defined. Side effect: Sets Yearly load shape if not already defined. - DSS property name: `Daily`, DSS property index: 8. + Name: `Daily` """ def _get_Daily(self) -> LoadShape: @@ -280,7 +287,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ LOADSHAPE object to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. Default is no variation (constant) if not defined. Side effect: Sets Yearly load shape if not already defined. - DSS property name: `Daily`, DSS property index: 8. + Name: `Daily` """ def _get_Duty_str(self) -> str: @@ -293,7 +300,7 @@ def _set_Duty_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ LOADSHAPE object to use for duty cycle simulations. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr. 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.Set to NONE to reset to no loadshape. Set Status=Fixed to ignore Loadshape designation. Defaults to Daily curve If not specified. - DSS property name: `Duty`, DSS property index: 9. + Name: `Duty` """ def _get_Duty(self) -> LoadShape: @@ -310,7 +317,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ LOADSHAPE object to use for duty cycle simulations. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr. 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.Set to NONE to reset to no loadshape. Set Status=Fixed to ignore Loadshape designation. Defaults to Daily curve If not specified. - DSS property name: `Duty`, DSS property index: 9. + Name: `Duty` """ def _get_Growth_str(self) -> str: @@ -323,7 +330,7 @@ def _set_Growth_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Characteristic to use for growth factors by years. Must be previously defined as a Growthshape object. Defaults to circuit default growth factor (see Set Growth command). - DSS property name: `Growth`, DSS property index: 10. + Name: `Growth` """ def _get_Growth(self) -> GrowthShape: @@ -340,7 +347,7 @@ def _set_Growth(self, value: Union[AnyStr, GrowthShape], flags: enums.SetterFlag """ Characteristic to use for growth factors by years. Must be previously defined as a Growthshape object. Defaults to circuit default growth factor (see Set Growth command). - DSS property name: `Growth`, DSS property index: 10. + Name: `Growth` """ def _get_Conn(self) -> enums.Connection: @@ -356,7 +363,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection], flags: enums.Se """ ={wye or LN | delta or LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 11. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> str: @@ -369,7 +377,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={wye or LN | delta or LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 11. + Name: `Conn` + Default: Wye """ def _get_kvar(self) -> float: @@ -382,7 +391,8 @@ def _set_kvar(self, value: float, flags: enums.SetterFlags = 0): """ Specify the base kvar for specifying load as kW & kvar. Assumes kW has been already defined. Alternative to specifying the power factor. Side effect: the power factor and kVA is altered to agree. - DSS property name: `kvar`, DSS property index: 12. + Name: `kvar` + Units: kvar """ def _get_RNeut(self) -> float: @@ -393,9 +403,11 @@ def _set_RNeut(self, value: float, flags: enums.SetterFlags = 0): RNeut = property(_get_RNeut, _set_RNeut) # type: float """ - Default is -1. Neutral resistance of wye (star)-connected load in actual ohms. If entered as a negative value, the neutral can be open, or floating, or it can be connected to node 0 (ground), which is the usual default. If >=0 be sure to explicitly specify the node connection for the neutral, or last, conductor. Otherwise, the neutral impedance will be shorted to ground. + Neutral resistance of wye (star)-connected load in actual ohms. If entered as a negative value, the neutral can be open, or floating, or it can be connected to node 0 (ground), which is the usual default. If >=0 be sure to explicitly specify the node connection for the neutral, or last, conductor. Otherwise, the neutral impedance will be shorted to ground. - DSS property name: `RNeut`, DSS property index: 13. + Name: `RNeut` + Units: Ω + Default: -1.0 """ def _get_XNeut(self) -> float: @@ -406,9 +418,11 @@ def _set_XNeut(self, value: float, flags: enums.SetterFlags = 0): XNeut = property(_get_XNeut, _set_XNeut) # type: float """ - Neutral reactance of wye(star)-connected load in actual ohms. May be + or -. + Neutral reactance of wye(star)-connected load in actual ohms. May be positive or negative. - DSS property name: `XNeut`, DSS property index: 14. + Name: `XNeut` + Units: Ω + Default: 0.0 """ def _get_Status(self) -> enums.LoadStatus: @@ -424,7 +438,8 @@ def _set_Status(self, value: Union[AnyStr, int, enums.LoadStatus], flags: enums. """ ={Variable | Fixed | Exempt}. Default is variable. If Fixed, no load multipliers apply; however, growth multipliers do apply. All multipliers apply to Variable loads. Exempt loads are not modified by the global load multiplier, such as in load duration curves, etc. Daily multipliers do apply, so setting this property to Exempt is a good way to represent industrial load that stays the same day-after-day for the period study. - DSS property name: `Status`, DSS property index: 15. + Name: `Status` + Default: Variable """ def _get_Status_str(self) -> str: @@ -437,7 +452,8 @@ def _set_Status_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={Variable | Fixed | Exempt}. Default is variable. If Fixed, no load multipliers apply; however, growth multipliers do apply. All multipliers apply to Variable loads. Exempt loads are not modified by the global load multiplier, such as in load duration curves, etc. Daily multipliers do apply, so setting this property to Exempt is a good way to represent industrial load that stays the same day-after-day for the period study. - DSS property name: `Status`, DSS property index: 15. + Name: `Status` + Default: Variable """ def _get_Class(self) -> int: @@ -450,7 +466,8 @@ def _set_Class(self, value: int, flags: enums.SetterFlags = 0): """ An arbitrary integer number representing the class of load so that load values may be segregated by load value. Default is 1; not used internally. - DSS property name: `Class`, DSS property index: 16. + Name: `Class` + Default: 1 """ def _get_VMinpu(self) -> float: @@ -463,7 +480,8 @@ def _set_VMinpu(self, value: float, flags: enums.SetterFlags = 0): """ Default = 0.95. Minimum per unit voltage for which the MODEL is assumed to apply. Lower end of normal voltage range.Below this value, the load model reverts to a constant impedance model that matches the model at the transition voltage. See also "Vlowpu" which causes the model to match Model=2 below the transition voltage. - DSS property name: `VMinpu`, DSS property index: 17. + Name: `VMinpu` + Default: 0.95 """ def _get_VMaxpu(self) -> float: @@ -476,7 +494,8 @@ def _set_VMaxpu(self, value: float, flags: enums.SetterFlags = 0): """ Default = 1.05. Maximum per unit voltage for which the MODEL is assumed to apply. Above this value, the load model reverts to a constant impedance model. - DSS property name: `VMaxpu`, DSS property index: 18. + Name: `VMaxpu` + Default: 1.05 """ def _get_VMinNorm(self) -> float: @@ -489,7 +508,8 @@ def _set_VMinNorm(self, value: float, flags: enums.SetterFlags = 0): """ Minimum per unit voltage for load EEN evaluations, Normal limit. Default = 0, which defaults to system "vminnorm" property (see Set Command under Executive). If this property is specified, it ALWAYS overrides the system specification. This allows you to have different criteria for different loads. Set to zero to revert to the default system value. - DSS property name: `VMinNorm`, DSS property index: 19. + Name: `VMinNorm` + Default: 0.0 """ def _get_VMinEmerg(self) -> float: @@ -502,7 +522,8 @@ def _set_VMinEmerg(self, value: float, flags: enums.SetterFlags = 0): """ Minimum per unit voltage for load UE evaluations, Emergency limit. Default = 0, which defaults to system "vminemerg" property (see Set Command under Executive). If this property is specified, it ALWAYS overrides the system specification. This allows you to have different criteria for different loads. Set to zero to revert to the default system value. - DSS property name: `VMinEmerg`, DSS property index: 20. + Name: `VMinEmerg` + Default: 0.0 """ def _get_XfkVA(self) -> float: @@ -515,7 +536,9 @@ def _set_XfkVA(self, value: float, flags: enums.SetterFlags = 0): """ Default = 0.0. Rated kVA of service transformer for allocating loads based on connected kVA at a bus. Side effect: kW, PF, and kvar are modified. See help on kVA. - DSS property name: `XfkVA`, DSS property index: 21. + Name: `XfkVA` + Units: kVA + Default: 0.0 """ def _get_AllocationFactor(self) -> float: @@ -528,7 +551,8 @@ def _set_AllocationFactor(self, value: float, flags: enums.SetterFlags = 0): """ Default = 0.5. Allocation factor for allocating loads based on connected kVA at a bus. Side effect: kW, PF, and kvar are modified by multiplying this factor times the XFKVA (if > 0). - DSS property name: `AllocationFactor`, DSS property index: 22. + Name: `AllocationFactor` + Default: 0.5 """ def _get_kVA(self) -> float: @@ -545,10 +569,11 @@ def _set_kVA(self, value: float, flags: enums.SetterFlags = 0): kW, PF kW, kvar kVA, PF - XFKVA * Allocationfactor, PF - kWh/(kWhdays*24) * Cfactor, PF + XFKVA × Allocationfactor, PF + kWh / (kWhdays × 24) × Cfactor, PF - DSS property name: `kVA`, DSS property index: 23. + Name: `kVA` + Units: kVA """ def _get_pctMean(self) -> float: @@ -559,9 +584,10 @@ def _set_pctMean(self, value: float, flags: enums.SetterFlags = 0): pctMean = property(_get_pctMean, _set_pctMean) # type: float """ - Percent mean value for load to use for monte carlo studies if no loadshape is assigned to this load. Default is 50. + Percent mean value for load to use for monte carlo studies if no loadshape is assigned to this load. - DSS property name: `%Mean`, DSS property index: 24. + Name: `%Mean` + Default: 50.0 """ def _get_pctStdDev(self) -> float: @@ -572,9 +598,10 @@ def _set_pctStdDev(self, value: float, flags: enums.SetterFlags = 0): pctStdDev = property(_get_pctStdDev, _set_pctStdDev) # type: float """ - Percent Std deviation value for load to use for monte carlo studies if no loadshape is assigned to this load. Default is 10. + Percent Std deviation value for load to use for monte carlo studies if no loadshape is assigned to this load. - DSS property name: `%StdDev`, DSS property index: 25. + Name: `%StdDev` + Default: 10.0 """ def _get_CVRWatts(self) -> float: @@ -585,11 +612,12 @@ def _set_CVRWatts(self, value: float, flags: enums.SetterFlags = 0): CVRWatts = property(_get_CVRWatts, _set_CVRWatts) # type: float """ - Percent reduction in active power (watts) per 1% reduction in voltage from 100% rated. Default=1. + Percent reduction in active power (watts) per 1% reduction in voltage from 100% rated. Typical values range from 0.4 to 0.8. Applies to Model=4 only. Intended to represent conservation voltage reduction or voltage optimization measures. - DSS property name: `CVRWatts`, DSS property index: 26. + Name: `CVRWatts` + Default: 1.0 """ def _get_CVRVars(self) -> float: @@ -600,11 +628,12 @@ def _set_CVRVars(self, value: float, flags: enums.SetterFlags = 0): CVRVars = property(_get_CVRVars, _set_CVRVars) # type: float """ - Percent reduction in reactive power (vars) per 1% reduction in voltage from 100% rated. Default=2. + Percent reduction in reactive power (vars) per 1% reduction in voltage from 100% rated. Typical values range from 2 to 3. Applies to Model=4 only. Intended to represent conservation voltage reduction or voltage optimization measures. - DSS property name: `CVRVars`, DSS property index: 27. + Name: `CVRVars` + Default: 2.0 """ def _get_kWh(self) -> float: @@ -615,9 +644,11 @@ def _set_kWh(self, value: float, flags: enums.SetterFlags = 0): kWh = property(_get_kWh, _set_kWh) # type: float """ - kWh billed for this period. Default is 0. See help on kVA and Cfactor and kWhDays. + kWh billed for this period. See help on kVA and Cfactor and kWhDays. - DSS property name: `kWh`, DSS property index: 28. + Name: `kWh` + Units: kWh + Default: 0.0 """ def _get_kWhDays(self) -> float: @@ -628,9 +659,10 @@ def _set_kWhDays(self, value: float, flags: enums.SetterFlags = 0): kWhDays = property(_get_kWhDays, _set_kWhDays) # type: float """ - Length of kWh billing period in days (24 hr days). Default is 30. Average demand is computed using this value. + Length of kWh billing period in days (24 hr days). Average demand is computed using this value. - DSS property name: `kWhDays`, DSS property index: 29. + Name: `kWhDays` + Default: 30.0 """ def _get_CFactor(self) -> float: @@ -641,9 +673,10 @@ def _set_CFactor(self, value: float, flags: enums.SetterFlags = 0): CFactor = property(_get_CFactor, _set_CFactor) # type: float """ - Factor relating average kW to peak kW. Default is 4.0. See kWh and kWhdays. See kVA. + Factor relating average kW to peak kW. See kWh and kWhdays. See kVA. - DSS property name: `CFactor`, DSS property index: 30. + Name: `CFactor` + Default: 4.0 """ def _get_CVRCurve_str(self) -> str: @@ -656,7 +689,7 @@ def _set_CVRCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Default is NONE. Curve describing both watt and var factors as a function of time. Refers to a LoadShape object with both Mult and Qmult defined. Define a Loadshape to agree with yearly or daily curve according to the type of analysis being done. If NONE, the CVRwatts and CVRvars factors are used and assumed constant. - DSS property name: `CVRCurve`, DSS property index: 31. + Name: `CVRCurve` """ def _get_CVRCurve(self) -> LoadShape: @@ -673,7 +706,7 @@ def _set_CVRCurve(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlag """ Default is NONE. Curve describing both watt and var factors as a function of time. Refers to a LoadShape object with both Mult and Qmult defined. Define a Loadshape to agree with yearly or daily curve according to the type of analysis being done. If NONE, the CVRwatts and CVRvars factors are used and assumed constant. - DSS property name: `CVRCurve`, DSS property index: 31. + Name: `CVRCurve` """ def _get_NumCust(self) -> int: @@ -684,9 +717,10 @@ def _set_NumCust(self, value: int, flags: enums.SetterFlags = 0): NumCust = property(_get_NumCust, _set_NumCust) # type: int """ - Number of customers, this load. Default is 1. + Number of customers, this load. - DSS property name: `NumCust`, DSS property index: 32. + Name: `NumCust` + Default: 1 """ def _get_ZIPV(self) -> Float64Array: @@ -704,7 +738,7 @@ def _set_ZIPV(self, value: Float64Array, flags: enums.SetterFlags = 0): Last 1 is cut-off voltage in p.u. of base kV; load is 0 below this cut-off No defaults; all coefficients must be specified if using model=8. - DSS property name: `ZIPV`, DSS property index: 33. + Name: `ZIPV` """ def _get_pctSeriesRL(self) -> float: @@ -715,9 +749,10 @@ def _set_pctSeriesRL(self, value: float, flags: enums.SetterFlags = 0): pctSeriesRL = property(_get_pctSeriesRL, _set_pctSeriesRL) # type: float """ - Percent of load that is series R-L for Harmonic studies. Default is 50. Remainder is assumed to be parallel R and L. This can have a significant impact on the amount of damping observed in Harmonics solutions. + Percent of load that is series R-L for Harmonic studies. Remainder is assumed to be parallel R and L. This can have a significant impact on the amount of damping observed in Harmonics solutions. - DSS property name: `%SeriesRL`, DSS property index: 34. + Name: `%SeriesRL` + Default: 50.0 """ def _get_RelWeight(self) -> float: @@ -728,11 +763,12 @@ def _set_RelWeight(self, value: float, flags: enums.SetterFlags = 0): RelWeight = property(_get_RelWeight, _set_RelWeight) # type: float """ - Relative weighting factor for reliability calcs. Default = 1. Used to designate high priority loads such as hospitals, etc. + Relative weighting factor for reliability calcs. Used to designate high priority loads such as hospitals, etc. Is multiplied by number of customers and load kW during reliability calcs. - DSS property name: `RelWeight`, DSS property index: 35. + Name: `RelWeight` + Default: 1.0 """ def _get_VLowpu(self) -> float: @@ -743,9 +779,10 @@ def _set_VLowpu(self, value: float, flags: enums.SetterFlags = 0): VLowpu = property(_get_VLowpu, _set_VLowpu) # type: float """ - Default = 0.50. Per unit voltage at which the model switches to same as constant Z model (model=2). This allows more consistent convergence at very low voltaes due to opening switches or solving for fault situations. + Per unit voltage at which the model switches to same as constant Z model (model=2). This allows more consistent convergence at very low voltaes due to opening switches or solving for fault situations. - DSS property name: `VLowpu`, DSS property index: 36. + Name: `VLowpu` + Default: 0.5 """ def _get_puXHarm(self) -> float: @@ -760,9 +797,9 @@ def _set_puXHarm(self, value: float, flags: enums.SetterFlags = 0): Applies to load model in HARMONICS mode only. - A typical value would be approximately 0.20 pu based on kVA * %SeriesRL / 100.0. + A typical value would be approximately 0.20 pu based on kVA × %SeriesRL / 100.0. - DSS property name: `puXHarm`, DSS property index: 37. + Name: `puXHarm` """ def _get_XRHarm(self) -> float: @@ -773,9 +810,10 @@ def _set_XRHarm(self, value: float, flags: enums.SetterFlags = 0): XRHarm = property(_get_XRHarm, _set_XRHarm) # type: float """ - X/R ratio of the special harmonics mode reactance specified by the puXHARM property at fundamental frequency. Default is 6. + X/R ratio of the special harmonics mode reactance specified by the puXHARM property at fundamental frequency. - DSS property name: `XRHarm`, DSS property index: 38. + Name: `XRHarm` + Default: 6.0 """ def _get_Spectrum_str(self) -> str: @@ -786,9 +824,10 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str """ - Name of harmonic current spectrum for this load. Default is "defaultload", which is defined when the DSS starts. + Name of harmonic current spectrum for this load. - DSS property name: `Spectrum`, DSS property index: 39. + Name: `Spectrum` + Default: defaultload """ def _get_Spectrum(self) -> SpectrumObj: @@ -803,9 +842,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj """ - Name of harmonic current spectrum for this load. Default is "defaultload", which is defined when the DSS starts. + Name of harmonic current spectrum for this load. - DSS property name: `Spectrum`, DSS property index: 39. + Name: `Spectrum` + Default: defaultload """ def _get_BaseFreq(self) -> float: @@ -818,7 +858,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 40. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -829,9 +870,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 41. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -840,7 +882,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 42. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(42, value) @@ -931,7 +975,8 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of Phases, this load. Load is evenly divided among phases. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Bus1(self) -> List[str]: @@ -944,7 +989,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Bus to which the load is connected. May include specific node specification. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kV(self) -> BatchFloat64ArrayProxy: @@ -957,7 +1002,9 @@ def _set_kV(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Nominal rated (1.0 per unit) voltage, kV, for load. For 2- and 3-phase loads, specify phase-phase kV. Otherwise, specify actual kV across each branch of the load. If wye (star), specify phase-neutral kV. If delta or phase-phase connected, specify phase-phase kV. - DSS property name: `kV`, DSS property index: 3. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_kW(self) -> BatchFloat64ArrayProxy: @@ -974,10 +1021,12 @@ def _set_kW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = kW, PF kW, kvar kVA, PF - XFKVA * Allocationfactor, PF - kWh/(kWhdays*24) * Cfactor, PF + XFKVA × Allocationfactor, PF + kWh / (kWhdays × 24) × Cfactor, PF - DSS property name: `kW`, DSS property index: 4. + Name: `kW` + Units: kW + Default: 10.0 """ def _get_PF(self) -> BatchFloat64ArrayProxy: @@ -990,7 +1039,8 @@ def _set_PF(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Load power factor. Enter negative for leading powerfactor (when kW and kvar have opposite signs.) - DSS property name: `PF`, DSS property index: 5. + Name: `PF` + Default: 0.88 """ def _get_Model(self) -> BatchInt32ArrayProxy: @@ -1003,18 +1053,19 @@ def _set_Model(self, value: Union[int, enums.LoadModel, Int32Array], flags: enum """ Integer code for the model to use for load variation with voltage. Valid values are: - 1:Standard constant P+jQ load. (Default) - 2:Constant impedance load. - 3:Const P, Quadratic Q (like a motor). - 4:Nominal Linear P, Quadratic Q (feeder mix). Use this with CVRfactor. - 5:Constant Current Magnitude - 6:Const P, Fixed Q - 7:Const P, Fixed Impedance Q - 8:ZIPV (7 values) + - 1: Standard constant P+jQ load. (Default) + - 2: Constant impedance load. + - 3: Const P, Quadratic Q (like a motor). + - 4: Nominal Linear P, Quadratic Q (feeder mix). Use this with CVRfactor. + - 5: Constant Current Magnitude + - 6: Const P, Fixed Q + - 7: Const P, Fixed Impedance Q + - 8: ZIPV (7 values) For Types 6 and 7, only the P is modified by load multipliers. - DSS property name: `Model`, DSS property index: 6. + Name: `Model` + Default: 1 """ def _get_Yearly_str(self) -> List[str]: @@ -1027,7 +1078,7 @@ def _set_Yearly_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ LOADSHAPE object to use for yearly simulations. Must be previously defined as a Loadshape object. Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. The default is no variation. - DSS property name: `Yearly`, DSS property index: 7. + Name: `Yearly` """ def _get_Yearly(self) -> List[LoadShape]: @@ -1040,7 +1091,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadSha """ LOADSHAPE object to use for yearly simulations. Must be previously defined as a Loadshape object. Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. The default is no variation. - DSS property name: `Yearly`, DSS property index: 7. + Name: `Yearly` """ def _get_Daily_str(self) -> List[str]: @@ -1053,7 +1104,7 @@ def _set_Daily_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ LOADSHAPE object to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. Default is no variation (constant) if not defined. Side effect: Sets Yearly load shape if not already defined. - DSS property name: `Daily`, DSS property index: 8. + Name: `Daily` """ def _get_Daily(self) -> List[LoadShape]: @@ -1066,7 +1117,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShap """ LOADSHAPE object to use for daily simulations. Must be previously defined as a Loadshape object of 24 hrs, typically. Set Status=Fixed to ignore Loadshape designation. Set to NONE to reset to no loadshape. Default is no variation (constant) if not defined. Side effect: Sets Yearly load shape if not already defined. - DSS property name: `Daily`, DSS property index: 8. + Name: `Daily` """ def _get_Duty_str(self) -> List[str]: @@ -1079,7 +1130,7 @@ def _set_Duty_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ LOADSHAPE object to use for duty cycle simulations. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr. 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.Set to NONE to reset to no loadshape. Set Status=Fixed to ignore Loadshape designation. Defaults to Daily curve If not specified. - DSS property name: `Duty`, DSS property index: 9. + Name: `Duty` """ def _get_Duty(self) -> List[LoadShape]: @@ -1092,7 +1143,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape """ LOADSHAPE object to use for duty cycle simulations. Must be previously defined as a Loadshape object. Typically would have time intervals less than 1 hr. 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.Set to NONE to reset to no loadshape. Set Status=Fixed to ignore Loadshape designation. Defaults to Daily curve If not specified. - DSS property name: `Duty`, DSS property index: 9. + Name: `Duty` """ def _get_Growth_str(self) -> List[str]: @@ -1105,7 +1156,7 @@ def _set_Growth_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ Characteristic to use for growth factors by years. Must be previously defined as a Growthshape object. Defaults to circuit default growth factor (see Set Growth command). - DSS property name: `Growth`, DSS property index: 10. + Name: `Growth` """ def _get_Growth(self) -> List[GrowthShape]: @@ -1118,7 +1169,7 @@ def _set_Growth(self, value: Union[AnyStr, GrowthShape, List[AnyStr], List[Growt """ Characteristic to use for growth factors by years. Must be previously defined as a Growthshape object. Defaults to circuit default growth factor (see Set Growth command). - DSS property name: `Growth`, DSS property index: 10. + Name: `Growth` """ def _get_Conn(self) -> BatchInt32ArrayProxy: @@ -1135,7 +1186,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection, List[AnyStr], Li """ ={wye or LN | delta or LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 11. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> List[str]: @@ -1148,7 +1200,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={wye or LN | delta or LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 11. + Name: `Conn` + Default: Wye """ def _get_kvar(self) -> BatchFloat64ArrayProxy: @@ -1161,7 +1214,8 @@ def _set_kvar(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Specify the base kvar for specifying load as kW & kvar. Assumes kW has been already defined. Alternative to specifying the power factor. Side effect: the power factor and kVA is altered to agree. - DSS property name: `kvar`, DSS property index: 12. + Name: `kvar` + Units: kvar """ def _get_RNeut(self) -> BatchFloat64ArrayProxy: @@ -1172,9 +1226,11 @@ def _set_RNeut(self, value: Union[float, Float64Array], flags: enums.SetterFlags RNeut = property(_get_RNeut, _set_RNeut) # type: BatchFloat64ArrayProxy """ - Default is -1. Neutral resistance of wye (star)-connected load in actual ohms. If entered as a negative value, the neutral can be open, or floating, or it can be connected to node 0 (ground), which is the usual default. If >=0 be sure to explicitly specify the node connection for the neutral, or last, conductor. Otherwise, the neutral impedance will be shorted to ground. + Neutral resistance of wye (star)-connected load in actual ohms. If entered as a negative value, the neutral can be open, or floating, or it can be connected to node 0 (ground), which is the usual default. If >=0 be sure to explicitly specify the node connection for the neutral, or last, conductor. Otherwise, the neutral impedance will be shorted to ground. - DSS property name: `RNeut`, DSS property index: 13. + Name: `RNeut` + Units: Ω + Default: -1.0 """ def _get_XNeut(self) -> BatchFloat64ArrayProxy: @@ -1185,9 +1241,11 @@ def _set_XNeut(self, value: Union[float, Float64Array], flags: enums.SetterFlags XNeut = property(_get_XNeut, _set_XNeut) # type: BatchFloat64ArrayProxy """ - Neutral reactance of wye(star)-connected load in actual ohms. May be + or -. + Neutral reactance of wye(star)-connected load in actual ohms. May be positive or negative. - DSS property name: `XNeut`, DSS property index: 14. + Name: `XNeut` + Units: Ω + Default: 0.0 """ def _get_Status(self) -> BatchInt32ArrayProxy: @@ -1204,7 +1262,8 @@ def _set_Status(self, value: Union[AnyStr, int, enums.LoadStatus, List[AnyStr], """ ={Variable | Fixed | Exempt}. Default is variable. If Fixed, no load multipliers apply; however, growth multipliers do apply. All multipliers apply to Variable loads. Exempt loads are not modified by the global load multiplier, such as in load duration curves, etc. Daily multipliers do apply, so setting this property to Exempt is a good way to represent industrial load that stays the same day-after-day for the period study. - DSS property name: `Status`, DSS property index: 15. + Name: `Status` + Default: Variable """ def _get_Status_str(self) -> List[str]: @@ -1217,7 +1276,8 @@ def _set_Status_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={Variable | Fixed | Exempt}. Default is variable. If Fixed, no load multipliers apply; however, growth multipliers do apply. All multipliers apply to Variable loads. Exempt loads are not modified by the global load multiplier, such as in load duration curves, etc. Daily multipliers do apply, so setting this property to Exempt is a good way to represent industrial load that stays the same day-after-day for the period study. - DSS property name: `Status`, DSS property index: 15. + Name: `Status` + Default: Variable """ def _get_Class(self) -> BatchInt32ArrayProxy: @@ -1230,7 +1290,8 @@ def _set_Class(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0 """ An arbitrary integer number representing the class of load so that load values may be segregated by load value. Default is 1; not used internally. - DSS property name: `Class`, DSS property index: 16. + Name: `Class` + Default: 1 """ def _get_VMinpu(self) -> BatchFloat64ArrayProxy: @@ -1243,7 +1304,8 @@ def _set_VMinpu(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Default = 0.95. Minimum per unit voltage for which the MODEL is assumed to apply. Lower end of normal voltage range.Below this value, the load model reverts to a constant impedance model that matches the model at the transition voltage. See also "Vlowpu" which causes the model to match Model=2 below the transition voltage. - DSS property name: `VMinpu`, DSS property index: 17. + Name: `VMinpu` + Default: 0.95 """ def _get_VMaxpu(self) -> BatchFloat64ArrayProxy: @@ -1256,7 +1318,8 @@ def _set_VMaxpu(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Default = 1.05. Maximum per unit voltage for which the MODEL is assumed to apply. Above this value, the load model reverts to a constant impedance model. - DSS property name: `VMaxpu`, DSS property index: 18. + Name: `VMaxpu` + Default: 1.05 """ def _get_VMinNorm(self) -> BatchFloat64ArrayProxy: @@ -1269,7 +1332,8 @@ def _set_VMinNorm(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Minimum per unit voltage for load EEN evaluations, Normal limit. Default = 0, which defaults to system "vminnorm" property (see Set Command under Executive). If this property is specified, it ALWAYS overrides the system specification. This allows you to have different criteria for different loads. Set to zero to revert to the default system value. - DSS property name: `VMinNorm`, DSS property index: 19. + Name: `VMinNorm` + Default: 0.0 """ def _get_VMinEmerg(self) -> BatchFloat64ArrayProxy: @@ -1282,7 +1346,8 @@ def _set_VMinEmerg(self, value: Union[float, Float64Array], flags: enums.SetterF """ Minimum per unit voltage for load UE evaluations, Emergency limit. Default = 0, which defaults to system "vminemerg" property (see Set Command under Executive). If this property is specified, it ALWAYS overrides the system specification. This allows you to have different criteria for different loads. Set to zero to revert to the default system value. - DSS property name: `VMinEmerg`, DSS property index: 20. + Name: `VMinEmerg` + Default: 0.0 """ def _get_XfkVA(self) -> BatchFloat64ArrayProxy: @@ -1295,7 +1360,9 @@ def _set_XfkVA(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Default = 0.0. Rated kVA of service transformer for allocating loads based on connected kVA at a bus. Side effect: kW, PF, and kvar are modified. See help on kVA. - DSS property name: `XfkVA`, DSS property index: 21. + Name: `XfkVA` + Units: kVA + Default: 0.0 """ def _get_AllocationFactor(self) -> BatchFloat64ArrayProxy: @@ -1308,7 +1375,8 @@ def _set_AllocationFactor(self, value: Union[float, Float64Array], flags: enums. """ Default = 0.5. Allocation factor for allocating loads based on connected kVA at a bus. Side effect: kW, PF, and kvar are modified by multiplying this factor times the XFKVA (if > 0). - DSS property name: `AllocationFactor`, DSS property index: 22. + Name: `AllocationFactor` + Default: 0.5 """ def _get_kVA(self) -> BatchFloat64ArrayProxy: @@ -1325,10 +1393,11 @@ def _set_kVA(self, value: Union[float, Float64Array], flags: enums.SetterFlags = kW, PF kW, kvar kVA, PF - XFKVA * Allocationfactor, PF - kWh/(kWhdays*24) * Cfactor, PF + XFKVA × Allocationfactor, PF + kWh / (kWhdays × 24) × Cfactor, PF - DSS property name: `kVA`, DSS property index: 23. + Name: `kVA` + Units: kVA """ def _get_pctMean(self) -> BatchFloat64ArrayProxy: @@ -1339,9 +1408,10 @@ def _set_pctMean(self, value: Union[float, Float64Array], flags: enums.SetterFla pctMean = property(_get_pctMean, _set_pctMean) # type: BatchFloat64ArrayProxy """ - Percent mean value for load to use for monte carlo studies if no loadshape is assigned to this load. Default is 50. + Percent mean value for load to use for monte carlo studies if no loadshape is assigned to this load. - DSS property name: `%Mean`, DSS property index: 24. + Name: `%Mean` + Default: 50.0 """ def _get_pctStdDev(self) -> BatchFloat64ArrayProxy: @@ -1352,9 +1422,10 @@ def _set_pctStdDev(self, value: Union[float, Float64Array], flags: enums.SetterF pctStdDev = property(_get_pctStdDev, _set_pctStdDev) # type: BatchFloat64ArrayProxy """ - Percent Std deviation value for load to use for monte carlo studies if no loadshape is assigned to this load. Default is 10. + Percent Std deviation value for load to use for monte carlo studies if no loadshape is assigned to this load. - DSS property name: `%StdDev`, DSS property index: 25. + Name: `%StdDev` + Default: 10.0 """ def _get_CVRWatts(self) -> BatchFloat64ArrayProxy: @@ -1365,11 +1436,12 @@ def _set_CVRWatts(self, value: Union[float, Float64Array], flags: enums.SetterFl CVRWatts = property(_get_CVRWatts, _set_CVRWatts) # type: BatchFloat64ArrayProxy """ - Percent reduction in active power (watts) per 1% reduction in voltage from 100% rated. Default=1. + Percent reduction in active power (watts) per 1% reduction in voltage from 100% rated. Typical values range from 0.4 to 0.8. Applies to Model=4 only. Intended to represent conservation voltage reduction or voltage optimization measures. - DSS property name: `CVRWatts`, DSS property index: 26. + Name: `CVRWatts` + Default: 1.0 """ def _get_CVRVars(self) -> BatchFloat64ArrayProxy: @@ -1380,11 +1452,12 @@ def _set_CVRVars(self, value: Union[float, Float64Array], flags: enums.SetterFla CVRVars = property(_get_CVRVars, _set_CVRVars) # type: BatchFloat64ArrayProxy """ - Percent reduction in reactive power (vars) per 1% reduction in voltage from 100% rated. Default=2. + Percent reduction in reactive power (vars) per 1% reduction in voltage from 100% rated. Typical values range from 2 to 3. Applies to Model=4 only. Intended to represent conservation voltage reduction or voltage optimization measures. - DSS property name: `CVRVars`, DSS property index: 27. + Name: `CVRVars` + Default: 2.0 """ def _get_kWh(self) -> BatchFloat64ArrayProxy: @@ -1395,9 +1468,11 @@ def _set_kWh(self, value: Union[float, Float64Array], flags: enums.SetterFlags = kWh = property(_get_kWh, _set_kWh) # type: BatchFloat64ArrayProxy """ - kWh billed for this period. Default is 0. See help on kVA and Cfactor and kWhDays. + kWh billed for this period. See help on kVA and Cfactor and kWhDays. - DSS property name: `kWh`, DSS property index: 28. + Name: `kWh` + Units: kWh + Default: 0.0 """ def _get_kWhDays(self) -> BatchFloat64ArrayProxy: @@ -1408,9 +1483,10 @@ def _set_kWhDays(self, value: Union[float, Float64Array], flags: enums.SetterFla kWhDays = property(_get_kWhDays, _set_kWhDays) # type: BatchFloat64ArrayProxy """ - Length of kWh billing period in days (24 hr days). Default is 30. Average demand is computed using this value. + Length of kWh billing period in days (24 hr days). Average demand is computed using this value. - DSS property name: `kWhDays`, DSS property index: 29. + Name: `kWhDays` + Default: 30.0 """ def _get_CFactor(self) -> BatchFloat64ArrayProxy: @@ -1421,9 +1497,10 @@ def _set_CFactor(self, value: Union[float, Float64Array], flags: enums.SetterFla CFactor = property(_get_CFactor, _set_CFactor) # type: BatchFloat64ArrayProxy """ - Factor relating average kW to peak kW. Default is 4.0. See kWh and kWhdays. See kVA. + Factor relating average kW to peak kW. See kWh and kWhdays. See kVA. - DSS property name: `CFactor`, DSS property index: 30. + Name: `CFactor` + Default: 4.0 """ def _get_CVRCurve_str(self) -> List[str]: @@ -1436,7 +1513,7 @@ def _set_CVRCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set """ Default is NONE. Curve describing both watt and var factors as a function of time. Refers to a LoadShape object with both Mult and Qmult defined. Define a Loadshape to agree with yearly or daily curve according to the type of analysis being done. If NONE, the CVRwatts and CVRvars factors are used and assumed constant. - DSS property name: `CVRCurve`, DSS property index: 31. + Name: `CVRCurve` """ def _get_CVRCurve(self) -> List[LoadShape]: @@ -1449,7 +1526,7 @@ def _set_CVRCurve(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadS """ Default is NONE. Curve describing both watt and var factors as a function of time. Refers to a LoadShape object with both Mult and Qmult defined. Define a Loadshape to agree with yearly or daily curve according to the type of analysis being done. If NONE, the CVRwatts and CVRvars factors are used and assumed constant. - DSS property name: `CVRCurve`, DSS property index: 31. + Name: `CVRCurve` """ def _get_NumCust(self) -> BatchInt32ArrayProxy: @@ -1460,9 +1537,10 @@ def _set_NumCust(self, value: Union[int, Int32Array], flags: enums.SetterFlags = NumCust = property(_get_NumCust, _set_NumCust) # type: BatchInt32ArrayProxy """ - Number of customers, this load. Default is 1. + Number of customers, this load. - DSS property name: `NumCust`, DSS property index: 32. + Name: `NumCust` + Default: 1 """ def _get_ZIPV(self) -> List[Float64Array]: @@ -1483,7 +1561,7 @@ def _set_ZIPV(self, value: Union[Float64Array, List[Float64Array]], flags: enums Last 1 is cut-off voltage in p.u. of base kV; load is 0 below this cut-off No defaults; all coefficients must be specified if using model=8. - DSS property name: `ZIPV`, DSS property index: 33. + Name: `ZIPV` """ def _get_pctSeriesRL(self) -> BatchFloat64ArrayProxy: @@ -1494,9 +1572,10 @@ def _set_pctSeriesRL(self, value: Union[float, Float64Array], flags: enums.Sette pctSeriesRL = property(_get_pctSeriesRL, _set_pctSeriesRL) # type: BatchFloat64ArrayProxy """ - Percent of load that is series R-L for Harmonic studies. Default is 50. Remainder is assumed to be parallel R and L. This can have a significant impact on the amount of damping observed in Harmonics solutions. + Percent of load that is series R-L for Harmonic studies. Remainder is assumed to be parallel R and L. This can have a significant impact on the amount of damping observed in Harmonics solutions. - DSS property name: `%SeriesRL`, DSS property index: 34. + Name: `%SeriesRL` + Default: 50.0 """ def _get_RelWeight(self) -> BatchFloat64ArrayProxy: @@ -1507,11 +1586,12 @@ def _set_RelWeight(self, value: Union[float, Float64Array], flags: enums.SetterF RelWeight = property(_get_RelWeight, _set_RelWeight) # type: BatchFloat64ArrayProxy """ - Relative weighting factor for reliability calcs. Default = 1. Used to designate high priority loads such as hospitals, etc. + Relative weighting factor for reliability calcs. Used to designate high priority loads such as hospitals, etc. Is multiplied by number of customers and load kW during reliability calcs. - DSS property name: `RelWeight`, DSS property index: 35. + Name: `RelWeight` + Default: 1.0 """ def _get_VLowpu(self) -> BatchFloat64ArrayProxy: @@ -1522,9 +1602,10 @@ def _set_VLowpu(self, value: Union[float, Float64Array], flags: enums.SetterFlag VLowpu = property(_get_VLowpu, _set_VLowpu) # type: BatchFloat64ArrayProxy """ - Default = 0.50. Per unit voltage at which the model switches to same as constant Z model (model=2). This allows more consistent convergence at very low voltaes due to opening switches or solving for fault situations. + Per unit voltage at which the model switches to same as constant Z model (model=2). This allows more consistent convergence at very low voltaes due to opening switches or solving for fault situations. - DSS property name: `VLowpu`, DSS property index: 36. + Name: `VLowpu` + Default: 0.5 """ def _get_puXHarm(self) -> BatchFloat64ArrayProxy: @@ -1539,9 +1620,9 @@ def _set_puXHarm(self, value: Union[float, Float64Array], flags: enums.SetterFla Applies to load model in HARMONICS mode only. - A typical value would be approximately 0.20 pu based on kVA * %SeriesRL / 100.0. + A typical value would be approximately 0.20 pu based on kVA × %SeriesRL / 100.0. - DSS property name: `puXHarm`, DSS property index: 37. + Name: `puXHarm` """ def _get_XRHarm(self) -> BatchFloat64ArrayProxy: @@ -1552,9 +1633,10 @@ def _set_XRHarm(self, value: Union[float, Float64Array], flags: enums.SetterFlag XRHarm = property(_get_XRHarm, _set_XRHarm) # type: BatchFloat64ArrayProxy """ - X/R ratio of the special harmonics mode reactance specified by the puXHARM property at fundamental frequency. Default is 6. + X/R ratio of the special harmonics mode reactance specified by the puXHARM property at fundamental frequency. - DSS property name: `XRHarm`, DSS property index: 38. + Name: `XRHarm` + Default: 6.0 """ def _get_Spectrum_str(self) -> List[str]: @@ -1565,9 +1647,10 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] """ - Name of harmonic current spectrum for this load. Default is "defaultload", which is defined when the DSS starts. + Name of harmonic current spectrum for this load. - DSS property name: `Spectrum`, DSS property index: 39. + Name: `Spectrum` + Default: defaultload """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -1578,9 +1661,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] """ - Name of harmonic current spectrum for this load. Default is "defaultload", which is defined when the DSS starts. + Name of harmonic current spectrum for this load. - DSS property name: `Spectrum`, DSS property index: 39. + Name: `Spectrum` + Default: defaultload """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -1593,7 +1677,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 40. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -1601,14 +1686,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(41) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(41, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 41. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1617,7 +1703,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 42. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(42, value, flags) diff --git a/altdss/LoadShape.py b/altdss/LoadShape.py index 6423286..264063b 100644 --- a/altdss/LoadShape.py +++ b/altdss/LoadShape.py @@ -89,7 +89,7 @@ def _set_NPts(self, value: int, flags: enums.SetterFlags = 0): """ Max number of points to expect in load shape vectors. This gets reset to the number of multiplier values found (in files only) if less than specified. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_Interval(self) -> float: @@ -100,11 +100,13 @@ def _set_Interval(self, value: float, flags: enums.SetterFlags = 0): Interval = property(_get_Interval, _set_Interval) # type: float """ - Time interval for fixed interval data, hrs. Default = 1. If Interval = 0 then time data (in hours) may be at either regular or irregular intervals and time value must be specified using either the Hour property or input files. Then values are interpolated when Interval=0, but not for fixed interval data. + Time interval for fixed interval data, hrs. If Interval is set to 0, then time data (in hours) may be at either regular or irregular intervals and time value must be specified using either the Hour property or input files. Then values are interpolated when Interval=0, but not for fixed interval data. See also "sinterval" and "minterval". - DSS property name: `Interval`, DSS property index: 2. + Name: `Interval` + Units: hour + Default: 1.0 """ def _get_Hour(self) -> Float64Array: @@ -120,7 +122,7 @@ def _set_Hour(self, value: Float64Array, flags: enums.SetterFlags = 0): hour = (dblfile=filename) !for packed file of doubles hour = (sngfile=filename) !for packed file of singles - DSS property name: `Hour`, DSS property index: 4. + Name: `Hour` """ def _get_Mean(self) -> float: @@ -133,7 +135,7 @@ def _set_Mean(self, value: float, flags: enums.SetterFlags = 0): """ Mean of the active power multipliers. This is computed on demand the first time a value is needed. However, you may set it to another value independently. Used for Monte Carlo load simulations. - DSS property name: `Mean`, DSS property index: 5. + Name: `Mean` """ def _get_StdDev(self) -> float: @@ -148,7 +150,7 @@ def _set_StdDev(self, value: float, flags: enums.SetterFlags = 0): Used for Monte Carlo load simulations. - DSS property name: `StdDev`, DSS property index: 6. + Name: `StdDev` """ def _get_CSVFile(self) -> str: @@ -161,7 +163,7 @@ def _set_CSVFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of active power load curve data to a CSV text file containing (hour, mult) points, or simply (mult) values for fixed time interval data, one per line. NOTE: This action may reset the number of points to a lower value. - DSS property name: `CSVFile`, DSS property index: 7. + Name: `CSVFile` """ def _get_SngFile(self) -> str: @@ -174,7 +176,7 @@ def _set_SngFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of active power load curve data to a binary file of singles containing (hour, mult) points, or simply (mult) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `SngFile`, DSS property index: 8. + Name: `SngFile` """ def _get_DblFile(self) -> str: @@ -187,7 +189,7 @@ def _set_DblFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of active power load curve data to a binary file of doubles containing (hour, mult) points, or simply (mult) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `DblFile`, DSS property index: 9. + Name: `DblFile` """ def Action(self, value: Union[AnyStr, int, enums.LoadShapeAction], flags: enums.SetterFlags = 0): @@ -196,7 +198,7 @@ def Action(self, value: Union[AnyStr, int, enums.LoadShapeAction], flags: enums. Setting action=DblSave or SngSave will cause the present mult and qmult values to be written to either a packed file of double or single. The filename is the loadshape name. The mult array will have a "_P" appended on the file name and the qmult array, if it exists, will have "_Q" appended. - DSS property name: `Action`, DSS property index: 10. + Name: `Action` """ if isinstance(value, int): self._lib.Obj_SetInt32(self._ptr, 10, value, flags) @@ -230,7 +232,7 @@ def _set_QMult(self, value: Float64Array, flags: enums.SetterFlags = 0): qmult = (sngfile=filename) !for packed file of singles qmult = (file=MyCSVFile.csv, col=4, header=yes) !for multicolumn CSV files - DSS property name: `QMult`, DSS property index: 11. + Name: `QMult` """ def _get_UseActual(self) -> bool: @@ -241,9 +243,10 @@ def _set_UseActual(self, value: bool, flags: enums.SetterFlags = 0): UseActual = property(_get_UseActual, _set_UseActual) # type: bool """ - {Yes | No* | True | False*} If true, signifies to Load, Generator, Vsource, or other objects to use the return value as the actual kW, kvar, kV, or other value rather than a multiplier. Nominally for AMI Load data but may be used for other functions. + If true, signifies to Load, Generator, Vsource, or other objects to use the return value as the actual kW, kvar, kV, or other value rather than a multiplier. Nominally for AMI Load data but may be used for other functions. - DSS property name: `UseActual`, DSS property index: 12. + Name: `UseActual` + Default: False """ def _get_PMax(self) -> float: @@ -256,7 +259,9 @@ def _set_PMax(self, value: float, flags: enums.SetterFlags = 0): """ kW value at the time of max power. Is automatically set upon reading in a loadshape. Use this property to override the value automatically computed or to retrieve the value computed. - DSS property name: `PMax`, DSS property index: 13. + Name: `PMax` + Units: kW + Default: 1.0 """ def _get_QMax(self) -> float: @@ -269,7 +274,9 @@ def _set_QMax(self, value: float, flags: enums.SetterFlags = 0): """ kvar value at the time of max kW power. Is automatically set upon reading in a loadshape. Use this property to override the value automatically computed or to retrieve the value computed. - DSS property name: `QMax`, DSS property index: 14. + Name: `QMax` + Units: kvar + Default: 0.0 """ def _get_SInterval(self) -> float: @@ -282,7 +289,8 @@ def _set_SInterval(self, value: float, flags: enums.SetterFlags = 0): """ Specify fixed interval in SECONDS. Alternate way to specify Interval property. - DSS property name: `SInterval`, DSS property index: 15. + Name: `SInterval` + Units: s """ def _get_MInterval(self) -> float: @@ -295,7 +303,8 @@ def _set_MInterval(self, value: float, flags: enums.SetterFlags = 0): """ Specify fixed interval in MINUTES. Alternate way to specify Interval property. - DSS property name: `MInterval`, DSS property index: 16. + Name: `MInterval` + Units: minute """ def _get_PBase(self) -> float: @@ -308,7 +317,9 @@ def _set_PBase(self, value: float, flags: enums.SetterFlags = 0): """ Base P value for normalization. Default is zero, meaning the peak will be used. - DSS property name: `PBase`, DSS property index: 17. + Name: `PBase` + Units: kW + Default: 0.0 """ def _get_QBase(self) -> float: @@ -321,7 +332,9 @@ def _set_QBase(self, value: float, flags: enums.SetterFlags = 0): """ Base Q value for normalization. Default is zero, meaning the peak will be used. - DSS property name: `QBase`, DSS property index: 18. + Name: `QBase` + Units: kvar + Default: 0.0 """ def _get_PMult(self) -> Float64Array: @@ -334,7 +347,7 @@ def _set_PMult(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Synonym for "mult". - DSS property name: `PMult`, DSS property index: 19. + Name: `PMult` """ def _get_PQCSVFile(self) -> str: @@ -348,7 +361,7 @@ def _set_PQCSVFile(self, value: AnyStr, flags: enums.SetterFlags = 0): Switch input to a CSV text file containing (active, reactive) power (P, Q) multiplier pairs, one per row. If the interval=0, there should be 3 items on each line: (hour, Pmult, Qmult) - DSS property name: `PQCSVFile`, DSS property index: 20. + Name: `PQCSVFile` """ def _get_MemoryMapping(self) -> bool: @@ -359,10 +372,11 @@ def _set_MemoryMapping(self, value: bool, flags: enums.SetterFlags = 0): MemoryMapping = property(_get_MemoryMapping, _set_MemoryMapping) # type: bool """ - {Yes | No* | True | False*} Enables the memory mapping functionality for dealing with large amounts of load shapes. + Enables the memory mapping functionality for dealing with large amounts of load shapes. By default is False. Use it to accelerate the model loading when the containing a large number of load shapes. - DSS property name: `MemoryMapping`, DSS property index: 21. + Name: `MemoryMapping` + Default: False """ def _get_Interpolation(self) -> enums.LoadShapeInterpolation: @@ -376,12 +390,13 @@ def _set_Interpolation(self, value: Union[AnyStr, int, enums.LoadShapeInterpolat Interpolation = property(_get_Interpolation, _set_Interpolation) # type: enums.LoadShapeInterpolation """ - {AVG* | EDGE} Defines the interpolation method used for connecting distant dots within the load shape. + Defines the interpolation method used for connecting distant dots within the load shape. By default is AVG (average), which will return a multiplier for missing intervals based on the closest multiplier in time. EDGE interpolation keeps the last known value for missing intervals until the next defined multiplier arrives. - DSS property name: `Interpolation`, DSS property index: 22. + Name: `Interpolation` + Default: Avg """ def _get_Interpolation_str(self) -> str: @@ -392,12 +407,13 @@ def _set_Interpolation_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Interpolation_str = property(_get_Interpolation_str, _set_Interpolation_str) # type: str """ - {AVG* | EDGE} Defines the interpolation method used for connecting distant dots within the load shape. + Defines the interpolation method used for connecting distant dots within the load shape. By default is AVG (average), which will return a multiplier for missing intervals based on the closest multiplier in time. EDGE interpolation keeps the last known value for missing intervals until the next defined multiplier arrives. - DSS property name: `Interpolation`, DSS property index: 22. + Name: `Interpolation` + Default: Avg """ def Like(self, value: AnyStr): @@ -406,7 +422,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 23. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(23, value) @@ -476,7 +494,7 @@ def _set_NPts(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0) """ Max number of points to expect in load shape vectors. This gets reset to the number of multiplier values found (in files only) if less than specified. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_Interval(self) -> BatchFloat64ArrayProxy: @@ -487,11 +505,13 @@ def _set_Interval(self, value: Union[float, Float64Array], flags: enums.SetterFl Interval = property(_get_Interval, _set_Interval) # type: BatchFloat64ArrayProxy """ - Time interval for fixed interval data, hrs. Default = 1. If Interval = 0 then time data (in hours) may be at either regular or irregular intervals and time value must be specified using either the Hour property or input files. Then values are interpolated when Interval=0, but not for fixed interval data. + Time interval for fixed interval data, hrs. If Interval is set to 0, then time data (in hours) may be at either regular or irregular intervals and time value must be specified using either the Hour property or input files. Then values are interpolated when Interval=0, but not for fixed interval data. See also "sinterval" and "minterval". - DSS property name: `Interval`, DSS property index: 2. + Name: `Interval` + Units: hour + Default: 1.0 """ def _get_Hour(self) -> List[Float64Array]: @@ -510,7 +530,7 @@ def _set_Hour(self, value: Union[Float64Array, List[Float64Array]], flags: enums hour = (dblfile=filename) !for packed file of doubles hour = (sngfile=filename) !for packed file of singles - DSS property name: `Hour`, DSS property index: 4. + Name: `Hour` """ def _get_Mean(self) -> BatchFloat64ArrayProxy: @@ -523,7 +543,7 @@ def _set_Mean(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Mean of the active power multipliers. This is computed on demand the first time a value is needed. However, you may set it to another value independently. Used for Monte Carlo load simulations. - DSS property name: `Mean`, DSS property index: 5. + Name: `Mean` """ def _get_StdDev(self) -> BatchFloat64ArrayProxy: @@ -538,7 +558,7 @@ def _set_StdDev(self, value: Union[float, Float64Array], flags: enums.SetterFlag Used for Monte Carlo load simulations. - DSS property name: `StdDev`, DSS property index: 6. + Name: `StdDev` """ def _get_CSVFile(self) -> List[str]: @@ -551,7 +571,7 @@ def _set_CSVFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of active power load curve data to a CSV text file containing (hour, mult) points, or simply (mult) values for fixed time interval data, one per line. NOTE: This action may reset the number of points to a lower value. - DSS property name: `CSVFile`, DSS property index: 7. + Name: `CSVFile` """ def _get_SngFile(self) -> List[str]: @@ -564,7 +584,7 @@ def _set_SngFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of active power load curve data to a binary file of singles containing (hour, mult) points, or simply (mult) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `SngFile`, DSS property index: 8. + Name: `SngFile` """ def _get_DblFile(self) -> List[str]: @@ -577,7 +597,7 @@ def _set_DblFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of active power load curve data to a binary file of doubles containing (hour, mult) points, or simply (mult) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `DblFile`, DSS property index: 9. + Name: `DblFile` """ def Action(self, value: Union[AnyStr, int, enums.LoadShapeAction], flags: enums.SetterFlags = 0): @@ -586,7 +606,7 @@ def Action(self, value: Union[AnyStr, int, enums.LoadShapeAction], flags: enums. Setting action=DblSave or SngSave will cause the present mult and qmult values to be written to either a packed file of double or single. The filename is the loadshape name. The mult array will have a "_P" appended on the file name and the qmult array, if it exists, will have "_Q" appended. - DSS property name: `Action`, DSS property index: 10. + Name: `Action` """ if isinstance(value, (bytes, str)) or (isinstance(value, LIST_LIKE) and len(value) > 0 and isinstance(value[0], (bytes, str))): self._set_batch_string(10, value, flags) @@ -622,7 +642,7 @@ def _set_QMult(self, value: Union[Float64Array, List[Float64Array]], flags: enum qmult = (sngfile=filename) !for packed file of singles qmult = (file=MyCSVFile.csv, col=4, header=yes) !for multicolumn CSV files - DSS property name: `QMult`, DSS property index: 11. + Name: `QMult` """ def _get_UseActual(self) -> List[bool]: @@ -630,14 +650,15 @@ def _get_UseActual(self) -> List[bool]: self._get_batch_int32_prop(12) ] - def _set_UseActual(self, value: bool, flags: enums.SetterFlags = 0): + def _set_UseActual(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(12, value, flags) UseActual = property(_get_UseActual, _set_UseActual) # type: List[bool] """ - {Yes | No* | True | False*} If true, signifies to Load, Generator, Vsource, or other objects to use the return value as the actual kW, kvar, kV, or other value rather than a multiplier. Nominally for AMI Load data but may be used for other functions. + If true, signifies to Load, Generator, Vsource, or other objects to use the return value as the actual kW, kvar, kV, or other value rather than a multiplier. Nominally for AMI Load data but may be used for other functions. - DSS property name: `UseActual`, DSS property index: 12. + Name: `UseActual` + Default: False """ def _get_PMax(self) -> BatchFloat64ArrayProxy: @@ -650,7 +671,9 @@ def _set_PMax(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ kW value at the time of max power. Is automatically set upon reading in a loadshape. Use this property to override the value automatically computed or to retrieve the value computed. - DSS property name: `PMax`, DSS property index: 13. + Name: `PMax` + Units: kW + Default: 1.0 """ def _get_QMax(self) -> BatchFloat64ArrayProxy: @@ -663,7 +686,9 @@ def _set_QMax(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ kvar value at the time of max kW power. Is automatically set upon reading in a loadshape. Use this property to override the value automatically computed or to retrieve the value computed. - DSS property name: `QMax`, DSS property index: 14. + Name: `QMax` + Units: kvar + Default: 0.0 """ def _get_SInterval(self) -> BatchFloat64ArrayProxy: @@ -676,7 +701,8 @@ def _set_SInterval(self, value: Union[float, Float64Array], flags: enums.SetterF """ Specify fixed interval in SECONDS. Alternate way to specify Interval property. - DSS property name: `SInterval`, DSS property index: 15. + Name: `SInterval` + Units: s """ def _get_MInterval(self) -> BatchFloat64ArrayProxy: @@ -689,7 +715,8 @@ def _set_MInterval(self, value: Union[float, Float64Array], flags: enums.SetterF """ Specify fixed interval in MINUTES. Alternate way to specify Interval property. - DSS property name: `MInterval`, DSS property index: 16. + Name: `MInterval` + Units: minute """ def _get_PBase(self) -> BatchFloat64ArrayProxy: @@ -702,7 +729,9 @@ def _set_PBase(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Base P value for normalization. Default is zero, meaning the peak will be used. - DSS property name: `PBase`, DSS property index: 17. + Name: `PBase` + Units: kW + Default: 0.0 """ def _get_QBase(self) -> BatchFloat64ArrayProxy: @@ -715,7 +744,9 @@ def _set_QBase(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Base Q value for normalization. Default is zero, meaning the peak will be used. - DSS property name: `QBase`, DSS property index: 18. + Name: `QBase` + Units: kvar + Default: 0.0 """ def _get_PMult(self) -> List[Float64Array]: @@ -731,7 +762,7 @@ def _set_PMult(self, value: Union[Float64Array, List[Float64Array]], flags: enum """ Synonym for "mult". - DSS property name: `PMult`, DSS property index: 19. + Name: `PMult` """ def _get_PQCSVFile(self) -> List[str]: @@ -745,7 +776,7 @@ def _set_PQCSVFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter Switch input to a CSV text file containing (active, reactive) power (P, Q) multiplier pairs, one per row. If the interval=0, there should be 3 items on each line: (hour, Pmult, Qmult) - DSS property name: `PQCSVFile`, DSS property index: 20. + Name: `PQCSVFile` """ def _get_MemoryMapping(self) -> List[bool]: @@ -753,15 +784,16 @@ def _get_MemoryMapping(self) -> List[bool]: self._get_batch_int32_prop(21) ] - def _set_MemoryMapping(self, value: bool, flags: enums.SetterFlags = 0): + def _set_MemoryMapping(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(21, value, flags) MemoryMapping = property(_get_MemoryMapping, _set_MemoryMapping) # type: List[bool] """ - {Yes | No* | True | False*} Enables the memory mapping functionality for dealing with large amounts of load shapes. + Enables the memory mapping functionality for dealing with large amounts of load shapes. By default is False. Use it to accelerate the model loading when the containing a large number of load shapes. - DSS property name: `MemoryMapping`, DSS property index: 21. + Name: `MemoryMapping` + Default: False """ def _get_Interpolation(self) -> BatchInt32ArrayProxy: @@ -776,12 +808,13 @@ def _set_Interpolation(self, value: Union[AnyStr, int, enums.LoadShapeInterpolat Interpolation = property(_get_Interpolation, _set_Interpolation) # type: BatchInt32ArrayProxy """ - {AVG* | EDGE} Defines the interpolation method used for connecting distant dots within the load shape. + Defines the interpolation method used for connecting distant dots within the load shape. By default is AVG (average), which will return a multiplier for missing intervals based on the closest multiplier in time. EDGE interpolation keeps the last known value for missing intervals until the next defined multiplier arrives. - DSS property name: `Interpolation`, DSS property index: 22. + Name: `Interpolation` + Default: Avg """ def _get_Interpolation_str(self) -> List[str]: @@ -792,12 +825,13 @@ def _set_Interpolation_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Interpolation_str = property(_get_Interpolation_str, _set_Interpolation_str) # type: List[str] """ - {AVG* | EDGE} Defines the interpolation method used for connecting distant dots within the load shape. + Defines the interpolation method used for connecting distant dots within the load shape. By default is AVG (average), which will return a multiplier for missing intervals based on the closest multiplier in time. EDGE interpolation keeps the last known value for missing intervals until the next defined multiplier arrives. - DSS property name: `Interpolation`, DSS property index: 22. + Name: `Interpolation` + Default: Avg """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -806,7 +840,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 23. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(23, value, flags) diff --git a/altdss/Monitor.py b/altdss/Monitor.py index 522af7e..c491b6c 100644 --- a/altdss/Monitor.py +++ b/altdss/Monitor.py @@ -15,7 +15,7 @@ class Monitor(DSSObj, CircuitElementMixin, MonitorObjMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + MonitorObjMixin._extra_slots _cls_name = 'Monitor' - _cls_idx = 47 + _cls_idx = 48 _cls_int_idx = { 2, 3, @@ -72,7 +72,8 @@ def _set_Element_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name (Full Object name) of element to which the monitor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` + Default: Vsource.source """ def _get_Element(self) -> DSSObj: @@ -89,7 +90,8 @@ def _set_Element(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlags = """ Name (Full Object name) of element to which the monitor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` + Default: Vsource.source """ def _get_Terminal(self) -> int: @@ -102,7 +104,8 @@ def _set_Terminal(self, value: int, flags: enums.SetterFlags = 0): """ Number of the terminal of the circuit element to which the monitor is connected. 1 or 2, typically. For monitoring states, attach monitor to terminal 1. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_Mode(self) -> int: @@ -114,32 +117,37 @@ def _set_Mode(self, value: int, flags: enums.SetterFlags = 0): Mode = property(_get_Mode, _set_Mode) # type: int """ Bitmask integer designating the values the monitor is to capture: - 0 = Voltages and currents at designated terminal - 1 = Powers at designated terminal - 2 = Tap Position (Transformer Device only) - 3 = State Variables (PCElements only) - 4 = Flicker level and severity index (Pst) for voltages. No adders apply. - Flicker level at simulation time step, Pst at 10-minute time step. - 5 = Solution variables (Iterations, etc). - Normally, these would be actual phasor quantities from solution. - 6 = Capacitor Switching (Capacitors only) - 7 = Storage state vars (Storage device only) - 8 = All winding currents (Transformer device only) - 9 = Losses, watts and var (of monitored device) - 10 = All Winding voltages (Transformer device only) - Normally, these would be actual phasor quantities from solution. - 11 = All terminal node voltages and line currents of monitored device - 12 = All terminal node voltages LL and line currents of monitored device - Combine mode with adders below to achieve other results for terminal quantities: - +16 = Sequence quantities - +32 = Magnitude only - +64 = Positive sequence only or avg of all phases - - Mix adder to obtain desired results. For example: - Mode=112 will save positive sequence voltage and current magnitudes only - Mode=48 will save all sequence voltages and currents, but magnitude only. - - DSS property name: `Mode`, DSS property index: 3. + + - 0: Voltages and currents at designated terminal + - 1: Powers at designated terminal + - 2: Tap Position (Transformer Device only) + - 3: State Variables (PCElements only) + - 4: Flicker level and severity index (Pst) for voltages. No adders apply. Flicker level at simulation time step, Pst at 10-minute time step. + - 5: Solution variables (Iterations, etc). + - 6: Capacitor Switching (Capacitors only) + - 7: Storage state vars (Storage device only) + - 8: All winding currents (Transformer device only) + - 9: Losses, watts and var (of monitored device) + - 10: All Winding voltages (Transformer device only) + - 11: All terminal node voltages and line currents of monitored device + - 12: All terminal node voltages LL and line currents of monitored device + + Normally, these would be actual phasor quantities from solution. + Combine with adders below to achieve other results for terminal quantities: + + - +16: Sequence quantities + - +32: Magnitude only + - +64: Positive sequence only or average of all phases + + Mix adders to obtain desired results. For example: + + - `Mode=112` will save positive sequence voltage and current magnitudes only (`112=(64 + 32 + 16 + 0)`) + - `Mode=48` will save all sequence voltages and currents, but magnitude only (`48=(32 + 16 + 0)`). + + See also the monitor properties `VIPolar` and `PPolar` for options to control if complex values are reported in polar or rectangular forms. + + Name: `Mode` + Default: 0 """ def Action(self, value: Union[AnyStr, int, enums.MonitorAction], flags: enums.SetterFlags = 0): @@ -151,7 +159,7 @@ def Action(self, value: Union[AnyStr, int, enums.MonitorAction], flags: enums.Se Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action. - DSS property name: `Action`, DSS property index: 4. + Name: `Action` """ if isinstance(value, int): self._lib.Obj_SetInt32(self._ptr, 4, value, flags) @@ -187,9 +195,10 @@ def _set_Residual(self, value: bool, flags: enums.SetterFlags = 0): Residual = property(_get_Residual, _set_Residual) # type: bool """ - {Yes/True | No/False} Default = No. Include Residual cbannel (sum of all phases) for voltage and current. Does not apply to sequence quantity modes or power modes. + Include Residual cbannel (sum of all phases) for voltage and current. Does not apply to sequence quantity modes or power modes. - DSS property name: `Residual`, DSS property index: 5. + Name: `Residual` + Default: False """ def _get_VIPolar(self) -> bool: @@ -200,9 +209,10 @@ def _set_VIPolar(self, value: bool, flags: enums.SetterFlags = 0): VIPolar = property(_get_VIPolar, _set_VIPolar) # type: bool """ - {Yes/True | No/False} Default = YES. Report voltage and current in polar form (Mag/Angle). (default) Otherwise, it will be real and imaginary. + Report voltage and current in polar form (Mag/Angle). (default) Otherwise, it will be real and imaginary. - DSS property name: `VIPolar`, DSS property index: 6. + Name: `VIPolar` + Default: True """ def _get_PPolar(self) -> bool: @@ -213,9 +223,10 @@ def _set_PPolar(self, value: bool, flags: enums.SetterFlags = 0): PPolar = property(_get_PPolar, _set_PPolar) # type: bool """ - {Yes/True | No/False} Default = YES. Report power in Apparent power, S, in polar form (Mag/Angle).(default) Otherwise, is P and Q + Report power in Apparent power, S, in polar form (Mag/Angle).(default) Otherwise, is P and Q - DSS property name: `PPolar`, DSS property index: 7. + Name: `PPolar` + Default: True """ def _get_BaseFreq(self) -> float: @@ -228,7 +239,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 8. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -239,9 +251,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 9. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -250,7 +263,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 10. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(10, value) @@ -270,7 +285,7 @@ class MonitorProperties(TypedDict): class MonitorBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'Monitor' _obj_cls = Monitor - _cls_idx = 47 + _cls_idx = 48 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -308,7 +323,8 @@ def _set_Element_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett """ Name (Full Object name) of element to which the monitor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` + Default: Vsource.source """ def _get_Element(self) -> List[DSSObj]: @@ -321,7 +337,8 @@ def _set_Element(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSObj]], """ Name (Full Object name) of element to which the monitor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` + Default: Vsource.source """ def _get_Terminal(self) -> BatchInt32ArrayProxy: @@ -334,7 +351,8 @@ def _set_Terminal(self, value: Union[int, Int32Array], flags: enums.SetterFlags """ Number of the terminal of the circuit element to which the monitor is connected. 1 or 2, typically. For monitoring states, attach monitor to terminal 1. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_Mode(self) -> BatchInt32ArrayProxy: @@ -346,32 +364,37 @@ def _set_Mode(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0) Mode = property(_get_Mode, _set_Mode) # type: BatchInt32ArrayProxy """ Bitmask integer designating the values the monitor is to capture: - 0 = Voltages and currents at designated terminal - 1 = Powers at designated terminal - 2 = Tap Position (Transformer Device only) - 3 = State Variables (PCElements only) - 4 = Flicker level and severity index (Pst) for voltages. No adders apply. - Flicker level at simulation time step, Pst at 10-minute time step. - 5 = Solution variables (Iterations, etc). - Normally, these would be actual phasor quantities from solution. - 6 = Capacitor Switching (Capacitors only) - 7 = Storage state vars (Storage device only) - 8 = All winding currents (Transformer device only) - 9 = Losses, watts and var (of monitored device) - 10 = All Winding voltages (Transformer device only) - Normally, these would be actual phasor quantities from solution. - 11 = All terminal node voltages and line currents of monitored device - 12 = All terminal node voltages LL and line currents of monitored device - Combine mode with adders below to achieve other results for terminal quantities: - +16 = Sequence quantities - +32 = Magnitude only - +64 = Positive sequence only or avg of all phases - - Mix adder to obtain desired results. For example: - Mode=112 will save positive sequence voltage and current magnitudes only - Mode=48 will save all sequence voltages and currents, but magnitude only. - - DSS property name: `Mode`, DSS property index: 3. + + - 0: Voltages and currents at designated terminal + - 1: Powers at designated terminal + - 2: Tap Position (Transformer Device only) + - 3: State Variables (PCElements only) + - 4: Flicker level and severity index (Pst) for voltages. No adders apply. Flicker level at simulation time step, Pst at 10-minute time step. + - 5: Solution variables (Iterations, etc). + - 6: Capacitor Switching (Capacitors only) + - 7: Storage state vars (Storage device only) + - 8: All winding currents (Transformer device only) + - 9: Losses, watts and var (of monitored device) + - 10: All Winding voltages (Transformer device only) + - 11: All terminal node voltages and line currents of monitored device + - 12: All terminal node voltages LL and line currents of monitored device + + Normally, these would be actual phasor quantities from solution. + Combine with adders below to achieve other results for terminal quantities: + + - +16: Sequence quantities + - +32: Magnitude only + - +64: Positive sequence only or average of all phases + + Mix adders to obtain desired results. For example: + + - `Mode=112` will save positive sequence voltage and current magnitudes only (`112=(64 + 32 + 16 + 0)`) + - `Mode=48` will save all sequence voltages and currents, but magnitude only (`48=(32 + 16 + 0)`). + + See also the monitor properties `VIPolar` and `PPolar` for options to control if complex values are reported in polar or rectangular forms. + + Name: `Mode` + Default: 0 """ def Action(self, value: Union[AnyStr, int, enums.MonitorAction], flags: enums.SetterFlags = 0): @@ -383,7 +406,7 @@ def Action(self, value: Union[AnyStr, int, enums.MonitorAction], flags: enums.Se Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action. - DSS property name: `Action`, DSS property index: 4. + Name: `Action` """ if isinstance(value, (bytes, str)) or (isinstance(value, LIST_LIKE) and len(value) > 0 and isinstance(value[0], (bytes, str))): self._set_batch_string(4, value, flags) @@ -415,14 +438,15 @@ def _get_Residual(self) -> List[bool]: self._get_batch_int32_prop(5) ] - def _set_Residual(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Residual(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(5, value, flags) Residual = property(_get_Residual, _set_Residual) # type: List[bool] """ - {Yes/True | No/False} Default = No. Include Residual cbannel (sum of all phases) for voltage and current. Does not apply to sequence quantity modes or power modes. + Include Residual cbannel (sum of all phases) for voltage and current. Does not apply to sequence quantity modes or power modes. - DSS property name: `Residual`, DSS property index: 5. + Name: `Residual` + Default: False """ def _get_VIPolar(self) -> List[bool]: @@ -430,14 +454,15 @@ def _get_VIPolar(self) -> List[bool]: self._get_batch_int32_prop(6) ] - def _set_VIPolar(self, value: bool, flags: enums.SetterFlags = 0): + def _set_VIPolar(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(6, value, flags) VIPolar = property(_get_VIPolar, _set_VIPolar) # type: List[bool] """ - {Yes/True | No/False} Default = YES. Report voltage and current in polar form (Mag/Angle). (default) Otherwise, it will be real and imaginary. + Report voltage and current in polar form (Mag/Angle). (default) Otherwise, it will be real and imaginary. - DSS property name: `VIPolar`, DSS property index: 6. + Name: `VIPolar` + Default: True """ def _get_PPolar(self) -> List[bool]: @@ -445,14 +470,15 @@ def _get_PPolar(self) -> List[bool]: self._get_batch_int32_prop(7) ] - def _set_PPolar(self, value: bool, flags: enums.SetterFlags = 0): + def _set_PPolar(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(7, value, flags) PPolar = property(_get_PPolar, _set_PPolar) # type: List[bool] """ - {Yes/True | No/False} Default = YES. Report power in Apparent power, S, in polar form (Mag/Angle).(default) Otherwise, is P and Q + Report power in Apparent power, S, in polar form (Mag/Angle).(default) Otherwise, is P and Q - DSS property name: `PPolar`, DSS property index: 7. + Name: `PPolar` + Default: True """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -465,7 +491,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 8. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -473,14 +500,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(9) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(9, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 9. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -489,7 +517,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 10. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(10, value, flags) diff --git a/altdss/MonitorExtras.py b/altdss/MonitorExtras.py index 8c8b5b8..240c4e4 100644 --- a/altdss/MonitorExtras.py +++ b/altdss/MonitorExtras.py @@ -9,37 +9,76 @@ class MonitorObjMixin: _extra_slots = [] def Show(self): + ''' + Convert the monitor data to text and displays it with the text editor. + + Original COM help: https://opendss.epri.com/Show3.html + ''' self._lib.Alt_Monitor_Show(self._ptr) def Header(self) -> List[str]: + ''' + Array of strings containing channel names + + Original COM help: https://opendss.epri.com/Header.html + ''' return self._get_string_array(self._lib.Alt_Monitor_Get_Header, self._ptr) def ByteStream(self) -> Int8Array: + ''' + Byte array containing the monitor's stream values. Make sure a "save" is done first (standard solution modes do this automatically) + + Original COM help: https://opendss.epri.com/ByteStream.html + ''' return self._get_int8_array(self._lib.Alt_Monitor_Get_ByteStream, self._ptr) def FileName(self) -> str: + ''' + Name of CSV file associated with this monitor. + + Original COM help: https://opendss.epri.com/FileName.html + ''' return self._get_string(self._lib.Alt_Monitor_Get_FileName(self._ptr)) def SampleCount(self) -> int: + ''' + Number of samples in this monitor at present + + Original COM help: https://opendss.epri.com/SampleCount.html + ''' return self._lib.Alt_Monitor_Get_SampleCount(self._ptr) def NumChannels(self) -> int: + ''' + Number of channels in this monitor + + Original COM help: https://opendss.epri.com/NumChannels.html + ''' return self._lib.Alt_Monitor_Get_NumChannels(self._ptr) def RecordSize(self) -> int: + ''' + Size of each record in ByteStream. Same as `NumChannels`. + + Original COM help: https://opendss.epri.com/RecordSize.html + ''' return self._lib.Alt_Monitor_Get_RecordSize(self._ptr) def dblFreq(self) -> Float64Array: ''' Frequency values for harmonics mode solutions. - Empty for time mode solutions (use dblHour instead). + Empty for time mode solutions (use `dblHour` instead). + + Original COM help: https://opendss.epri.com/dblFreq.html ''' return self._get_float64_array(self._lib.Alt_Monitor_Get_dblFreq, self._ptr) def dblHour(self) -> Float64Array: ''' Time value in hours for time-sampled monitor values. - Empty if frequency-sampled values for harmonics solution (use dblFreq instead). + Empty if frequency-sampled values for harmonics solution (use `dblFreq` instead). + + Original COM help: https://opendss.epri.com/dblHour.html ''' return self._get_float64_array(self._lib.Alt_Monitor_Get_dblHour, self._ptr) diff --git a/altdss/Obj.py b/altdss/Obj.py index ac6b622..b1f05c2 100644 --- a/altdss/Obj.py +++ b/altdss/Obj.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from .DSSObj import DSSObj from .common import Base @@ -31,6 +31,7 @@ from .Fault import IFault, Fault from .DynamicExp import IDynamicExp, DynamicExp from .Generator import IGenerator, Generator +from .WindGen import IWindGen, WindGen from .GenDispatcher import IGenDispatcher, GenDispatcher from .Storage import IStorage, Storage from .StorageController import IStorageController, StorageController @@ -54,6 +55,8 @@ from .Monitor import IMonitor, Monitor from .EnergyMeter import IEnergyMeter, EnergyMeter from .Sensor import ISensor, Sensor +from .FMonitor import IFMonitor, FMonitor +from .Generic5 import IGeneric5, Generic5 _idx_to_cls = {} @@ -86,6 +89,7 @@ class IObj(Base): 'Fault', 'DynamicExp', 'Generator', + 'WindGen', 'GenDispatcher', 'Storage', 'StorageController', @@ -109,6 +113,8 @@ class IObj(Base): 'Monitor', 'EnergyMeter', 'Sensor', + 'FMonitor', + 'Generic5', ] LineCode: ILineCode @@ -137,6 +143,7 @@ class IObj(Base): Fault: IFault DynamicExp: IDynamicExp Generator: IGenerator + WindGen: IWindGen GenDispatcher: IGenDispatcher Storage: IStorage StorageController: IStorageController @@ -160,6 +167,8 @@ class IObj(Base): Monitor: IMonitor EnergyMeter: IEnergyMeter Sensor: ISensor + FMonitor: IFMonitor + Generic5: IGeneric5 def __init__(self, api_util): Base.__init__(self, api_util) @@ -193,6 +202,7 @@ def __init__(self, api_util): self.Fault = IFault(self) self.DynamicExp = IDynamicExp(self) self.Generator = IGenerator(self) + self.WindGen = IWindGen(self) self.GenDispatcher = IGenDispatcher(self) self.Storage = IStorage(self) self.StorageController = IStorageController(self) @@ -216,6 +226,8 @@ def __init__(self, api_util): self.Monitor = IMonitor(self) self.EnergyMeter = IEnergyMeter(self) self.Sensor = ISensor(self) + self.FMonitor = IFMonitor(self) + self.Generic5 = IGeneric5(self) __all__ = [ "IObj", @@ -240,6 +252,7 @@ def __init__(self, api_util): "LoadShapeClass", "MonitoredPhase", "PlotProfilePhases", + "AltDSSCompatFlags", "LoadShapeAction", "LoadShapeInterpolation", "TShapeAction", @@ -252,6 +265,8 @@ def __init__(self, api_util): "GeneratorModel", "GeneratorDispatchMode", "GeneratorStatus", + "WindGenModel", + "WindGenQMode", "StorageState", "StorageDispatchMode", "StorageControllerDischargeMode", @@ -282,6 +297,7 @@ def __init__(self, api_util): "VSConverterControlMode", "MonitorAction", "EnergyMeterAction", + "FMonitorAction", "LineCode", "LoadShape", "TShape", @@ -308,6 +324,7 @@ def __init__(self, api_util): "Fault", "DynamicExp", "Generator", + "WindGen", "GenDispatcher", "Storage", "StorageController", @@ -331,5 +348,7 @@ def __init__(self, api_util): "Monitor", "EnergyMeter", "Sensor", + "FMonitor", + "Generic5", ] diff --git a/altdss/PVSystem.py b/altdss/PVSystem.py index 9219acc..f9de764 100644 --- a/altdss/PVSystem.py +++ b/altdss/PVSystem.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -20,7 +20,7 @@ class PVSystem(DSSObj, CircuitElementMixin, PCElementMixin, ElementHasRegistersMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PCElementMixin._extra_slots + ElementHasRegistersMixin._extra_slots _cls_name = 'PVSystem' - _cls_idx = 35 + _cls_idx = 36 _cls_int_idx = { 1, 9, @@ -163,7 +163,8 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): """ Number of Phases, this PVSystem element. Power is evenly divided among phases. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Bus1(self) -> str: @@ -176,7 +177,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Bus to which the PVSystem element is connected. May include specific node specification. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kV(self) -> float: @@ -189,7 +190,9 @@ def _set_kV(self, value: float, flags: enums.SetterFlags = 0): """ Nominal rated (1.0 per unit) voltage, kV, for PVSystem element. For 2- and 3-phase PVSystem elements, specify phase-phase kV. Otherwise, specify actual kV across each branch of the PVSystem element. If 1-phase wye (star or LN), specify phase-neutral kV. If 1-phase delta or phase-phase connected, specify phase-phase kV. - DSS property name: `kV`, DSS property index: 3. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_Irradiance(self) -> float: @@ -202,7 +205,8 @@ def _set_Irradiance(self, value: float, flags: enums.SetterFlags = 0): """ Get/set the present irradiance value in kW/sq-m. Used as base value for shape multipliers. Generally entered as peak value for the time period of interest and the yearly, daily, and duty load shape objects are defined as per unit multipliers (just like Loads/Generators). - DSS property name: `Irradiance`, DSS property index: 4. + Name: `Irradiance` + Default: 1.0 """ def _get_Pmpp(self) -> float: @@ -215,7 +219,8 @@ def _set_Pmpp(self, value: float, flags: enums.SetterFlags = 0): """ Get/set the rated max power of the PV array for 1.0 kW/sq-m irradiance and a user-selected array temperature. The P-TCurve should be defined relative to the selected array temperature. - DSS property name: `Pmpp`, DSS property index: 5. + Name: `Pmpp` + Default: 500.0 """ def _get_pctPmpp(self) -> float: @@ -228,7 +233,8 @@ def _set_pctPmpp(self, value: float, flags: enums.SetterFlags = 0): """ Upper limit on active power as a percentage of Pmpp. - DSS property name: `%Pmpp`, DSS property index: 6. + Name: `%Pmpp` + Default: 100.0 """ def _get_Temperature(self) -> float: @@ -241,7 +247,8 @@ def _set_Temperature(self, value: float, flags: enums.SetterFlags = 0): """ Get/set the present Temperature. Used as fixed value corresponding to PTCurve property. A multiplier is obtained from the Pmpp-Temp curve and applied to the nominal Pmpp from the irradiance to determine the net array output. - DSS property name: `Temperature`, DSS property index: 7. + Name: `Temperature` + Default: 25.0 """ def _get_PF(self) -> float: @@ -252,11 +259,12 @@ def _set_PF(self, value: float, flags: enums.SetterFlags = 0): PF = property(_get_PF, _set_PF) # type: float """ - Nominally, the power factor for the output power. Default is 1.0. Setting this property will cause the inverter to operate in constant power factor mode.Enter negative when kW and kvar have opposite signs. + Nominally, the power factor for the output power. Setting this property will cause the inverter to operate in constant power factor mode.Enter negative when kW and kvar have opposite signs. A positive power factor signifies that the PVSystem element produces vars as is typical for a generator. - DSS property name: `PF`, DSS property index: 8. + Name: `PF` + Default: 1.0 """ def _get_Conn(self) -> enums.Connection: @@ -272,7 +280,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection], flags: enums.Se """ ={wye|LN|delta|LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 9. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> str: @@ -285,7 +294,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={wye|LN|delta|LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 9. + Name: `Conn` + Default: Wye """ def _get_kvar(self) -> float: @@ -298,7 +308,8 @@ def _set_kvar(self, value: float, flags: enums.SetterFlags = 0): """ Get/set the present kvar value. Setting this property forces the inverter to operate in constant kvar mode. - DSS property name: `kvar`, DSS property index: 10. + Name: `kvar` + Units: kvar """ def _get_kVA(self) -> float: @@ -311,7 +322,9 @@ def _set_kVA(self, value: float, flags: enums.SetterFlags = 0): """ kVA rating of inverter. Used as the base for Dynamics mode and Harmonics mode values. - DSS property name: `kVA`, DSS property index: 11. + Name: `kVA` + Units: kVA + Default: 500.0 """ def _get_pctCutIn(self) -> float: @@ -324,7 +337,8 @@ def _set_pctCutIn(self, value: float, flags: enums.SetterFlags = 0): """ % cut-in power -- % of kVA rating of inverter. When the inverter is OFF, the power from the array must be greater than this for the inverter to turn on. - DSS property name: `%CutIn`, DSS property index: 12. + Name: `%CutIn` + Default: 20.0 """ def _get_pctCutOut(self) -> float: @@ -337,7 +351,8 @@ def _set_pctCutOut(self, value: float, flags: enums.SetterFlags = 0): """ % cut-out power -- % of kVA rating of inverter. When the inverter is ON, the inverter turns OFF when the power from the array drops below this value. - DSS property name: `%CutOut`, DSS property index: 13. + Name: `%CutOut` + Default: 20.0 """ def _get_EffCurve_str(self) -> str: @@ -350,7 +365,7 @@ def _set_EffCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter. Inverter output power is discounted by the multiplier obtained from this curve. - DSS property name: `EffCurve`, DSS property index: 14. + Name: `EffCurve` """ def _get_EffCurve(self) -> XYcurve: @@ -367,7 +382,7 @@ def _set_EffCurve(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags """ An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter. Inverter output power is discounted by the multiplier obtained from this curve. - DSS property name: `EffCurve`, DSS property index: 14. + Name: `EffCurve` """ def _get_PTCurve_str(self) -> str: @@ -380,7 +395,7 @@ def _set_PTCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ An XYCurve object, previously defined, that describes the PV array PER UNIT Pmpp vs Temperature curve. Temperature units must agree with the Temperature property and the Temperature shapes used for simulations. The Pmpp values are specified in per unit of the Pmpp value for 1 kW/sq-m irradiance. The value for the temperature at which Pmpp is defined should be 1.0. The net array power is determined by the irradiance * Pmpp * f(Temperature) - DSS property name: `P-TCurve`, DSS property index: 15. + Name: `P-TCurve` """ def _get_PTCurve(self) -> XYcurve: @@ -397,7 +412,7 @@ def _set_PTCurve(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags = """ An XYCurve object, previously defined, that describes the PV array PER UNIT Pmpp vs Temperature curve. Temperature units must agree with the Temperature property and the Temperature shapes used for simulations. The Pmpp values are specified in per unit of the Pmpp value for 1 kW/sq-m irradiance. The value for the temperature at which Pmpp is defined should be 1.0. The net array power is determined by the irradiance * Pmpp * f(Temperature) - DSS property name: `P-TCurve`, DSS property index: 15. + Name: `P-TCurve` """ def _get_pctR(self) -> float: @@ -408,9 +423,10 @@ def _set_pctR(self, value: float, flags: enums.SetterFlags = 0): pctR = property(_get_pctR, _set_pctR) # type: float """ - Equivalent percent internal resistance, ohms. Default is 50%. Placed in series with internal voltage source for harmonics and dynamics modes. (Limits fault current to about 2 pu if not current limited -- see LimitCurrent) + Equivalent percent internal resistance, ohms. Placed in series with internal voltage source for harmonics and dynamics modes. (Limits fault current to about 2 pu if not current limited -- see LimitCurrent) - DSS property name: `%R`, DSS property index: 16. + Name: `%R` + Default: 50.0 """ def _get_pctX(self) -> float: @@ -421,9 +437,10 @@ def _set_pctX(self, value: float, flags: enums.SetterFlags = 0): pctX = property(_get_pctX, _set_pctX) # type: float """ - Equivalent percent internal reactance, ohms. Default is 0%. Placed in series with internal voltage source for harmonics and dynamics modes. + Equivalent percent internal reactance, ohms. Placed in series with internal voltage source for harmonics and dynamics modes. - DSS property name: `%X`, DSS property index: 17. + Name: `%X` + Default: 0.0 """ def _get_Model(self) -> enums.PVSystemModel: @@ -440,7 +457,8 @@ def _set_Model(self, value: Union[int, enums.PVSystemModel], flags: enums.Setter 2:PVSystem element is modeled as a CONSTANT ADMITTANCE. 3:Compute load injection from User-written Model. - DSS property name: `Model`, DSS property index: 18. + Name: `Model` + Default: 1 """ def _get_VMinpu(self) -> float: @@ -451,9 +469,10 @@ def _set_VMinpu(self, value: float, flags: enums.SetterFlags = 0): VMinpu = property(_get_VMinpu, _set_VMinpu) # type: float """ - Default = 0.90. Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model except for Dynamics model. In Dynamics mode, the current magnitude is limited to the value the power flow would compute for this voltage. + Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model except for Dynamics model. In Dynamics mode, the current magnitude is limited to the value the power flow would compute for this voltage. - DSS property name: `VMinpu`, DSS property index: 19. + Name: `VMinpu` + Default: 0.9 """ def _get_VMaxpu(self) -> float: @@ -464,9 +483,10 @@ def _set_VMaxpu(self, value: float, flags: enums.SetterFlags = 0): VMaxpu = property(_get_VMaxpu, _set_VMaxpu) # type: float """ - Default = 1.10. Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model. + Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model. - DSS property name: `VMaxpu`, DSS property index: 20. + Name: `VMaxpu` + Default: 1.1 """ def _get_Balanced(self) -> bool: @@ -477,9 +497,10 @@ def _set_Balanced(self, value: bool, flags: enums.SetterFlags = 0): Balanced = property(_get_Balanced, _set_Balanced) # type: bool """ - {Yes | No*} Default is No. Force balanced current only for 3-phase PVSystems. Forces zero- and negative-sequence to zero. + Force balanced current only for 3-phase PVSystems. Forces zero- and negative-sequence to zero. - DSS property name: `Balanced`, DSS property index: 21. + Name: `Balanced` + Default: False """ def _get_LimitCurrent(self) -> bool: @@ -492,7 +513,8 @@ def _set_LimitCurrent(self, value: bool, flags: enums.SetterFlags = 0): """ Limits current magnitude to Vminpu value for both 1-phase and 3-phase PVSystems similar to Generator Model 7. For 3-phase, limits the positive-sequence current but not the negative-sequence. - DSS property name: `LimitCurrent`, DSS property index: 22. + Name: `LimitCurrent` + Default: False """ def _get_Yearly_str(self) -> str: @@ -505,7 +527,7 @@ def _set_Yearly_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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. - DSS property name: `Yearly`, DSS property index: 23. + Name: `Yearly` """ def _get_Yearly(self) -> LoadShape: @@ -522,7 +544,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags """ 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. - DSS property name: `Yearly`, DSS property index: 23. + Name: `Yearly` """ def _get_Daily_str(self) -> str: @@ -535,7 +557,7 @@ def _set_Daily_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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. - DSS property name: `Daily`, DSS property index: 24. + Name: `Daily` """ def _get_Daily(self) -> LoadShape: @@ -552,7 +574,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ 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. - DSS property name: `Daily`, DSS property index: 24. + Name: `Daily` """ def _get_Duty_str(self) -> str: @@ -565,7 +587,7 @@ def _set_Duty_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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. 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. - DSS property name: `Duty`, DSS property index: 25. + Name: `Duty` """ def _get_Duty(self) -> LoadShape: @@ -582,7 +604,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ 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. 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. - DSS property name: `Duty`, DSS property index: 25. + Name: `Duty` """ def _get_TYearly_str(self) -> str: @@ -595,7 +617,7 @@ def _set_TYearly_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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. - DSS property name: `TYearly`, DSS property index: 26. + Name: `TYearly` """ def _get_TYearly(self) -> TShape: @@ -612,7 +634,7 @@ def _set_TYearly(self, value: Union[AnyStr, TShape], flags: enums.SetterFlags = """ 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. - DSS property name: `TYearly`, DSS property index: 26. + Name: `TYearly` """ def _get_TDaily_str(self) -> str: @@ -625,7 +647,7 @@ def _set_TDaily_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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. - DSS property name: `TDaily`, DSS property index: 27. + Name: `TDaily` """ def _get_TDaily(self) -> TShape: @@ -642,7 +664,7 @@ def _set_TDaily(self, value: Union[AnyStr, TShape], flags: enums.SetterFlags = 0 """ 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. - DSS property name: `TDaily`, DSS property index: 27. + Name: `TDaily` """ def _get_TDuty_str(self) -> str: @@ -655,7 +677,7 @@ def _set_TDuty_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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. - DSS property name: `TDuty`, DSS property index: 28. + Name: `TDuty` """ def _get_TDuty(self) -> TShape: @@ -672,7 +694,7 @@ def _set_TDuty(self, value: Union[AnyStr, TShape], flags: enums.SetterFlags = 0) """ 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. - DSS property name: `TDuty`, DSS property index: 28. + Name: `TDuty` """ def _get_Class(self) -> int: @@ -685,7 +707,8 @@ def _set_Class(self, value: int, flags: enums.SetterFlags = 0): """ An arbitrary integer number representing the class of PVSystem element so that PVSystem values may be segregated by class. - DSS property name: `Class`, DSS property index: 29. + Name: `Class` + Default: 1 """ def _get_UserModel(self) -> str: @@ -698,7 +721,7 @@ def _set_UserModel(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of DLL containing user-written model, which computes the terminal currents for Dynamics studies, overriding the default model. Set to "none" to negate previous setting. - DSS property name: `UserModel`, DSS property index: 30. + Name: `UserModel` """ def _get_UserData(self) -> str: @@ -711,7 +734,7 @@ def _set_UserData(self, value: AnyStr, flags: enums.SetterFlags = 0): """ String (in quotes or parentheses) that gets passed to user-written model for defining the data required for that model. - DSS property name: `UserData`, DSS property index: 31. + Name: `UserData` """ def _get_DebugTrace(self) -> bool: @@ -722,9 +745,10 @@ def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: bool """ - {Yes | No } Default is no. Turn this on to capture the progress of the PVSystem model for each iteration. Creates a separate file for each PVSystem element named "PVSystem_name.csv". + Turn this on to capture the progress of the PVSystem model for each iteration. Creates a separate file for each PVSystem element named "PVSystem_name.csv". - DSS property name: `DebugTrace`, DSS property index: 32. + Name: `DebugTrace` + Default: False """ def _get_VarFollowInverter(self) -> bool: @@ -735,9 +759,10 @@ def _set_VarFollowInverter(self, value: bool, flags: enums.SetterFlags = 0): VarFollowInverter = property(_get_VarFollowInverter, _set_VarFollowInverter) # type: bool """ - Boolean variable (Yes|No) or (True|False). Defaults to False which indicates that the reactive power generation/absorption does not respect the inverter status.When set to True, the PVSystem reactive power generation/absorption will cease when the inverter status is off, due to panel kW dropping below %Cutout. The reactive power generation/absorption will begin again when the panel kW is above %Cutin. When set to False, the PVSystem will generate/absorb reactive power regardless of the status of the inverter. + Defaults to False which indicates that the reactive power generation/absorption does not respect the inverter status.When set to True, the PVSystem reactive power generation/absorption will cease when the inverter status is off, due to panel kW dropping below %Cutout. The reactive power generation/absorption will begin again when the panel kW is above %Cutin. When set to False, the PVSystem will generate/absorb reactive power regardless of the status of the inverter. - DSS property name: `VarFollowInverter`, DSS property index: 33. + Name: `VarFollowInverter` + Default: False """ def _get_DutyStart(self) -> float: @@ -748,9 +773,11 @@ def _set_DutyStart(self, value: float, flags: enums.SetterFlags = 0): DutyStart = property(_get_DutyStart, _set_DutyStart) # type: float """ - Starting time offset [hours] into the duty cycle shape for this PVSystem, defaults to 0 + Starting time offset into the duty cycle shape for this PVSystem. - DSS property name: `DutyStart`, DSS property index: 34. + Name: `DutyStart` + Units: hour + Default: 0.0 """ def _get_WattPriority(self) -> bool: @@ -761,9 +788,10 @@ def _set_WattPriority(self, value: bool, flags: enums.SetterFlags = 0): WattPriority = property(_get_WattPriority, _set_WattPriority) # type: bool """ - {Yes/No*/True/False} Set inverter to watt priority instead of the default var priority + Set inverter to watt priority instead of the default var priority - DSS property name: `WattPriority`, DSS property index: 35. + Name: `WattPriority` + Default: False """ def _get_PFPriority(self) -> bool: @@ -774,9 +802,10 @@ def _set_PFPriority(self, value: bool, flags: enums.SetterFlags = 0): PFPriority = property(_get_PFPriority, _set_PFPriority) # type: bool """ - {Yes/No*/True/False} Set inverter to operate with PF priority when in constant PF mode. If "Yes", value assigned to "WattPriority" is neglected. If controlled by an InvControl with either Volt-Var or DRC or both functions activated, PF priority is neglected and "WattPriority" is considered. Default = No. + Set inverter to operate with PF priority when in constant PF mode. If "Yes", value assigned to "WattPriority" is neglected. If controlled by an InvControl with either Volt-Var or DRC or both functions activated, PF priority is neglected and "WattPriority" is considered. Default = No. - DSS property name: `PFPriority`, DSS property index: 36. + Name: `PFPriority` + Default: False """ def _get_pctPMinNoVars(self) -> float: @@ -789,7 +818,8 @@ def _set_pctPMinNoVars(self, value: float, flags: enums.SetterFlags = 0): """ Minimum active power as percentage of Pmpp under which there is no vars production/absorption. - DSS property name: `%PMinNoVars`, DSS property index: 37. + Name: `%PMinNoVars` + Default: 0.0 """ def _get_pctPMinkvarMax(self) -> float: @@ -802,7 +832,8 @@ def _set_pctPMinkvarMax(self, value: float, flags: enums.SetterFlags = 0): """ Minimum active power as percentage of Pmpp that allows the inverter to produce/absorb reactive power up to its kvarMax or kvarMaxAbs. - DSS property name: `%PMinkvarMax`, DSS property index: 38. + Name: `%PMinkvarMax` + Default: 0.0 """ def _get_kvarMax(self) -> float: @@ -815,7 +846,7 @@ def _set_kvarMax(self, value: float, flags: enums.SetterFlags = 0): """ Indicates the maximum reactive power GENERATION (un-signed numerical variable in kvar) for the inverter (as an un-signed value). Defaults to kVA rating of the inverter. - DSS property name: `kvarMax`, DSS property index: 39. + Name: `kvarMax` """ def _get_kvarMaxAbs(self) -> float: @@ -828,7 +859,7 @@ def _set_kvarMaxAbs(self, value: float, flags: enums.SetterFlags = 0): """ Indicates the maximum reactive power ABSORPTION (un-signed numerical variable in kvar) for the inverter (as an un-signed value). Defaults to kVA rating of the inverter. - DSS property name: `kvarMaxAbs`, DSS property index: 40. + Name: `kvarMaxAbs` """ def _get_kVDC(self) -> float: @@ -841,7 +872,8 @@ def _set_kVDC(self, value: float, flags: enums.SetterFlags = 0): """ Indicates the rated voltage (kV) at the input of the inverter at the peak of PV energy production. The value is normally greater or equal to the kV base of the PV system. It is used for dynamics simulation ONLY. - DSS property name: `kVDC`, DSS property index: 41. + Name: `kVDC` + Default: 8.0 """ def _get_Kp(self) -> float: @@ -854,7 +886,8 @@ def _set_Kp(self, value: float, flags: enums.SetterFlags = 0): """ It is the proportional gain for the PI controller within the inverter. Use it to modify the controller response in dynamics simulation mode. - DSS property name: `Kp`, DSS property index: 42. + Name: `Kp` + Default: 0.01 """ def _get_PITol(self) -> float: @@ -867,7 +900,8 @@ def _set_PITol(self, value: float, flags: enums.SetterFlags = 0): """ It is the tolerance (%) for the closed loop controller of the inverter. For dynamics simulation mode. - DSS property name: `PITol`, DSS property index: 43. + Name: `PITol` + Default: 0.0 """ def _get_SafeVoltage(self) -> float: @@ -880,7 +914,8 @@ def _set_SafeVoltage(self, value: float, flags: enums.SetterFlags = 0): """ Indicates the voltage level (%) respect to the base voltage level for which the Inverter will operate. If this threshold is violated, the Inverter will enter safe mode (OFF). For dynamic simulation. By default is 80% - DSS property name: `SafeVoltage`, DSS property index: 44. + Name: `SafeVoltage` + Default: 80.0 """ def _get_SafeMode(self) -> bool: @@ -891,9 +926,11 @@ def _set_SafeMode(self, value: bool, flags: enums.SetterFlags = 0): SafeMode = property(_get_SafeMode, _set_SafeMode) # type: bool """ - (Read only) Indicates whether the inverter entered (Yes) or not (No) into Safe Mode. + Indicates whether the inverter entered or not into Safe Mode. - DSS property name: `SafeMode`, DSS property index: 45. + **Read-only** + + Name: `SafeMode` """ def _get_DynamicEq_str(self) -> str: @@ -906,7 +943,7 @@ def _set_DynamicEq_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. If not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 46. + Name: `DynamicEq` """ def _get_DynamicEq(self) -> DynamicExp: @@ -923,7 +960,7 @@ def _set_DynamicEq(self, value: Union[AnyStr, DynamicExp], flags: enums.SetterFl """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. If not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 46. + Name: `DynamicEq` """ def _get_DynOut(self) -> List[str]: @@ -942,7 +979,7 @@ def _set_DynOut(self, value: List[AnyStr], flags: enums.SetterFlags = 0): The output variables need to be defined in the same order. - DSS property name: `DynOut`, DSS property index: 47. + Name: `DynOut` """ def _get_ControlMode(self) -> enums.InverterControlMode: @@ -956,11 +993,12 @@ def _set_ControlMode(self, value: Union[AnyStr, int, enums.InverterControlMode], ControlMode = property(_get_ControlMode, _set_ControlMode) # type: enums.InverterControlMode """ - Defines the control mode for the inverter. It can be one of {GFM | GFL*}. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. + Defines the control mode for the inverter. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. GFM control mode disables any control action set by the InvControl device. - DSS property name: `ControlMode`, DSS property index: 48. + Name: `ControlMode` + Default: GFL """ def _get_ControlMode_str(self) -> str: @@ -971,11 +1009,12 @@ def _set_ControlMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ControlMode_str = property(_get_ControlMode_str, _set_ControlMode_str) # type: str """ - Defines the control mode for the inverter. It can be one of {GFM | GFL*}. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. + Defines the control mode for the inverter. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. GFM control mode disables any control action set by the InvControl device. - DSS property name: `ControlMode`, DSS property index: 48. + Name: `ControlMode` + Default: GFL """ def _get_AmpLimit(self) -> float: @@ -989,7 +1028,7 @@ def _set_AmpLimit(self, value: float, flags: enums.SetterFlags = 0): The current limiter per phase for the IBR when operating in GFM mode. This limit is imposed to prevent the IBR to enter into Safe Mode when reaching the IBR power ratings. Once the IBR reaches this value, it remains there without moving into Safe Mode. This value needs to be set lower than the IBR Amps rating. - DSS property name: `AmpLimit`, DSS property index: 49. + Name: `AmpLimit` """ def _get_AmpLimitGain(self) -> float: @@ -1002,7 +1041,8 @@ def _set_AmpLimitGain(self, value: float, flags: enums.SetterFlags = 0): """ Use it for fine tunning the current limiter when active, by default is 0.8, it has to be a value between 0.1 and 1. This value allows users to fine tune the IBRs current limiter to match with the user requirements. - DSS property name: `AmpLimitGain`, DSS property index: 50. + Name: `AmpLimitGain` + Default: 0.8 """ def _get_Spectrum_str(self) -> str: @@ -1013,9 +1053,9 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str """ - Name of harmonic voltage or current spectrum for this PVSystem element. A harmonic voltage source is assumed for the inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this PVSystem element. A harmonic voltage source is assumed for the inverter. - DSS property name: `Spectrum`, DSS property index: 51. + Name: `Spectrum` """ def _get_Spectrum(self) -> SpectrumObj: @@ -1030,9 +1070,9 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj """ - Name of harmonic voltage or current spectrum for this PVSystem element. A harmonic voltage source is assumed for the inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this PVSystem element. A harmonic voltage source is assumed for the inverter. - DSS property name: `Spectrum`, DSS property index: 51. + Name: `Spectrum` """ def _get_BaseFreq(self) -> float: @@ -1045,7 +1085,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 52. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -1056,9 +1097,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 53. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -1067,7 +1109,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 54. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(54, value) @@ -1131,7 +1175,7 @@ class PVSystemProperties(TypedDict): class PVSystemBatch(DSSBatch, CircuitElementBatchMixin, PCElementBatchMixin): _cls_name = 'PVSystem' _obj_cls = PVSystem - _cls_idx = 35 + _cls_idx = 36 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -1170,7 +1214,8 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of Phases, this PVSystem element. Power is evenly divided among phases. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Bus1(self) -> List[str]: @@ -1183,7 +1228,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Bus to which the PVSystem element is connected. May include specific node specification. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kV(self) -> BatchFloat64ArrayProxy: @@ -1196,7 +1241,9 @@ def _set_kV(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Nominal rated (1.0 per unit) voltage, kV, for PVSystem element. For 2- and 3-phase PVSystem elements, specify phase-phase kV. Otherwise, specify actual kV across each branch of the PVSystem element. If 1-phase wye (star or LN), specify phase-neutral kV. If 1-phase delta or phase-phase connected, specify phase-phase kV. - DSS property name: `kV`, DSS property index: 3. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_Irradiance(self) -> BatchFloat64ArrayProxy: @@ -1209,7 +1256,8 @@ def _set_Irradiance(self, value: Union[float, Float64Array], flags: enums.Setter """ Get/set the present irradiance value in kW/sq-m. Used as base value for shape multipliers. Generally entered as peak value for the time period of interest and the yearly, daily, and duty load shape objects are defined as per unit multipliers (just like Loads/Generators). - DSS property name: `Irradiance`, DSS property index: 4. + Name: `Irradiance` + Default: 1.0 """ def _get_Pmpp(self) -> BatchFloat64ArrayProxy: @@ -1222,7 +1270,8 @@ def _set_Pmpp(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Get/set the rated max power of the PV array for 1.0 kW/sq-m irradiance and a user-selected array temperature. The P-TCurve should be defined relative to the selected array temperature. - DSS property name: `Pmpp`, DSS property index: 5. + Name: `Pmpp` + Default: 500.0 """ def _get_pctPmpp(self) -> BatchFloat64ArrayProxy: @@ -1235,7 +1284,8 @@ def _set_pctPmpp(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Upper limit on active power as a percentage of Pmpp. - DSS property name: `%Pmpp`, DSS property index: 6. + Name: `%Pmpp` + Default: 100.0 """ def _get_Temperature(self) -> BatchFloat64ArrayProxy: @@ -1248,7 +1298,8 @@ def _set_Temperature(self, value: Union[float, Float64Array], flags: enums.Sette """ Get/set the present Temperature. Used as fixed value corresponding to PTCurve property. A multiplier is obtained from the Pmpp-Temp curve and applied to the nominal Pmpp from the irradiance to determine the net array output. - DSS property name: `Temperature`, DSS property index: 7. + Name: `Temperature` + Default: 25.0 """ def _get_PF(self) -> BatchFloat64ArrayProxy: @@ -1259,11 +1310,12 @@ def _set_PF(self, value: Union[float, Float64Array], flags: enums.SetterFlags = PF = property(_get_PF, _set_PF) # type: BatchFloat64ArrayProxy """ - Nominally, the power factor for the output power. Default is 1.0. Setting this property will cause the inverter to operate in constant power factor mode.Enter negative when kW and kvar have opposite signs. + Nominally, the power factor for the output power. Setting this property will cause the inverter to operate in constant power factor mode.Enter negative when kW and kvar have opposite signs. A positive power factor signifies that the PVSystem element produces vars as is typical for a generator. - DSS property name: `PF`, DSS property index: 8. + Name: `PF` + Default: 1.0 """ def _get_Conn(self) -> BatchInt32ArrayProxy: @@ -1280,7 +1332,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection, List[AnyStr], Li """ ={wye|LN|delta|LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 9. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> List[str]: @@ -1293,7 +1346,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={wye|LN|delta|LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 9. + Name: `Conn` + Default: Wye """ def _get_kvar(self) -> BatchFloat64ArrayProxy: @@ -1306,7 +1360,8 @@ def _set_kvar(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Get/set the present kvar value. Setting this property forces the inverter to operate in constant kvar mode. - DSS property name: `kvar`, DSS property index: 10. + Name: `kvar` + Units: kvar """ def _get_kVA(self) -> BatchFloat64ArrayProxy: @@ -1319,7 +1374,9 @@ def _set_kVA(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ kVA rating of inverter. Used as the base for Dynamics mode and Harmonics mode values. - DSS property name: `kVA`, DSS property index: 11. + Name: `kVA` + Units: kVA + Default: 500.0 """ def _get_pctCutIn(self) -> BatchFloat64ArrayProxy: @@ -1332,7 +1389,8 @@ def _set_pctCutIn(self, value: Union[float, Float64Array], flags: enums.SetterFl """ % cut-in power -- % of kVA rating of inverter. When the inverter is OFF, the power from the array must be greater than this for the inverter to turn on. - DSS property name: `%CutIn`, DSS property index: 12. + Name: `%CutIn` + Default: 20.0 """ def _get_pctCutOut(self) -> BatchFloat64ArrayProxy: @@ -1345,7 +1403,8 @@ def _set_pctCutOut(self, value: Union[float, Float64Array], flags: enums.SetterF """ % cut-out power -- % of kVA rating of inverter. When the inverter is ON, the inverter turns OFF when the power from the array drops below this value. - DSS property name: `%CutOut`, DSS property index: 13. + Name: `%CutOut` + Default: 20.0 """ def _get_EffCurve_str(self) -> List[str]: @@ -1358,7 +1417,7 @@ def _set_EffCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set """ An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter. Inverter output power is discounted by the multiplier obtained from this curve. - DSS property name: `EffCurve`, DSS property index: 14. + Name: `EffCurve` """ def _get_EffCurve(self) -> List[XYcurve]: @@ -1371,7 +1430,7 @@ def _set_EffCurve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve """ An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter. Inverter output power is discounted by the multiplier obtained from this curve. - DSS property name: `EffCurve`, DSS property index: 14. + Name: `EffCurve` """ def _get_PTCurve_str(self) -> List[str]: @@ -1384,7 +1443,7 @@ def _set_PTCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett """ An XYCurve object, previously defined, that describes the PV array PER UNIT Pmpp vs Temperature curve. Temperature units must agree with the Temperature property and the Temperature shapes used for simulations. The Pmpp values are specified in per unit of the Pmpp value for 1 kW/sq-m irradiance. The value for the temperature at which Pmpp is defined should be 1.0. The net array power is determined by the irradiance * Pmpp * f(Temperature) - DSS property name: `P-TCurve`, DSS property index: 15. + Name: `P-TCurve` """ def _get_PTCurve(self) -> List[XYcurve]: @@ -1397,7 +1456,7 @@ def _set_PTCurve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve] """ An XYCurve object, previously defined, that describes the PV array PER UNIT Pmpp vs Temperature curve. Temperature units must agree with the Temperature property and the Temperature shapes used for simulations. The Pmpp values are specified in per unit of the Pmpp value for 1 kW/sq-m irradiance. The value for the temperature at which Pmpp is defined should be 1.0. The net array power is determined by the irradiance * Pmpp * f(Temperature) - DSS property name: `P-TCurve`, DSS property index: 15. + Name: `P-TCurve` """ def _get_pctR(self) -> BatchFloat64ArrayProxy: @@ -1408,9 +1467,10 @@ def _set_pctR(self, value: Union[float, Float64Array], flags: enums.SetterFlags pctR = property(_get_pctR, _set_pctR) # type: BatchFloat64ArrayProxy """ - Equivalent percent internal resistance, ohms. Default is 50%. Placed in series with internal voltage source for harmonics and dynamics modes. (Limits fault current to about 2 pu if not current limited -- see LimitCurrent) + Equivalent percent internal resistance, ohms. Placed in series with internal voltage source for harmonics and dynamics modes. (Limits fault current to about 2 pu if not current limited -- see LimitCurrent) - DSS property name: `%R`, DSS property index: 16. + Name: `%R` + Default: 50.0 """ def _get_pctX(self) -> BatchFloat64ArrayProxy: @@ -1421,9 +1481,10 @@ def _set_pctX(self, value: Union[float, Float64Array], flags: enums.SetterFlags pctX = property(_get_pctX, _set_pctX) # type: BatchFloat64ArrayProxy """ - Equivalent percent internal reactance, ohms. Default is 0%. Placed in series with internal voltage source for harmonics and dynamics modes. + Equivalent percent internal reactance, ohms. Placed in series with internal voltage source for harmonics and dynamics modes. - DSS property name: `%X`, DSS property index: 17. + Name: `%X` + Default: 0.0 """ def _get_Model(self) -> BatchInt32ArrayProxy: @@ -1440,7 +1501,8 @@ def _set_Model(self, value: Union[int, enums.PVSystemModel, Int32Array], flags: 2:PVSystem element is modeled as a CONSTANT ADMITTANCE. 3:Compute load injection from User-written Model. - DSS property name: `Model`, DSS property index: 18. + Name: `Model` + Default: 1 """ def _get_VMinpu(self) -> BatchFloat64ArrayProxy: @@ -1451,9 +1513,10 @@ def _set_VMinpu(self, value: Union[float, Float64Array], flags: enums.SetterFlag VMinpu = property(_get_VMinpu, _set_VMinpu) # type: BatchFloat64ArrayProxy """ - Default = 0.90. Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model except for Dynamics model. In Dynamics mode, the current magnitude is limited to the value the power flow would compute for this voltage. + Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model except for Dynamics model. In Dynamics mode, the current magnitude is limited to the value the power flow would compute for this voltage. - DSS property name: `VMinpu`, DSS property index: 19. + Name: `VMinpu` + Default: 0.9 """ def _get_VMaxpu(self) -> BatchFloat64ArrayProxy: @@ -1464,9 +1527,10 @@ def _set_VMaxpu(self, value: Union[float, Float64Array], flags: enums.SetterFlag VMaxpu = property(_get_VMaxpu, _set_VMaxpu) # type: BatchFloat64ArrayProxy """ - Default = 1.10. Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model. + Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model. - DSS property name: `VMaxpu`, DSS property index: 20. + Name: `VMaxpu` + Default: 1.1 """ def _get_Balanced(self) -> List[bool]: @@ -1474,14 +1538,15 @@ def _get_Balanced(self) -> List[bool]: self._get_batch_int32_prop(21) ] - def _set_Balanced(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Balanced(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(21, value, flags) Balanced = property(_get_Balanced, _set_Balanced) # type: List[bool] """ - {Yes | No*} Default is No. Force balanced current only for 3-phase PVSystems. Forces zero- and negative-sequence to zero. + Force balanced current only for 3-phase PVSystems. Forces zero- and negative-sequence to zero. - DSS property name: `Balanced`, DSS property index: 21. + Name: `Balanced` + Default: False """ def _get_LimitCurrent(self) -> List[bool]: @@ -1489,14 +1554,15 @@ def _get_LimitCurrent(self) -> List[bool]: self._get_batch_int32_prop(22) ] - def _set_LimitCurrent(self, value: bool, flags: enums.SetterFlags = 0): + def _set_LimitCurrent(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(22, value, flags) LimitCurrent = property(_get_LimitCurrent, _set_LimitCurrent) # type: List[bool] """ Limits current magnitude to Vminpu value for both 1-phase and 3-phase PVSystems similar to Generator Model 7. For 3-phase, limits the positive-sequence current but not the negative-sequence. - DSS property name: `LimitCurrent`, DSS property index: 22. + Name: `LimitCurrent` + Default: False """ def _get_Yearly_str(self) -> List[str]: @@ -1509,7 +1575,7 @@ def _set_Yearly_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ 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. - DSS property name: `Yearly`, DSS property index: 23. + Name: `Yearly` """ def _get_Yearly(self) -> List[LoadShape]: @@ -1522,7 +1588,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadSha """ 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. - DSS property name: `Yearly`, DSS property index: 23. + Name: `Yearly` """ def _get_Daily_str(self) -> List[str]: @@ -1535,7 +1601,7 @@ def _set_Daily_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ 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. - DSS property name: `Daily`, DSS property index: 24. + Name: `Daily` """ def _get_Daily(self) -> List[LoadShape]: @@ -1548,7 +1614,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShap """ 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. - DSS property name: `Daily`, DSS property index: 24. + Name: `Daily` """ def _get_Duty_str(self) -> List[str]: @@ -1561,7 +1627,7 @@ def _set_Duty_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ 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. 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. - DSS property name: `Duty`, DSS property index: 25. + Name: `Duty` """ def _get_Duty(self) -> List[LoadShape]: @@ -1574,7 +1640,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape """ 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. 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. - DSS property name: `Duty`, DSS property index: 25. + Name: `Duty` """ def _get_TYearly_str(self) -> List[str]: @@ -1587,7 +1653,7 @@ def _set_TYearly_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett """ 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. - DSS property name: `TYearly`, DSS property index: 26. + Name: `TYearly` """ def _get_TYearly(self) -> List[TShape]: @@ -1600,7 +1666,7 @@ def _set_TYearly(self, value: Union[AnyStr, TShape, List[AnyStr], List[TShape]], """ 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. - DSS property name: `TYearly`, DSS property index: 26. + Name: `TYearly` """ def _get_TDaily_str(self) -> List[str]: @@ -1613,7 +1679,7 @@ def _set_TDaily_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ 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. - DSS property name: `TDaily`, DSS property index: 27. + Name: `TDaily` """ def _get_TDaily(self) -> List[TShape]: @@ -1626,7 +1692,7 @@ def _set_TDaily(self, value: Union[AnyStr, TShape, List[AnyStr], List[TShape]], """ 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. - DSS property name: `TDaily`, DSS property index: 27. + Name: `TDaily` """ def _get_TDuty_str(self) -> List[str]: @@ -1639,7 +1705,7 @@ def _set_TDuty_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ 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. - DSS property name: `TDuty`, DSS property index: 28. + Name: `TDuty` """ def _get_TDuty(self) -> List[TShape]: @@ -1652,7 +1718,7 @@ def _set_TDuty(self, value: Union[AnyStr, TShape, List[AnyStr], List[TShape]], f """ 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. - DSS property name: `TDuty`, DSS property index: 28. + Name: `TDuty` """ def _get_Class(self) -> BatchInt32ArrayProxy: @@ -1665,7 +1731,8 @@ def _set_Class(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0 """ An arbitrary integer number representing the class of PVSystem element so that PVSystem values may be segregated by class. - DSS property name: `Class`, DSS property index: 29. + Name: `Class` + Default: 1 """ def _get_UserModel(self) -> List[str]: @@ -1678,7 +1745,7 @@ def _set_UserModel(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ Name of DLL containing user-written model, which computes the terminal currents for Dynamics studies, overriding the default model. Set to "none" to negate previous setting. - DSS property name: `UserModel`, DSS property index: 30. + Name: `UserModel` """ def _get_UserData(self) -> List[str]: @@ -1691,7 +1758,7 @@ def _set_UserData(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ String (in quotes or parentheses) that gets passed to user-written model for defining the data required for that model. - DSS property name: `UserData`, DSS property index: 31. + Name: `UserData` """ def _get_DebugTrace(self) -> List[bool]: @@ -1699,14 +1766,15 @@ def _get_DebugTrace(self) -> List[bool]: self._get_batch_int32_prop(32) ] - def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): + def _set_DebugTrace(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(32, value, flags) DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: List[bool] """ - {Yes | No } Default is no. Turn this on to capture the progress of the PVSystem model for each iteration. Creates a separate file for each PVSystem element named "PVSystem_name.csv". + Turn this on to capture the progress of the PVSystem model for each iteration. Creates a separate file for each PVSystem element named "PVSystem_name.csv". - DSS property name: `DebugTrace`, DSS property index: 32. + Name: `DebugTrace` + Default: False """ def _get_VarFollowInverter(self) -> List[bool]: @@ -1714,14 +1782,15 @@ def _get_VarFollowInverter(self) -> List[bool]: self._get_batch_int32_prop(33) ] - def _set_VarFollowInverter(self, value: bool, flags: enums.SetterFlags = 0): + def _set_VarFollowInverter(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(33, value, flags) VarFollowInverter = property(_get_VarFollowInverter, _set_VarFollowInverter) # type: List[bool] """ - Boolean variable (Yes|No) or (True|False). Defaults to False which indicates that the reactive power generation/absorption does not respect the inverter status.When set to True, the PVSystem reactive power generation/absorption will cease when the inverter status is off, due to panel kW dropping below %Cutout. The reactive power generation/absorption will begin again when the panel kW is above %Cutin. When set to False, the PVSystem will generate/absorb reactive power regardless of the status of the inverter. + Defaults to False which indicates that the reactive power generation/absorption does not respect the inverter status.When set to True, the PVSystem reactive power generation/absorption will cease when the inverter status is off, due to panel kW dropping below %Cutout. The reactive power generation/absorption will begin again when the panel kW is above %Cutin. When set to False, the PVSystem will generate/absorb reactive power regardless of the status of the inverter. - DSS property name: `VarFollowInverter`, DSS property index: 33. + Name: `VarFollowInverter` + Default: False """ def _get_DutyStart(self) -> BatchFloat64ArrayProxy: @@ -1732,9 +1801,11 @@ def _set_DutyStart(self, value: Union[float, Float64Array], flags: enums.SetterF DutyStart = property(_get_DutyStart, _set_DutyStart) # type: BatchFloat64ArrayProxy """ - Starting time offset [hours] into the duty cycle shape for this PVSystem, defaults to 0 + Starting time offset into the duty cycle shape for this PVSystem. - DSS property name: `DutyStart`, DSS property index: 34. + Name: `DutyStart` + Units: hour + Default: 0.0 """ def _get_WattPriority(self) -> List[bool]: @@ -1742,14 +1813,15 @@ def _get_WattPriority(self) -> List[bool]: self._get_batch_int32_prop(35) ] - def _set_WattPriority(self, value: bool, flags: enums.SetterFlags = 0): + def _set_WattPriority(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(35, value, flags) WattPriority = property(_get_WattPriority, _set_WattPriority) # type: List[bool] """ - {Yes/No*/True/False} Set inverter to watt priority instead of the default var priority + Set inverter to watt priority instead of the default var priority - DSS property name: `WattPriority`, DSS property index: 35. + Name: `WattPriority` + Default: False """ def _get_PFPriority(self) -> List[bool]: @@ -1757,14 +1829,15 @@ def _get_PFPriority(self) -> List[bool]: self._get_batch_int32_prop(36) ] - def _set_PFPriority(self, value: bool, flags: enums.SetterFlags = 0): + def _set_PFPriority(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(36, value, flags) PFPriority = property(_get_PFPriority, _set_PFPriority) # type: List[bool] """ - {Yes/No*/True/False} Set inverter to operate with PF priority when in constant PF mode. If "Yes", value assigned to "WattPriority" is neglected. If controlled by an InvControl with either Volt-Var or DRC or both functions activated, PF priority is neglected and "WattPriority" is considered. Default = No. + Set inverter to operate with PF priority when in constant PF mode. If "Yes", value assigned to "WattPriority" is neglected. If controlled by an InvControl with either Volt-Var or DRC or both functions activated, PF priority is neglected and "WattPriority" is considered. Default = No. - DSS property name: `PFPriority`, DSS property index: 36. + Name: `PFPriority` + Default: False """ def _get_pctPMinNoVars(self) -> BatchFloat64ArrayProxy: @@ -1777,7 +1850,8 @@ def _set_pctPMinNoVars(self, value: Union[float, Float64Array], flags: enums.Set """ Minimum active power as percentage of Pmpp under which there is no vars production/absorption. - DSS property name: `%PMinNoVars`, DSS property index: 37. + Name: `%PMinNoVars` + Default: 0.0 """ def _get_pctPMinkvarMax(self) -> BatchFloat64ArrayProxy: @@ -1790,7 +1864,8 @@ def _set_pctPMinkvarMax(self, value: Union[float, Float64Array], flags: enums.Se """ Minimum active power as percentage of Pmpp that allows the inverter to produce/absorb reactive power up to its kvarMax or kvarMaxAbs. - DSS property name: `%PMinkvarMax`, DSS property index: 38. + Name: `%PMinkvarMax` + Default: 0.0 """ def _get_kvarMax(self) -> BatchFloat64ArrayProxy: @@ -1803,7 +1878,7 @@ def _set_kvarMax(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Indicates the maximum reactive power GENERATION (un-signed numerical variable in kvar) for the inverter (as an un-signed value). Defaults to kVA rating of the inverter. - DSS property name: `kvarMax`, DSS property index: 39. + Name: `kvarMax` """ def _get_kvarMaxAbs(self) -> BatchFloat64ArrayProxy: @@ -1816,7 +1891,7 @@ def _set_kvarMaxAbs(self, value: Union[float, Float64Array], flags: enums.Setter """ Indicates the maximum reactive power ABSORPTION (un-signed numerical variable in kvar) for the inverter (as an un-signed value). Defaults to kVA rating of the inverter. - DSS property name: `kvarMaxAbs`, DSS property index: 40. + Name: `kvarMaxAbs` """ def _get_kVDC(self) -> BatchFloat64ArrayProxy: @@ -1829,7 +1904,8 @@ def _set_kVDC(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Indicates the rated voltage (kV) at the input of the inverter at the peak of PV energy production. The value is normally greater or equal to the kV base of the PV system. It is used for dynamics simulation ONLY. - DSS property name: `kVDC`, DSS property index: 41. + Name: `kVDC` + Default: 8.0 """ def _get_Kp(self) -> BatchFloat64ArrayProxy: @@ -1842,7 +1918,8 @@ def _set_Kp(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ It is the proportional gain for the PI controller within the inverter. Use it to modify the controller response in dynamics simulation mode. - DSS property name: `Kp`, DSS property index: 42. + Name: `Kp` + Default: 0.01 """ def _get_PITol(self) -> BatchFloat64ArrayProxy: @@ -1855,7 +1932,8 @@ def _set_PITol(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ It is the tolerance (%) for the closed loop controller of the inverter. For dynamics simulation mode. - DSS property name: `PITol`, DSS property index: 43. + Name: `PITol` + Default: 0.0 """ def _get_SafeVoltage(self) -> BatchFloat64ArrayProxy: @@ -1868,7 +1946,8 @@ def _set_SafeVoltage(self, value: Union[float, Float64Array], flags: enums.Sette """ Indicates the voltage level (%) respect to the base voltage level for which the Inverter will operate. If this threshold is violated, the Inverter will enter safe mode (OFF). For dynamic simulation. By default is 80% - DSS property name: `SafeVoltage`, DSS property index: 44. + Name: `SafeVoltage` + Default: 80.0 """ def _get_SafeMode(self) -> List[bool]: @@ -1876,14 +1955,16 @@ def _get_SafeMode(self) -> List[bool]: self._get_batch_int32_prop(45) ] - def _set_SafeMode(self, value: bool, flags: enums.SetterFlags = 0): + def _set_SafeMode(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(45, value, flags) SafeMode = property(_get_SafeMode, _set_SafeMode) # type: List[bool] """ - (Read only) Indicates whether the inverter entered (Yes) or not (No) into Safe Mode. + Indicates whether the inverter entered or not into Safe Mode. - DSS property name: `SafeMode`, DSS property index: 45. + **Read-only** + + Name: `SafeMode` """ def _get_DynamicEq_str(self) -> List[str]: @@ -1896,7 +1977,7 @@ def _set_DynamicEq_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Se """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. If not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 46. + Name: `DynamicEq` """ def _get_DynamicEq(self) -> List[DynamicExp]: @@ -1909,7 +1990,7 @@ def _set_DynamicEq(self, value: Union[AnyStr, DynamicExp, List[AnyStr], List[Dyn """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. If not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 46. + Name: `DynamicEq` """ def _get_DynOut(self) -> List[List[str]]: @@ -1930,7 +2011,7 @@ def _set_DynOut(self, value: List[AnyStr], flags: enums.SetterFlags = 0): The output variables need to be defined in the same order. - DSS property name: `DynOut`, DSS property index: 47. + Name: `DynOut` """ def _get_ControlMode(self) -> BatchInt32ArrayProxy: @@ -1945,11 +2026,12 @@ def _set_ControlMode(self, value: Union[AnyStr, int, enums.InverterControlMode, ControlMode = property(_get_ControlMode, _set_ControlMode) # type: BatchInt32ArrayProxy """ - Defines the control mode for the inverter. It can be one of {GFM | GFL*}. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. + Defines the control mode for the inverter. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. GFM control mode disables any control action set by the InvControl device. - DSS property name: `ControlMode`, DSS property index: 48. + Name: `ControlMode` + Default: GFL """ def _get_ControlMode_str(self) -> List[str]: @@ -1960,11 +2042,12 @@ def _set_ControlMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ControlMode_str = property(_get_ControlMode_str, _set_ControlMode_str) # type: List[str] """ - Defines the control mode for the inverter. It can be one of {GFM | GFL*}. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. + Defines the control mode for the inverter. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. GFM control mode disables any control action set by the InvControl device. - DSS property name: `ControlMode`, DSS property index: 48. + Name: `ControlMode` + Default: GFL """ def _get_AmpLimit(self) -> BatchFloat64ArrayProxy: @@ -1978,7 +2061,7 @@ def _set_AmpLimit(self, value: Union[float, Float64Array], flags: enums.SetterFl The current limiter per phase for the IBR when operating in GFM mode. This limit is imposed to prevent the IBR to enter into Safe Mode when reaching the IBR power ratings. Once the IBR reaches this value, it remains there without moving into Safe Mode. This value needs to be set lower than the IBR Amps rating. - DSS property name: `AmpLimit`, DSS property index: 49. + Name: `AmpLimit` """ def _get_AmpLimitGain(self) -> BatchFloat64ArrayProxy: @@ -1991,7 +2074,8 @@ def _set_AmpLimitGain(self, value: Union[float, Float64Array], flags: enums.Sett """ Use it for fine tunning the current limiter when active, by default is 0.8, it has to be a value between 0.1 and 1. This value allows users to fine tune the IBRs current limiter to match with the user requirements. - DSS property name: `AmpLimitGain`, DSS property index: 50. + Name: `AmpLimitGain` + Default: 0.8 """ def _get_Spectrum_str(self) -> List[str]: @@ -2002,9 +2086,9 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] """ - Name of harmonic voltage or current spectrum for this PVSystem element. A harmonic voltage source is assumed for the inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this PVSystem element. A harmonic voltage source is assumed for the inverter. - DSS property name: `Spectrum`, DSS property index: 51. + Name: `Spectrum` """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -2015,9 +2099,9 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] """ - Name of harmonic voltage or current spectrum for this PVSystem element. A harmonic voltage source is assumed for the inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this PVSystem element. A harmonic voltage source is assumed for the inverter. - DSS property name: `Spectrum`, DSS property index: 51. + Name: `Spectrum` """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -2030,7 +2114,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 52. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -2038,14 +2123,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(53) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(53, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 53. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -2054,7 +2140,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 54. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(54, value, flags) diff --git a/altdss/PriceShape.py b/altdss/PriceShape.py index 62aacff..4046152 100644 --- a/altdss/PriceShape.py +++ b/altdss/PriceShape.py @@ -68,7 +68,7 @@ def _set_NPts(self, value: int, flags: enums.SetterFlags = 0): """ Max number of points to expect in price shape vectors. This gets reset to the number of Price values found if less than specified. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_Interval(self) -> float: @@ -83,7 +83,8 @@ def _set_Interval(self, value: float, flags: enums.SetterFlags = 0): See also "sinterval" and "minterval". - DSS property name: `Interval`, DSS property index: 2. + Name: `Interval` + Default: 1.0 """ def _get_Price(self) -> Float64Array: @@ -101,7 +102,7 @@ def _set_Price(self, value: Float64Array, flags: enums.SetterFlags = 0): Note: this property will reset Npts if the number of values in the files are fewer. - DSS property name: `Price`, DSS property index: 3. + Name: `Price` """ def _get_Hour(self) -> Float64Array: @@ -117,7 +118,7 @@ def _set_Hour(self, value: Float64Array, flags: enums.SetterFlags = 0): hour = (dblfile=filename) !for packed file of doubles hour = (sngfile=filename) !for packed file of singles - DSS property name: `Hour`, DSS property index: 4. + Name: `Hour` """ def _get_Mean(self) -> float: @@ -130,7 +131,7 @@ def _set_Mean(self, value: float, flags: enums.SetterFlags = 0): """ Mean of the Price curve values. This is computed on demand the first time a value is needed. However, you may set it to another value independently. Used for Monte Carlo load simulations. - DSS property name: `Mean`, DSS property index: 5. + Name: `Mean` """ def _get_StdDev(self) -> float: @@ -145,7 +146,7 @@ def _set_StdDev(self, value: float, flags: enums.SetterFlags = 0): Used for Monte Carlo load simulations. - DSS property name: `StdDev`, DSS property index: 6. + Name: `StdDev` """ def _get_CSVFile(self) -> str: @@ -158,7 +159,7 @@ def _set_CSVFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of Price curve data to a csv file containing (hour, Price) points, or simply (Price) values for fixed time interval data, one per line. NOTE: This action may reset the number of points to a lower value. - DSS property name: `CSVFile`, DSS property index: 7. + Name: `CSVFile` """ def _get_SngFile(self) -> str: @@ -171,7 +172,7 @@ def _set_SngFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of Price curve data to a binary file of singles containing (hour, Price) points, or simply (Price) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `SngFile`, DSS property index: 8. + Name: `SngFile` """ def _get_DblFile(self) -> str: @@ -184,7 +185,7 @@ def _set_DblFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of Price curve data to a binary file of doubles containing (hour, Price) points, or simply (Price) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `DblFile`, DSS property index: 9. + Name: `DblFile` """ def _get_SInterval(self) -> float: @@ -197,7 +198,7 @@ def _set_SInterval(self, value: float, flags: enums.SetterFlags = 0): """ Specify fixed interval in SECONDS. Alternate way to specify Interval property. - DSS property name: `SInterval`, DSS property index: 10. + Name: `SInterval` """ def _get_MInterval(self) -> float: @@ -210,14 +211,14 @@ def _set_MInterval(self, value: float, flags: enums.SetterFlags = 0): """ Specify fixed interval in MINUTES. Alternate way to specify Interval property. - DSS property name: `MInterval`, DSS property index: 11. + Name: `MInterval` """ def Action(self, value: Union[AnyStr, int, enums.PriceShapeAction], flags: enums.SetterFlags = 0): """ {DblSave | SngSave} After defining Price curve data... Setting action=DblSave or SngSave will cause the present "Price" values to be written to either a packed file of double or single. The filename is the PriceShape name. - DSS property name: `Action`, DSS property index: 12. + Name: `Action` """ if isinstance(value, int): self._lib.Obj_SetInt32(self._ptr, 12, value, flags) @@ -239,7 +240,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 13. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(13, value) @@ -297,7 +300,7 @@ def _set_NPts(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0) """ Max number of points to expect in price shape vectors. This gets reset to the number of Price values found if less than specified. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_Interval(self) -> BatchFloat64ArrayProxy: @@ -312,7 +315,8 @@ def _set_Interval(self, value: Union[float, Float64Array], flags: enums.SetterFl See also "sinterval" and "minterval". - DSS property name: `Interval`, DSS property index: 2. + Name: `Interval` + Default: 1.0 """ def _get_Price(self) -> List[Float64Array]: @@ -333,7 +337,7 @@ def _set_Price(self, value: Union[Float64Array, List[Float64Array]], flags: enum Note: this property will reset Npts if the number of values in the files are fewer. - DSS property name: `Price`, DSS property index: 3. + Name: `Price` """ def _get_Hour(self) -> List[Float64Array]: @@ -352,7 +356,7 @@ def _set_Hour(self, value: Union[Float64Array, List[Float64Array]], flags: enums hour = (dblfile=filename) !for packed file of doubles hour = (sngfile=filename) !for packed file of singles - DSS property name: `Hour`, DSS property index: 4. + Name: `Hour` """ def _get_Mean(self) -> BatchFloat64ArrayProxy: @@ -365,7 +369,7 @@ def _set_Mean(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Mean of the Price curve values. This is computed on demand the first time a value is needed. However, you may set it to another value independently. Used for Monte Carlo load simulations. - DSS property name: `Mean`, DSS property index: 5. + Name: `Mean` """ def _get_StdDev(self) -> BatchFloat64ArrayProxy: @@ -380,7 +384,7 @@ def _set_StdDev(self, value: Union[float, Float64Array], flags: enums.SetterFlag Used for Monte Carlo load simulations. - DSS property name: `StdDev`, DSS property index: 6. + Name: `StdDev` """ def _get_CSVFile(self) -> List[str]: @@ -393,7 +397,7 @@ def _set_CSVFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of Price curve data to a csv file containing (hour, Price) points, or simply (Price) values for fixed time interval data, one per line. NOTE: This action may reset the number of points to a lower value. - DSS property name: `CSVFile`, DSS property index: 7. + Name: `CSVFile` """ def _get_SngFile(self) -> List[str]: @@ -406,7 +410,7 @@ def _set_SngFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of Price curve data to a binary file of singles containing (hour, Price) points, or simply (Price) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `SngFile`, DSS property index: 8. + Name: `SngFile` """ def _get_DblFile(self) -> List[str]: @@ -419,7 +423,7 @@ def _set_DblFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of Price curve data to a binary file of doubles containing (hour, Price) points, or simply (Price) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `DblFile`, DSS property index: 9. + Name: `DblFile` """ def _get_SInterval(self) -> BatchFloat64ArrayProxy: @@ -432,7 +436,7 @@ def _set_SInterval(self, value: Union[float, Float64Array], flags: enums.SetterF """ Specify fixed interval in SECONDS. Alternate way to specify Interval property. - DSS property name: `SInterval`, DSS property index: 10. + Name: `SInterval` """ def _get_MInterval(self) -> BatchFloat64ArrayProxy: @@ -445,14 +449,14 @@ def _set_MInterval(self, value: Union[float, Float64Array], flags: enums.SetterF """ Specify fixed interval in MINUTES. Alternate way to specify Interval property. - DSS property name: `MInterval`, DSS property index: 11. + Name: `MInterval` """ def Action(self, value: Union[AnyStr, int, enums.PriceShapeAction], flags: enums.SetterFlags = 0): """ {DblSave | SngSave} After defining Price curve data... Setting action=DblSave or SngSave will cause the present "Price" values to be written to either a packed file of double or single. The filename is the PriceShape name. - DSS property name: `Action`, DSS property index: 12. + Name: `Action` """ if isinstance(value, (bytes, str)) or (isinstance(value, LIST_LIKE) and len(value) > 0 and isinstance(value[0], (bytes, str))): self._set_batch_string(12, value, flags) @@ -473,7 +477,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 13. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(13, value, flags) diff --git a/altdss/Reactor.py b/altdss/Reactor.py index 9628fc5..de6e079 100644 --- a/altdss/Reactor.py +++ b/altdss/Reactor.py @@ -103,7 +103,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): Bus2 property will default to this bus, node 0, unless previously specified. Only Bus1 need be specified for a Yg shunt reactor. - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> str: @@ -118,7 +118,7 @@ def _set_Bus2(self, value: AnyStr, flags: enums.SetterFlags = 0): Not necessary to specify for delta (LL) connection - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_Phases(self) -> int: @@ -131,7 +131,8 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): """ Number of phases. - DSS property name: `Phases`, DSS property index: 3. + Name: `Phases` + Default: 3 """ def _get_kvar(self) -> float: @@ -144,7 +145,9 @@ def _set_kvar(self, value: float, flags: enums.SetterFlags = 0): """ Total kvar, all phases. Evenly divided among phases. Only determines X. Specify R separately - DSS property name: `kvar`, DSS property index: 4. + Name: `kvar` + Units: kvar + Default: 100.0 """ def _get_kV(self) -> float: @@ -157,7 +160,9 @@ def _set_kV(self, value: float, flags: enums.SetterFlags = 0): """ For 2, 3-phase, kV phase-phase. Otherwise specify actual coil rating. - DSS property name: `kV`, DSS property index: 5. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_Conn(self) -> enums.Connection: @@ -173,7 +178,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection], flags: enums.Se """ ={wye | delta |LN |LL} Default is wye, which is equivalent to LN. If Delta, then only one terminal. - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> str: @@ -186,7 +192,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={wye | delta |LN |LL} Default is wye, which is equivalent to LN. If Delta, then only one terminal. - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Wye """ def _get_RMatrix(self) -> Float64Array: @@ -199,7 +206,7 @@ def _set_RMatrix(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Resistance matrix, lower triangle, ohms at base frequency. Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X. - DSS property name: `RMatrix`, DSS property index: 7. + Name: `RMatrix` """ def _get_XMatrix(self) -> Float64Array: @@ -212,7 +219,7 @@ def _set_XMatrix(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Reactance matrix, lower triangle, ohms at base frequency. Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X. - DSS property name: `XMatrix`, DSS property index: 8. + Name: `XMatrix` """ def _get_Parallel(self) -> bool: @@ -223,9 +230,10 @@ def _set_Parallel(self, value: bool, flags: enums.SetterFlags = 0): Parallel = property(_get_Parallel, _set_Parallel) # type: bool """ - {Yes | No} Default=No. Indicates whether Rmatrix and Xmatrix are to be considered in parallel. Default is series. For other models, specify R and Rp. + Indicates whether Rmatrix and Xmatrix are to be considered in parallel. Default is series. For other models, specify R and Rp. - DSS property name: `Parallel`, DSS property index: 9. + Name: `Parallel` + Default: False """ def _get_R(self) -> float: @@ -238,7 +246,8 @@ def _set_R(self, value: float, flags: enums.SetterFlags = 0): """ Resistance (in series with reactance), each phase, ohms. This property applies to REACTOR specified by either kvar or X. See also help on Z. - DSS property name: `R`, DSS property index: 10. + Name: `R` + Units: Ω """ def _get_X(self) -> float: @@ -251,7 +260,8 @@ def _set_X(self, value: float, flags: enums.SetterFlags = 0): """ Reactance, each phase, ohms at base frequency. See also help on Z and LmH properties. - DSS property name: `X`, DSS property index: 11. + Name: `X` + Units: Ω """ def _get_Rp(self) -> float: @@ -264,7 +274,8 @@ def _set_Rp(self, value: float, flags: enums.SetterFlags = 0): """ Resistance in parallel with R and X (the entire branch). Assumed infinite if not specified. - DSS property name: `Rp`, DSS property index: 12. + Name: `Rp` + Units: Ω """ def _get_Z1(self) -> complex: @@ -283,7 +294,9 @@ def _set_Z1(self, value: complex, flags: enums.SetterFlags = 0): Side Effect: Sets Z2 and Z0 to same values unless they were previously defined. - DSS property name: `Z1`, DSS property index: 13. + Name: `Z1` + Units: Ω + Default: [0.0, 0.0] """ def _get_Z2(self) -> complex: @@ -302,7 +315,9 @@ def _set_Z2(self, value: complex, flags: enums.SetterFlags = 0): Note: Z2 defaults to Z1 if it is not specifically defined. If Z2 is not equal to Z1, the impedance matrix is asymmetrical. - DSS property name: `Z2`, DSS property index: 14. + Name: `Z2` + Units: Ω + Default: [0.0, 0.0] """ def _get_Z0(self) -> complex: @@ -321,7 +336,9 @@ def _set_Z0(self, value: complex, flags: enums.SetterFlags = 0): Note: Z0 defaults to Z1 if it is not specifically defined. - DSS property name: `Z0`, DSS property index: 15. + Name: `Z0` + Units: Ω + Default: [0.0, 0.0] """ def _get_RCurve_str(self) -> str: @@ -334,7 +351,7 @@ def _set_RCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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. - DSS property name: `RCurve`, DSS property index: 17. + Name: `RCurve` """ def _get_RCurve(self) -> XYcurve: @@ -351,7 +368,7 @@ def _set_RCurve(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags = """ 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. - DSS property name: `RCurve`, DSS property index: 17. + Name: `RCurve` """ def _get_LCurve_str(self) -> str: @@ -364,7 +381,7 @@ def _set_LCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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. - DSS property name: `LCurve`, DSS property index: 18. + Name: `LCurve` """ def _get_LCurve(self) -> XYcurve: @@ -381,7 +398,7 @@ def _set_LCurve(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags = """ 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. - DSS property name: `LCurve`, DSS property index: 18. + Name: `LCurve` """ def _get_LmH(self) -> float: @@ -394,7 +411,8 @@ def _set_LmH(self, value: float, flags: enums.SetterFlags = 0): """ Inductance, mH. Alternate way to define the reactance, X, property. - DSS property name: `LmH`, DSS property index: 19. + Name: `LmH` + Units: mH """ def _get_NormAmps(self) -> float: @@ -407,7 +425,8 @@ def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): """ Normal rated current. Defaults to per-phase rated current when reactor is specified with rated power and voltage. - DSS property name: `NormAmps`, DSS property index: 20. + Name: `NormAmps` + Units: A """ def _get_EmergAmps(self) -> float: @@ -420,7 +439,8 @@ def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): """ Maximum or emerg current. Defaults to 135% of per-phase rated current when reactor is specified with rated power and voltage. - DSS property name: `EmergAmps`, DSS property index: 21. + Name: `EmergAmps` + Units: A """ def _get_FaultRate(self) -> float: @@ -433,7 +453,8 @@ def _set_FaultRate(self, value: float, flags: enums.SetterFlags = 0): """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 22. + Name: `FaultRate` + Default: 0.0005 """ def _get_pctPerm(self) -> float: @@ -446,7 +467,8 @@ def _set_pctPerm(self, value: float, flags: enums.SetterFlags = 0): """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 23. + Name: `pctPerm` + Default: 100.0 """ def _get_Repair(self) -> float: @@ -459,7 +481,8 @@ def _set_Repair(self, value: float, flags: enums.SetterFlags = 0): """ Hours to repair. - DSS property name: `Repair`, DSS property index: 24. + Name: `Repair` + Default: 3.0 """ def _get_BaseFreq(self) -> float: @@ -472,7 +495,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 25. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -483,9 +507,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 26. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -494,7 +519,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 27. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(27, value) @@ -573,7 +600,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags Bus2 property will default to this bus, node 0, unless previously specified. Only Bus1 need be specified for a Yg shunt reactor. - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> List[str]: @@ -588,7 +615,7 @@ def _set_Bus2(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags Not necessary to specify for delta (LL) connection - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -601,7 +628,8 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of phases. - DSS property name: `Phases`, DSS property index: 3. + Name: `Phases` + Default: 3 """ def _get_kvar(self) -> BatchFloat64ArrayProxy: @@ -614,7 +642,9 @@ def _set_kvar(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Total kvar, all phases. Evenly divided among phases. Only determines X. Specify R separately - DSS property name: `kvar`, DSS property index: 4. + Name: `kvar` + Units: kvar + Default: 100.0 """ def _get_kV(self) -> BatchFloat64ArrayProxy: @@ -627,7 +657,9 @@ def _set_kV(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ For 2, 3-phase, kV phase-phase. Otherwise specify actual coil rating. - DSS property name: `kV`, DSS property index: 5. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_Conn(self) -> BatchInt32ArrayProxy: @@ -644,7 +676,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection, List[AnyStr], Li """ ={wye | delta |LN |LL} Default is wye, which is equivalent to LN. If Delta, then only one terminal. - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> List[str]: @@ -657,7 +690,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={wye | delta |LN |LL} Default is wye, which is equivalent to LN. If Delta, then only one terminal. - DSS property name: `Conn`, DSS property index: 6. + Name: `Conn` + Default: Wye """ def _get_RMatrix(self) -> List[Float64Array]: @@ -673,7 +707,7 @@ def _set_RMatrix(self, value: Union[Float64Array, List[Float64Array]], flags: en """ Resistance matrix, lower triangle, ohms at base frequency. Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X. - DSS property name: `RMatrix`, DSS property index: 7. + Name: `RMatrix` """ def _get_XMatrix(self) -> List[Float64Array]: @@ -689,7 +723,7 @@ def _set_XMatrix(self, value: Union[Float64Array, List[Float64Array]], flags: en """ Reactance matrix, lower triangle, ohms at base frequency. Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X. - DSS property name: `XMatrix`, DSS property index: 8. + Name: `XMatrix` """ def _get_Parallel(self) -> List[bool]: @@ -697,14 +731,15 @@ def _get_Parallel(self) -> List[bool]: self._get_batch_int32_prop(9) ] - def _set_Parallel(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Parallel(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(9, value, flags) Parallel = property(_get_Parallel, _set_Parallel) # type: List[bool] """ - {Yes | No} Default=No. Indicates whether Rmatrix and Xmatrix are to be considered in parallel. Default is series. For other models, specify R and Rp. + Indicates whether Rmatrix and Xmatrix are to be considered in parallel. Default is series. For other models, specify R and Rp. - DSS property name: `Parallel`, DSS property index: 9. + Name: `Parallel` + Default: False """ def _get_R(self) -> BatchFloat64ArrayProxy: @@ -717,7 +752,8 @@ def _set_R(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ Resistance (in series with reactance), each phase, ohms. This property applies to REACTOR specified by either kvar or X. See also help on Z. - DSS property name: `R`, DSS property index: 10. + Name: `R` + Units: Ω """ def _get_X(self) -> BatchFloat64ArrayProxy: @@ -730,7 +766,8 @@ def _set_X(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ Reactance, each phase, ohms at base frequency. See also help on Z and LmH properties. - DSS property name: `X`, DSS property index: 11. + Name: `X` + Units: Ω """ def _get_Rp(self) -> BatchFloat64ArrayProxy: @@ -743,7 +780,8 @@ def _set_Rp(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Resistance in parallel with R and X (the entire branch). Assumed infinite if not specified. - DSS property name: `Rp`, DSS property index: 12. + Name: `Rp` + Units: Ω """ def _get_Z1(self) -> List[complex]: @@ -783,7 +821,9 @@ def _set_Z1(self, value: Union[complex, List[complex]], flags: enums.SetterFlags Side Effect: Sets Z2 and Z0 to same values unless they were previously defined. - DSS property name: `Z1`, DSS property index: 13. + Name: `Z1` + Units: Ω + Default: [0.0, 0.0] """ def _get_Z2(self) -> List[complex]: @@ -823,7 +863,9 @@ def _set_Z2(self, value: Union[complex, List[complex]], flags: enums.SetterFlags Note: Z2 defaults to Z1 if it is not specifically defined. If Z2 is not equal to Z1, the impedance matrix is asymmetrical. - DSS property name: `Z2`, DSS property index: 14. + Name: `Z2` + Units: Ω + Default: [0.0, 0.0] """ def _get_Z0(self) -> List[complex]: @@ -863,7 +905,9 @@ def _set_Z0(self, value: Union[complex, List[complex]], flags: enums.SetterFlags Note: Z0 defaults to Z1 if it is not specifically defined. - DSS property name: `Z0`, DSS property index: 15. + Name: `Z0` + Units: Ω + Default: [0.0, 0.0] """ def _get_RCurve_str(self) -> List[str]: @@ -876,7 +920,7 @@ def _set_RCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ 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. - DSS property name: `RCurve`, DSS property index: 17. + Name: `RCurve` """ def _get_RCurve(self) -> List[XYcurve]: @@ -889,7 +933,7 @@ def _set_RCurve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve]] """ 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. - DSS property name: `RCurve`, DSS property index: 17. + Name: `RCurve` """ def _get_LCurve_str(self) -> List[str]: @@ -902,7 +946,7 @@ def _set_LCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ 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. - DSS property name: `LCurve`, DSS property index: 18. + Name: `LCurve` """ def _get_LCurve(self) -> List[XYcurve]: @@ -915,7 +959,7 @@ def _set_LCurve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve]] """ 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. - DSS property name: `LCurve`, DSS property index: 18. + Name: `LCurve` """ def _get_LmH(self) -> BatchFloat64ArrayProxy: @@ -928,7 +972,8 @@ def _set_LmH(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Inductance, mH. Alternate way to define the reactance, X, property. - DSS property name: `LmH`, DSS property index: 19. + Name: `LmH` + Units: mH """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: @@ -941,7 +986,8 @@ def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Normal rated current. Defaults to per-phase rated current when reactor is specified with rated power and voltage. - DSS property name: `NormAmps`, DSS property index: 20. + Name: `NormAmps` + Units: A """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: @@ -954,7 +1000,8 @@ def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterF """ Maximum or emerg current. Defaults to 135% of per-phase rated current when reactor is specified with rated power and voltage. - DSS property name: `EmergAmps`, DSS property index: 21. + Name: `EmergAmps` + Units: A """ def _get_FaultRate(self) -> BatchFloat64ArrayProxy: @@ -967,7 +1014,8 @@ def _set_FaultRate(self, value: Union[float, Float64Array], flags: enums.SetterF """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 22. + Name: `FaultRate` + Default: 0.0005 """ def _get_pctPerm(self) -> BatchFloat64ArrayProxy: @@ -980,7 +1028,8 @@ def _set_pctPerm(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 23. + Name: `pctPerm` + Default: 100.0 """ def _get_Repair(self) -> BatchFloat64ArrayProxy: @@ -993,7 +1042,8 @@ def _set_Repair(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Hours to repair. - DSS property name: `Repair`, DSS property index: 24. + Name: `Repair` + Default: 3.0 """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -1006,7 +1056,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 25. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -1014,14 +1065,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(26) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(26, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 26. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1030,7 +1082,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 27. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(27, value, flags) diff --git a/altdss/Recloser.py b/altdss/Recloser.py index 7e0b633..8cad6bf 100644 --- a/altdss/Recloser.py +++ b/altdss/Recloser.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -15,7 +15,7 @@ class Recloser(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'Recloser' - _cls_idx = 32 + _cls_idx = 33 _cls_int_idx = { 2, 4, @@ -100,7 +100,7 @@ def _set_MonitoredObj_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the Recloser's PT and/or CT are connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredObj(self) -> DSSObj: @@ -117,7 +117,7 @@ def _set_MonitoredObj(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFla """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the Recloser's PT and/or CT are connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredTerm(self) -> int: @@ -128,9 +128,10 @@ def _set_MonitoredTerm(self, value: int, flags: enums.SetterFlags = 0): MonitoredTerm = property(_get_MonitoredTerm, _set_MonitoredTerm) # type: int """ - Number of the terminal of the circuit element to which the Recloser is connected. 1 or 2, typically. Default is 1. + Number of the terminal of the circuit element to which the Recloser is connected. 1 or 2, typically. - DSS property name: `MonitoredTerm`, DSS property index: 2. + Name: `MonitoredTerm` + Default: 1 """ def _get_SwitchedObj_str(self) -> str: @@ -141,9 +142,9 @@ def _set_SwitchedObj_str(self, value: AnyStr, flags: enums.SetterFlags = 0): SwitchedObj_str = property(_get_SwitchedObj_str, _set_SwitchedObj_str) # type: str """ - Name of circuit element switch that the Recloser controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Recloser controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedObj(self) -> DSSObj: @@ -158,9 +159,9 @@ def _set_SwitchedObj(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlag SwitchedObj = property(_get_SwitchedObj, _set_SwitchedObj) # type: DSSObj """ - Name of circuit element switch that the Recloser controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Recloser controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedTerm(self) -> int: @@ -173,7 +174,8 @@ def _set_SwitchedTerm(self, value: int, flags: enums.SetterFlags = 0): """ Number of the terminal of the controlled element in which the switch is controlled by the Recloser. 1 or 2, typically. Default is 1. - DSS property name: `SwitchedTerm`, DSS property index: 4. + Name: `SwitchedTerm` + Default: 1 """ def _get_NumFast(self) -> int: @@ -184,9 +186,10 @@ def _set_NumFast(self, value: int, flags: enums.SetterFlags = 0): NumFast = property(_get_NumFast, _set_NumFast) # type: int """ - Number of Fast (fuse saving) operations. Default is 1. (See "Shots") + Number of Fast (fuse saving) operations. (See "Shots") - DSS property name: `NumFast`, DSS property index: 5. + Name: `NumFast` + Default: 1 """ def _get_PhaseFast_str(self) -> str: @@ -199,7 +202,8 @@ def _set_PhaseFast_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of the TCC Curve object that determines the Phase Fast trip. Must have been previously defined as a TCC_Curve object. Default is "A". Multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseFast`, DSS property index: 6. + Name: `PhaseFast` + Default: a """ def _get_PhaseFast(self) -> TCC_Curve: @@ -216,7 +220,8 @@ def _set_PhaseFast(self, value: Union[AnyStr, TCC_Curve], flags: enums.SetterFla """ Name of the TCC Curve object that determines the Phase Fast trip. Must have been previously defined as a TCC_Curve object. Default is "A". Multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseFast`, DSS property index: 6. + Name: `PhaseFast` + Default: a """ def _get_PhaseDelayed_str(self) -> str: @@ -229,7 +234,8 @@ def _set_PhaseDelayed_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of the TCC Curve object that determines the Phase Delayed trip. Must have been previously defined as a TCC_Curve object. Default is "D".Multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseDelayed`, DSS property index: 7. + Name: `PhaseDelayed` + Default: d """ def _get_PhaseDelayed(self) -> TCC_Curve: @@ -246,7 +252,8 @@ def _set_PhaseDelayed(self, value: Union[AnyStr, TCC_Curve], flags: enums.Setter """ Name of the TCC Curve object that determines the Phase Delayed trip. Must have been previously defined as a TCC_Curve object. Default is "D".Multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseDelayed`, DSS property index: 7. + Name: `PhaseDelayed` + Default: d """ def _get_GroundFast_str(self) -> str: @@ -259,7 +266,7 @@ def _set_GroundFast_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of the TCC Curve object that determines the Ground Fast trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored). Multiplying the current values in the curve by the "groundtrip" value gives the actual current. - DSS property name: `GroundFast`, DSS property index: 8. + Name: `GroundFast` """ def _get_GroundFast(self) -> TCC_Curve: @@ -276,7 +283,7 @@ def _set_GroundFast(self, value: Union[AnyStr, TCC_Curve], flags: enums.SetterFl """ Name of the TCC Curve object that determines the Ground Fast trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored). Multiplying the current values in the curve by the "groundtrip" value gives the actual current. - DSS property name: `GroundFast`, DSS property index: 8. + Name: `GroundFast` """ def _get_GroundDelayed_str(self) -> str: @@ -289,7 +296,7 @@ def _set_GroundDelayed_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of the TCC Curve object that determines the Ground Delayed trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored).Multiplying the current values in the curve by the "groundtrip" value gives the actual current. - DSS property name: `GroundDelayed`, DSS property index: 9. + Name: `GroundDelayed` """ def _get_GroundDelayed(self) -> TCC_Curve: @@ -306,7 +313,7 @@ def _set_GroundDelayed(self, value: Union[AnyStr, TCC_Curve], flags: enums.Sette """ Name of the TCC Curve object that determines the Ground Delayed trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored).Multiplying the current values in the curve by the "groundtrip" value gives the actual current. - DSS property name: `GroundDelayed`, DSS property index: 9. + Name: `GroundDelayed` """ def _get_PhaseTrip(self) -> float: @@ -317,9 +324,10 @@ def _set_PhaseTrip(self, value: float, flags: enums.SetterFlags = 0): PhaseTrip = property(_get_PhaseTrip, _set_PhaseTrip) # type: float """ - Multiplier or actual phase amps for the phase TCC curve. Defaults to 1.0. + Multiplier or actual phase amps for the phase TCC curve. - DSS property name: `PhaseTrip`, DSS property index: 10. + Name: `PhaseTrip` + Default: 1.0 """ def _get_GroundTrip(self) -> float: @@ -330,9 +338,10 @@ def _set_GroundTrip(self, value: float, flags: enums.SetterFlags = 0): GroundTrip = property(_get_GroundTrip, _set_GroundTrip) # type: float """ - Multiplier or actual ground amps (3I0) for the ground TCC curve. Defaults to 1.0. + Multiplier or actual ground amps (3I0) for the ground TCC curve. - DSS property name: `GroundTrip`, DSS property index: 11. + Name: `GroundTrip` + Default: 1.0 """ def _get_PhaseInst(self) -> float: @@ -345,7 +354,8 @@ def _set_PhaseInst(self, value: float, flags: enums.SetterFlags = 0): """ Actual amps for instantaneous phase trip which is assumed to happen in 0.01 sec + Delay Time. Default is 0.0, which signifies no inst trip. - DSS property name: `PhaseInst`, DSS property index: 12. + Name: `PhaseInst` + Default: 0.0 """ def _get_GroundInst(self) -> float: @@ -356,9 +366,10 @@ def _set_GroundInst(self, value: float, flags: enums.SetterFlags = 0): GroundInst = property(_get_GroundInst, _set_GroundInst) # type: float """ - Actual amps for instantaneous ground trip which is assumed to happen in 0.01 sec + Delay Time.Default is 0.0, which signifies no inst trip. + Actual amps for instantaneous ground trip which is assumed to happen in 0.01 sec + Delay Time. Default is 0.0, which signifies no inst trip. - DSS property name: `GroundInst`, DSS property index: 13. + Name: `GroundInst` + Default: 0.0 """ def _get_Reset(self) -> float: @@ -369,9 +380,11 @@ def _set_Reset(self, value: float, flags: enums.SetterFlags = 0): Reset = property(_get_Reset, _set_Reset) # type: float """ - Reset time in sec for Recloser. Default is 15. + Reset time for Recloser. - DSS property name: `Reset`, DSS property index: 14. + Name: `Reset` + Units: s + Default: 15.0 """ def _get_Shots(self) -> int: @@ -384,7 +397,8 @@ def _set_Shots(self, value: int, flags: enums.SetterFlags = 0): """ Total Number of fast and delayed shots to lockout. Default is 4. This is one more than the number of reclose intervals. - DSS property name: `Shots`, DSS property index: 15. + Name: `Shots` + Default: 4 """ def _get_RecloseIntervals(self) -> Float64Array: @@ -397,7 +411,8 @@ def _set_RecloseIntervals(self, value: Float64Array, flags: enums.SetterFlags = """ Array of reclose intervals. Default for Recloser is (0.5, 2.0, 2.0) seconds. A locked out Recloser must be closed manually (action=close). - DSS property name: `RecloseIntervals`, DSS property index: 16. + Name: `RecloseIntervals` + Default: [0.5, 2.0, 2.0] """ def _get_Delay(self) -> float: @@ -408,9 +423,11 @@ def _set_Delay(self, value: float, flags: enums.SetterFlags = 0): Delay = property(_get_Delay, _set_Delay) # type: float """ - Fixed delay time (sec) added to Recloser trip time. Default is 0.0. Used to represent breaker time or any other delay. + Fixed delay time added to Recloser trip time. Used to represent breaker time or any other delay. - DSS property name: `Delay`, DSS property index: 17. + Name: `Delay` + Units: s + Default: 0.0 """ def _get_TDPhFast(self) -> float: @@ -421,9 +438,10 @@ def _set_TDPhFast(self, value: float, flags: enums.SetterFlags = 0): TDPhFast = property(_get_TDPhFast, _set_TDPhFast) # type: float """ - Time dial for Phase Fast trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Phase Fast trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDPhFast`, DSS property index: 19. + Name: `TDPhFast` + Default: 1.0 """ def _get_TDGrFast(self) -> float: @@ -434,9 +452,10 @@ def _set_TDGrFast(self, value: float, flags: enums.SetterFlags = 0): TDGrFast = property(_get_TDGrFast, _set_TDGrFast) # type: float """ - Time dial for Ground Fast trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Ground Fast trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDGrFast`, DSS property index: 20. + Name: `TDGrFast` + Default: 1.0 """ def _get_TDPhDelayed(self) -> float: @@ -447,9 +466,10 @@ def _set_TDPhDelayed(self, value: float, flags: enums.SetterFlags = 0): TDPhDelayed = property(_get_TDPhDelayed, _set_TDPhDelayed) # type: float """ - Time dial for Phase Delayed trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Phase Delayed trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDPhDelayed`, DSS property index: 21. + Name: `TDPhDelayed` + Default: 1.0 """ def _get_TDGrDelayed(self) -> float: @@ -460,9 +480,10 @@ def _set_TDGrDelayed(self, value: float, flags: enums.SetterFlags = 0): TDGrDelayed = property(_get_TDGrDelayed, _set_TDGrDelayed) # type: float """ - Time dial for Ground Delayed trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Ground Delayed trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDGrDelayed`, DSS property index: 22. + Name: `TDGrDelayed` + Default: 1.0 """ def _get_Normal(self) -> enums.RecloserState: @@ -476,9 +497,10 @@ def _set_Normal(self, value: Union[AnyStr, int, enums.RecloserState], flags: enu Normal = property(_get_Normal, _set_Normal) # type: enums.RecloserState """ - {Open | Closed} Normal state of the recloser. The recloser reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. + Normal state of the recloser. The recloser reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. - DSS property name: `Normal`, DSS property index: 23. + Name: `Normal` + Default: Closed """ def _get_Normal_str(self) -> str: @@ -489,9 +511,10 @@ def _set_Normal_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Normal_str = property(_get_Normal_str, _set_Normal_str) # type: str """ - {Open | Closed} Normal state of the recloser. The recloser reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. + Normal state of the recloser. The recloser reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. - DSS property name: `Normal`, DSS property index: 23. + Name: `Normal` + Default: Closed """ def _get_State(self) -> enums.RecloserState: @@ -505,9 +528,10 @@ def _set_State(self, value: Union[AnyStr, int, enums.RecloserState], flags: enum State = property(_get_State, _set_State) # type: enums.RecloserState """ - {Open | Closed} Actual state of the recloser. Upon setting, immediately forces state of the recloser, overriding the Recloser control. Simulates manual control on recloser. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the recloser to reset to its first operation. + Actual state of the recloser. Upon setting, immediately forces state of the recloser, overriding the Recloser control. Simulates manual control on recloser. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the recloser to reset to its first operation. - DSS property name: `State`, DSS property index: 24. + Name: `State` + Default: Closed """ def _get_State_str(self) -> str: @@ -518,9 +542,10 @@ def _set_State_str(self, value: AnyStr, flags: enums.SetterFlags = 0): State_str = property(_get_State_str, _set_State_str) # type: str """ - {Open | Closed} Actual state of the recloser. Upon setting, immediately forces state of the recloser, overriding the Recloser control. Simulates manual control on recloser. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the recloser to reset to its first operation. + Actual state of the recloser. Upon setting, immediately forces state of the recloser, overriding the Recloser control. Simulates manual control on recloser. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the recloser to reset to its first operation. - DSS property name: `State`, DSS property index: 24. + Name: `State` + Default: Closed """ def _get_BaseFreq(self) -> float: @@ -533,7 +558,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 25. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -544,9 +570,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 26. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -555,7 +582,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 27. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(27, value) @@ -591,7 +620,7 @@ class RecloserProperties(TypedDict): class RecloserBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'Recloser' _obj_cls = Recloser - _cls_idx = 32 + _cls_idx = 33 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -629,7 +658,7 @@ def _set_MonitoredObj_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the Recloser's PT and/or CT are connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredObj(self) -> List[DSSObj]: @@ -642,7 +671,7 @@ def _set_MonitoredObj(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSO """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the Recloser's PT and/or CT are connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredTerm(self) -> BatchInt32ArrayProxy: @@ -653,9 +682,10 @@ def _set_MonitoredTerm(self, value: Union[int, Int32Array], flags: enums.SetterF MonitoredTerm = property(_get_MonitoredTerm, _set_MonitoredTerm) # type: BatchInt32ArrayProxy """ - Number of the terminal of the circuit element to which the Recloser is connected. 1 or 2, typically. Default is 1. + Number of the terminal of the circuit element to which the Recloser is connected. 1 or 2, typically. - DSS property name: `MonitoredTerm`, DSS property index: 2. + Name: `MonitoredTerm` + Default: 1 """ def _get_SwitchedObj_str(self) -> List[str]: @@ -666,9 +696,9 @@ def _set_SwitchedObj_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums. SwitchedObj_str = property(_get_SwitchedObj_str, _set_SwitchedObj_str) # type: List[str] """ - Name of circuit element switch that the Recloser controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Recloser controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedObj(self) -> List[DSSObj]: @@ -679,9 +709,9 @@ def _set_SwitchedObj(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSOb SwitchedObj = property(_get_SwitchedObj, _set_SwitchedObj) # type: List[DSSObj] """ - Name of circuit element switch that the Recloser controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Recloser controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedTerm(self) -> BatchInt32ArrayProxy: @@ -694,7 +724,8 @@ def _set_SwitchedTerm(self, value: Union[int, Int32Array], flags: enums.SetterFl """ Number of the terminal of the controlled element in which the switch is controlled by the Recloser. 1 or 2, typically. Default is 1. - DSS property name: `SwitchedTerm`, DSS property index: 4. + Name: `SwitchedTerm` + Default: 1 """ def _get_NumFast(self) -> BatchInt32ArrayProxy: @@ -705,9 +736,10 @@ def _set_NumFast(self, value: Union[int, Int32Array], flags: enums.SetterFlags = NumFast = property(_get_NumFast, _set_NumFast) # type: BatchInt32ArrayProxy """ - Number of Fast (fuse saving) operations. Default is 1. (See "Shots") + Number of Fast (fuse saving) operations. (See "Shots") - DSS property name: `NumFast`, DSS property index: 5. + Name: `NumFast` + Default: 1 """ def _get_PhaseFast_str(self) -> List[str]: @@ -720,7 +752,8 @@ def _set_PhaseFast_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Se """ Name of the TCC Curve object that determines the Phase Fast trip. Must have been previously defined as a TCC_Curve object. Default is "A". Multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseFast`, DSS property index: 6. + Name: `PhaseFast` + Default: a """ def _get_PhaseFast(self) -> List[TCC_Curve]: @@ -733,7 +766,8 @@ def _set_PhaseFast(self, value: Union[AnyStr, TCC_Curve, List[AnyStr], List[TCC_ """ Name of the TCC Curve object that determines the Phase Fast trip. Must have been previously defined as a TCC_Curve object. Default is "A". Multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseFast`, DSS property index: 6. + Name: `PhaseFast` + Default: a """ def _get_PhaseDelayed_str(self) -> List[str]: @@ -746,7 +780,8 @@ def _set_PhaseDelayed_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums """ Name of the TCC Curve object that determines the Phase Delayed trip. Must have been previously defined as a TCC_Curve object. Default is "D".Multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseDelayed`, DSS property index: 7. + Name: `PhaseDelayed` + Default: d """ def _get_PhaseDelayed(self) -> List[TCC_Curve]: @@ -759,7 +794,8 @@ def _set_PhaseDelayed(self, value: Union[AnyStr, TCC_Curve, List[AnyStr], List[T """ Name of the TCC Curve object that determines the Phase Delayed trip. Must have been previously defined as a TCC_Curve object. Default is "D".Multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseDelayed`, DSS property index: 7. + Name: `PhaseDelayed` + Default: d """ def _get_GroundFast_str(self) -> List[str]: @@ -772,7 +808,7 @@ def _set_GroundFast_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.S """ Name of the TCC Curve object that determines the Ground Fast trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored). Multiplying the current values in the curve by the "groundtrip" value gives the actual current. - DSS property name: `GroundFast`, DSS property index: 8. + Name: `GroundFast` """ def _get_GroundFast(self) -> List[TCC_Curve]: @@ -785,7 +821,7 @@ def _set_GroundFast(self, value: Union[AnyStr, TCC_Curve, List[AnyStr], List[TCC """ Name of the TCC Curve object that determines the Ground Fast trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored). Multiplying the current values in the curve by the "groundtrip" value gives the actual current. - DSS property name: `GroundFast`, DSS property index: 8. + Name: `GroundFast` """ def _get_GroundDelayed_str(self) -> List[str]: @@ -798,7 +834,7 @@ def _set_GroundDelayed_str(self, value: Union[AnyStr, List[AnyStr]], flags: enum """ Name of the TCC Curve object that determines the Ground Delayed trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored).Multiplying the current values in the curve by the "groundtrip" value gives the actual current. - DSS property name: `GroundDelayed`, DSS property index: 9. + Name: `GroundDelayed` """ def _get_GroundDelayed(self) -> List[TCC_Curve]: @@ -811,7 +847,7 @@ def _set_GroundDelayed(self, value: Union[AnyStr, TCC_Curve, List[AnyStr], List[ """ Name of the TCC Curve object that determines the Ground Delayed trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored).Multiplying the current values in the curve by the "groundtrip" value gives the actual current. - DSS property name: `GroundDelayed`, DSS property index: 9. + Name: `GroundDelayed` """ def _get_PhaseTrip(self) -> BatchFloat64ArrayProxy: @@ -822,9 +858,10 @@ def _set_PhaseTrip(self, value: Union[float, Float64Array], flags: enums.SetterF PhaseTrip = property(_get_PhaseTrip, _set_PhaseTrip) # type: BatchFloat64ArrayProxy """ - Multiplier or actual phase amps for the phase TCC curve. Defaults to 1.0. + Multiplier or actual phase amps for the phase TCC curve. - DSS property name: `PhaseTrip`, DSS property index: 10. + Name: `PhaseTrip` + Default: 1.0 """ def _get_GroundTrip(self) -> BatchFloat64ArrayProxy: @@ -835,9 +872,10 @@ def _set_GroundTrip(self, value: Union[float, Float64Array], flags: enums.Setter GroundTrip = property(_get_GroundTrip, _set_GroundTrip) # type: BatchFloat64ArrayProxy """ - Multiplier or actual ground amps (3I0) for the ground TCC curve. Defaults to 1.0. + Multiplier or actual ground amps (3I0) for the ground TCC curve. - DSS property name: `GroundTrip`, DSS property index: 11. + Name: `GroundTrip` + Default: 1.0 """ def _get_PhaseInst(self) -> BatchFloat64ArrayProxy: @@ -850,7 +888,8 @@ def _set_PhaseInst(self, value: Union[float, Float64Array], flags: enums.SetterF """ Actual amps for instantaneous phase trip which is assumed to happen in 0.01 sec + Delay Time. Default is 0.0, which signifies no inst trip. - DSS property name: `PhaseInst`, DSS property index: 12. + Name: `PhaseInst` + Default: 0.0 """ def _get_GroundInst(self) -> BatchFloat64ArrayProxy: @@ -861,9 +900,10 @@ def _set_GroundInst(self, value: Union[float, Float64Array], flags: enums.Setter GroundInst = property(_get_GroundInst, _set_GroundInst) # type: BatchFloat64ArrayProxy """ - Actual amps for instantaneous ground trip which is assumed to happen in 0.01 sec + Delay Time.Default is 0.0, which signifies no inst trip. + Actual amps for instantaneous ground trip which is assumed to happen in 0.01 sec + Delay Time. Default is 0.0, which signifies no inst trip. - DSS property name: `GroundInst`, DSS property index: 13. + Name: `GroundInst` + Default: 0.0 """ def _get_Reset(self) -> BatchFloat64ArrayProxy: @@ -874,9 +914,11 @@ def _set_Reset(self, value: Union[float, Float64Array], flags: enums.SetterFlags Reset = property(_get_Reset, _set_Reset) # type: BatchFloat64ArrayProxy """ - Reset time in sec for Recloser. Default is 15. + Reset time for Recloser. - DSS property name: `Reset`, DSS property index: 14. + Name: `Reset` + Units: s + Default: 15.0 """ def _get_Shots(self) -> BatchInt32ArrayProxy: @@ -889,7 +931,8 @@ def _set_Shots(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0 """ Total Number of fast and delayed shots to lockout. Default is 4. This is one more than the number of reclose intervals. - DSS property name: `Shots`, DSS property index: 15. + Name: `Shots` + Default: 4 """ def _get_RecloseIntervals(self) -> List[Float64Array]: @@ -905,7 +948,8 @@ def _set_RecloseIntervals(self, value: Union[Float64Array, List[Float64Array]], """ Array of reclose intervals. Default for Recloser is (0.5, 2.0, 2.0) seconds. A locked out Recloser must be closed manually (action=close). - DSS property name: `RecloseIntervals`, DSS property index: 16. + Name: `RecloseIntervals` + Default: [0.5, 2.0, 2.0] """ def _get_Delay(self) -> BatchFloat64ArrayProxy: @@ -916,9 +960,11 @@ def _set_Delay(self, value: Union[float, Float64Array], flags: enums.SetterFlags Delay = property(_get_Delay, _set_Delay) # type: BatchFloat64ArrayProxy """ - Fixed delay time (sec) added to Recloser trip time. Default is 0.0. Used to represent breaker time or any other delay. + Fixed delay time added to Recloser trip time. Used to represent breaker time or any other delay. - DSS property name: `Delay`, DSS property index: 17. + Name: `Delay` + Units: s + Default: 0.0 """ def _get_TDPhFast(self) -> BatchFloat64ArrayProxy: @@ -929,9 +975,10 @@ def _set_TDPhFast(self, value: Union[float, Float64Array], flags: enums.SetterFl TDPhFast = property(_get_TDPhFast, _set_TDPhFast) # type: BatchFloat64ArrayProxy """ - Time dial for Phase Fast trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Phase Fast trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDPhFast`, DSS property index: 19. + Name: `TDPhFast` + Default: 1.0 """ def _get_TDGrFast(self) -> BatchFloat64ArrayProxy: @@ -942,9 +989,10 @@ def _set_TDGrFast(self, value: Union[float, Float64Array], flags: enums.SetterFl TDGrFast = property(_get_TDGrFast, _set_TDGrFast) # type: BatchFloat64ArrayProxy """ - Time dial for Ground Fast trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Ground Fast trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDGrFast`, DSS property index: 20. + Name: `TDGrFast` + Default: 1.0 """ def _get_TDPhDelayed(self) -> BatchFloat64ArrayProxy: @@ -955,9 +1003,10 @@ def _set_TDPhDelayed(self, value: Union[float, Float64Array], flags: enums.Sette TDPhDelayed = property(_get_TDPhDelayed, _set_TDPhDelayed) # type: BatchFloat64ArrayProxy """ - Time dial for Phase Delayed trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Phase Delayed trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDPhDelayed`, DSS property index: 21. + Name: `TDPhDelayed` + Default: 1.0 """ def _get_TDGrDelayed(self) -> BatchFloat64ArrayProxy: @@ -968,9 +1017,10 @@ def _set_TDGrDelayed(self, value: Union[float, Float64Array], flags: enums.Sette TDGrDelayed = property(_get_TDGrDelayed, _set_TDGrDelayed) # type: BatchFloat64ArrayProxy """ - Time dial for Ground Delayed trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Ground Delayed trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDGrDelayed`, DSS property index: 22. + Name: `TDGrDelayed` + Default: 1.0 """ def _get_Normal(self) -> BatchInt32ArrayProxy: @@ -985,9 +1035,10 @@ def _set_Normal(self, value: Union[AnyStr, int, enums.RecloserState, List[AnyStr Normal = property(_get_Normal, _set_Normal) # type: BatchInt32ArrayProxy """ - {Open | Closed} Normal state of the recloser. The recloser reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. + Normal state of the recloser. The recloser reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. - DSS property name: `Normal`, DSS property index: 23. + Name: `Normal` + Default: Closed """ def _get_Normal_str(self) -> List[str]: @@ -998,9 +1049,10 @@ def _set_Normal_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Normal_str = property(_get_Normal_str, _set_Normal_str) # type: List[str] """ - {Open | Closed} Normal state of the recloser. The recloser reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. + Normal state of the recloser. The recloser reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. - DSS property name: `Normal`, DSS property index: 23. + Name: `Normal` + Default: Closed """ def _get_State(self) -> BatchInt32ArrayProxy: @@ -1015,9 +1067,10 @@ def _set_State(self, value: Union[AnyStr, int, enums.RecloserState, List[AnyStr] State = property(_get_State, _set_State) # type: BatchInt32ArrayProxy """ - {Open | Closed} Actual state of the recloser. Upon setting, immediately forces state of the recloser, overriding the Recloser control. Simulates manual control on recloser. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the recloser to reset to its first operation. + Actual state of the recloser. Upon setting, immediately forces state of the recloser, overriding the Recloser control. Simulates manual control on recloser. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the recloser to reset to its first operation. - DSS property name: `State`, DSS property index: 24. + Name: `State` + Default: Closed """ def _get_State_str(self) -> List[str]: @@ -1028,9 +1081,10 @@ def _set_State_str(self, value: AnyStr, flags: enums.SetterFlags = 0): State_str = property(_get_State_str, _set_State_str) # type: List[str] """ - {Open | Closed} Actual state of the recloser. Upon setting, immediately forces state of the recloser, overriding the Recloser control. Simulates manual control on recloser. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the recloser to reset to its first operation. + Actual state of the recloser. Upon setting, immediately forces state of the recloser, overriding the Recloser control. Simulates manual control on recloser. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the recloser to reset to its first operation. - DSS property name: `State`, DSS property index: 24. + Name: `State` + Default: Closed """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -1043,7 +1097,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 25. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -1051,14 +1106,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(26) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(26, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 26. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1067,7 +1123,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 27. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(27, value, flags) diff --git a/altdss/ReduceCkt.py b/altdss/ReduceCkt.py index ab1125f..423bbe4 100644 --- a/altdss/ReduceCkt.py +++ b/altdss/ReduceCkt.py @@ -15,11 +15,11 @@ def Zmag(self) -> float: Original COM help: https://opendss.epri.com/Zmag.html ''' - return self._check_for_error(self._lib.ReduceCkt_Get_Zmag()) + return self._lib.ReduceCkt_Get_Zmag() @Zmag.setter def Zmag(self, Value: float): - self._check_for_error(self._lib.ReduceCkt_Set_Zmag(Value)) + self._lib.ReduceCkt_Set_Zmag(Value) @property def KeepLoad(self) -> bool: @@ -28,11 +28,11 @@ def KeepLoad(self) -> bool: Original COM help: https://opendss.epri.com/KeepLoad.html ''' - return self._check_for_error(self._lib.ReduceCkt_Get_KeepLoad()) != 0 + return self._lib.ReduceCkt_Get_KeepLoad() @KeepLoad.setter def KeepLoad(self, Value: bool): - self._check_for_error(self._lib.ReduceCkt_Set_KeepLoad(bool(Value))) + self._lib.ReduceCkt_Set_KeepLoad(Value) @property def EditString(self) -> str: @@ -41,14 +41,11 @@ def EditString(self) -> str: Original COM help: https://opendss.epri.com/EditString.html ''' - return self._get_string(self._check_for_error(self._lib.ReduceCkt_Get_EditString())) + return self._lib.ReduceCkt_Get_EditString() @EditString.setter def EditString(self, Value: AnyStr): - if type(Value) is not bytes: - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.ReduceCkt_Set_EditString(Value)) + self._lib.ReduceCkt_Set_EditString(Value) @property def StartPDElement(self) -> str: @@ -57,14 +54,11 @@ def StartPDElement(self) -> str: Original COM help: https://opendss.epri.com/StartPDElement.html ''' - return self._get_string(self._check_for_error(self._lib.ReduceCkt_Get_StartPDElement())) + return self._lib.ReduceCkt_Get_StartPDElement() @StartPDElement.setter def StartPDElement(self, Value: AnyStr): - if type(Value) is not bytes: - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.ReduceCkt_Set_StartPDElement(Value)) + self._lib.ReduceCkt_Set_StartPDElement(Value) @property def EnergyMeter(self) -> str: @@ -73,24 +67,18 @@ def EnergyMeter(self) -> str: Original COM help: https://opendss.epri.com/EnergyMeter1.html ''' - return self._get_string(self._check_for_error(self._lib.ReduceCkt_Get_EnergyMeter())) + return self._lib.ReduceCkt_Get_EnergyMeter() @EnergyMeter.setter def EnergyMeter(self, Value: AnyStr): - if type(Value) is not bytes: - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.ReduceCkt_Set_EnergyMeter(Value)) + self._lib.ReduceCkt_Set_EnergyMeter(Value) def SaveCircuit(self, CktName: AnyStr): ''' Save present (reduced) circuit Filename is listed in the Text Result interface ''' - if type(CktName) is not bytes: - CktName = CktName.encode(self._api_util.codec) - - self._check_for_error(self._lib.ReduceCkt_SaveCircuit(CktName)) + self._lib.ReduceCkt_SaveCircuit(CktName) def DoDefault(self): ''' @@ -98,7 +86,7 @@ def DoDefault(self): Original COM help: https://opendss.epri.com/DoDefault.html ''' - self._check_for_error(self._lib.ReduceCkt_DoDefault()) + self._lib.ReduceCkt_DoDefault() def DoShortLines(self): ''' @@ -106,7 +94,7 @@ def DoShortLines(self): Original COM help: https://opendss.epri.com/DoShortLines.html ''' - self._check_for_error(self._lib.ReduceCkt_DoShortLines()) + self._lib.ReduceCkt_DoShortLines() def DoDangling(self): ''' @@ -114,7 +102,7 @@ def DoDangling(self): Original COM help: https://opendss.epri.com/DoDangling.html ''' - self._check_for_error(self._lib.ReduceCkt_DoDangling()) + self._lib.ReduceCkt_DoDangling() def DoLoopBreak(self): ''' @@ -122,19 +110,19 @@ def DoLoopBreak(self): Disables one of the Line objects at the head of a loop to force the circuit to be radial. ''' - self._check_for_error(self._lib.ReduceCkt_DoLoopBreak()) + self._lib.ReduceCkt_DoLoopBreak() def DoParallelLines(self): ''' Merge all parallel lines found in the circuit to facilitate its reduction. ''' - self._check_for_error(self._lib.ReduceCkt_DoParallelLines()) + self._lib.ReduceCkt_DoParallelLines() def DoSwitches(self): ''' Merge Line objects in which the IsSwitch property is true with the down-line Line object. ''' - self._check_for_error(self._lib.ReduceCkt_DoSwitches()) + self._lib.ReduceCkt_DoSwitches() def Do1phLaterals(self): ''' @@ -142,7 +130,7 @@ def Do1phLaterals(self): Loads and other shunt elements are moved to the parent 3-phase bus. ''' - self._check_for_error(self._lib.ReduceCkt_Do1phLaterals()) + self._lib.ReduceCkt_Do1phLaterals() def DoBranchRemove(self): ''' @@ -152,4 +140,4 @@ def DoBranchRemove(self): If KeepLoad=Y (default), a new Load element is defined and kW, kvar are set to present power flow solution for the first element eliminated. The EditString is applied to each new Load element defined. ''' - self._check_for_error(self._lib.ReduceCkt_DoBranchRemove()) + self._lib.ReduceCkt_DoBranchRemove() diff --git a/altdss/RegControl.py b/altdss/RegControl.py index 2f39bc3..b695176 100644 --- a/altdss/RegControl.py +++ b/altdss/RegControl.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -29,7 +29,10 @@ class RegControl(DSSObj, CircuitElementMixin): 26, 28, 32, + 33, 34, + 35, + 38, } _cls_float_idx = { 3, @@ -50,7 +53,8 @@ class RegControl(DSSObj, CircuitElementMixin): 27, 30, 31, - 33, + 36, + 37, } _cls_prop_idx = { 'transformer': 1, @@ -85,9 +89,13 @@ class RegControl(DSSObj, CircuitElementMixin): 'ldc_z': 30, 'rev_z': 31, 'cogen': 32, - 'basefreq': 33, - 'enabled': 34, - 'like': 35, + 'idle': 33, + 'idlereverse': 34, + 'idleforward': 35, + 'fwdthreshold': 36, + 'basefreq': 37, + 'enabled': 38, + 'like': 39, } def __init__(self, api_util, ptr): @@ -123,7 +131,7 @@ def _set_Transformer_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Transformer=Xfmr1 - DSS property name: `Transformer`, DSS property index: 1. + Name: `Transformer` """ def _get_Transformer(self) -> Union[TransformerObj, AutoTrans]: @@ -142,7 +150,7 @@ def _set_Transformer(self, value: Union[AnyStr, TransformerObj, AutoTrans], flag Transformer=Xfmr1 - DSS property name: `Transformer`, DSS property index: 1. + Name: `Transformer` """ def _get_Winding(self) -> int: @@ -155,7 +163,8 @@ def _set_Winding(self, value: int, flags: enums.SetterFlags = 0): """ 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. + Name: `Winding` + Default: 1 """ def _get_VReg(self) -> float: @@ -166,9 +175,11 @@ def _set_VReg(self, value: float, flags: enums.SetterFlags = 0): VReg = property(_get_VReg, _set_VReg) # type: float """ - 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 + Voltage regulator setting for the winding being controlled. Multiplying this value times the ptratio should yield the voltage across the WINDING of the controlled transformer. - DSS property name: `VReg`, DSS property index: 3. + Name: `VReg` + Units: V + Default: 120.0 """ def _get_Band(self) -> float: @@ -179,9 +190,10 @@ def _set_Band(self, value: float, flags: enums.SetterFlags = 0): Band = property(_get_Band, _set_Band) # type: float """ - Bandwidth in VOLTS for the controlled bus (see help for ptratio property). Default is 3.0 + Bandwidth in VOLTS for the controlled bus (see help for ptratio property). - DSS property name: `Band`, DSS property index: 4. + Name: `Band` + Default: 3.0 """ def _get_PTRatio(self) -> float: @@ -192,9 +204,10 @@ def _set_PTRatio(self, value: float, flags: enums.SetterFlags = 0): PTRatio = property(_get_PTRatio, _set_PTRatio) # type: float """ - 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. + Ratio of the PT that converts the controlled winding voltage to the regulator control voltage. 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. + Name: `PTRatio` + Default: 60.0 """ def _get_CTPrim(self) -> float: @@ -205,9 +218,11 @@ def _set_CTPrim(self, value: float, flags: enums.SetterFlags = 0): CTPrim = property(_get_CTPrim, _set_CTPrim) # type: float """ - 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. + Rating 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. + Name: `CTPrim` + Units: A + Default: 300.0 """ def _get_R(self) -> float: @@ -220,7 +235,8 @@ def _set_R(self, value: float, flags: enums.SetterFlags = 0): """ R setting on the line drop compensator in the regulator, expressed in VOLTS. - DSS property name: `R`, DSS property index: 7. + Name: `R` + Default: 0.0 """ def _get_X(self) -> float: @@ -233,7 +249,8 @@ def _set_X(self, value: float, flags: enums.SetterFlags = 0): """ X setting on the line drop compensator in the regulator, expressed in VOLTS. - DSS property name: `X`, DSS property index: 8. + Name: `X` + Default: 0.0 """ def _get_Bus(self) -> str: @@ -246,7 +263,7 @@ def _set_Bus(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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. + Name: `Bus` """ def _get_Delay(self) -> float: @@ -257,9 +274,11 @@ def _set_Delay(self, value: float, flags: enums.SetterFlags = 0): Delay = property(_get_Delay, _set_Delay) # type: float """ - 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. + Time delay 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. You may specify any floating point number to achieve a model of whatever condition is necessary. - DSS property name: `Delay`, DSS property index: 10. + Name: `Delay` + Units: s + Default: 15.0 """ def _get_Reversible(self) -> bool: @@ -270,9 +289,19 @@ def _set_Reversible(self, value: bool, flags: enums.SetterFlags = 0): Reversible = property(_get_Reversible, _set_Reversible) # type: bool """ - {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. + Indicates whether the regulator has a reverse operation mode (associated settings must be defined). + Default is `No`, which means the regulator forward settings apply for both forward and reverse power flow. + Typically applies only to line regulators and not to LTC on a substation transformer. + + Use the `RevNeutral`, `Idle`, `IdleReverse` and `IdleForward` properties to define the desired operating mode: + - Bidirectional: `Reversible=yes`,`Idle=yes/no` (idling in the "no-load region" depends on the controller and is a functionality typically described in its datasheet) + - Locked Forward: `Reversible=yes`, `IdleReverse=yes` + - Reverse Idle: `Reversible=yes`, `Idle=yes`, `IdleReverse=yes` + - Locked Reverse: `Reversible=yes`, `IdleForward=yes` + - Neutral Idle: `Reversible=yes`, `RevNeutral=yes`, `Idle=yes/no` (idling in the "no-load region" depends on the controller and is a functionality typically described in its datasheet) - DSS property name: `Reversible`, DSS property index: 11. + Name: `Reversible` + Default: False """ def _get_RevVReg(self) -> float: @@ -285,7 +314,8 @@ def _set_RevVReg(self, value: float, flags: enums.SetterFlags = 0): """ Voltage setting in volts for operation in the reverse direction. - DSS property name: `RevVReg`, DSS property index: 12. + Name: `RevVReg` + Default: 120.0 """ def _get_RevBand(self) -> float: @@ -298,7 +328,8 @@ def _set_RevBand(self, value: float, flags: enums.SetterFlags = 0): """ Bandwidth for operating in the reverse direction. - DSS property name: `RevBand`, DSS property index: 13. + Name: `RevBand` + Default: 3.0 """ def _get_RevR(self) -> float: @@ -311,7 +342,8 @@ def _set_RevR(self, value: float, flags: enums.SetterFlags = 0): """ R line drop compensator setting for reverse direction. - DSS property name: `RevR`, DSS property index: 14. + Name: `RevR` + Default: 0.0 """ def _get_RevX(self) -> float: @@ -324,7 +356,8 @@ def _set_RevX(self, value: float, flags: enums.SetterFlags = 0): """ X line drop compensator setting for reverse direction. - DSS property name: `RevX`, DSS property index: 15. + Name: `RevX` + Default: 0.0 """ def _get_TapDelay(self) -> float: @@ -335,9 +368,11 @@ def _set_TapDelay(self, value: float, flags: enums.SetterFlags = 0): TapDelay = property(_get_TapDelay, _set_TapDelay) # type: float """ - Delay in sec between tap changes. Default is 2. This is how long it takes between changes after the first change. + Delay between tap changes. This is how long it takes between changes after the first change. - DSS property name: `TapDelay`, DSS property index: 16. + Name: `TapDelay` + Units: s + Default: 2.0 """ def _get_DebugTrace(self) -> bool: @@ -348,9 +383,10 @@ def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: bool """ - {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". + 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. + Name: `DebugTrace` + Default: False """ def _get_MaxTapChange(self) -> int: @@ -361,13 +397,14 @@ def _set_MaxTapChange(self, value: int, flags: enums.SetterFlags = 0): MaxTapChange = property(_get_MaxTapChange, _set_MaxTapChange) # type: int """ - Maximum allowable tap change per control iteration in STATIC control mode. Default is 16. + Maximum allowable tap change per control iteration in STATIC control mode. 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. + Name: `MaxTapChange` + Default: 16 """ def _get_InverseTime(self) -> bool: @@ -378,9 +415,10 @@ def _set_InverseTime(self, value: bool, flags: enums.SetterFlags = 0): InverseTime = property(_get_InverseTime, _set_InverseTime) # type: bool """ - {Yes | No* } Default is no. The time delay is adjusted inversely proportional to the amount the voltage is outside the band down to 10%. + 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. + Name: `InverseTime` + Default: False """ def _get_TapWinding(self) -> int: @@ -393,7 +431,7 @@ def _set_TapWinding(self, value: int, flags: enums.SetterFlags = 0): """ 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. + Name: `TapWinding` """ def _get_VLimit(self) -> float: @@ -404,9 +442,11 @@ def _set_VLimit(self, value: float, flags: enums.SetterFlags = 0): VLimit = property(_get_VLimit, _set_VLimit) # type: float """ - 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. + Voltage Limit for bus to which regulated winding is connected (e.g. first customer). Set to a value greater then zero to activate this function. - DSS property name: `VLimit`, DSS property index: 21. + Name: `VLimit` + Units: V + Default: 0.0 """ def _get_PTPhase(self) -> Union[enums.RegControlPhaseSelection, int]: @@ -424,9 +464,10 @@ def _set_PTPhase(self, value: Union[AnyStr, int, enums.RegControlPhaseSelection] PTPhase = property(_get_PTPhase, _set_PTPhase) # type: enums.RegControlPhaseSelection """ - 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. + For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. Must be less than or equal to the number of phases. Ignored for regulated bus. - DSS property name: `PTPhase`, DSS property index: 22. + Name: `PTPhase` + Default: 1 """ def _get_PTPhase_str(self) -> str: @@ -437,9 +478,10 @@ def _set_PTPhase_str(self, value: AnyStr, flags: enums.SetterFlags = 0): PTPhase_str = property(_get_PTPhase_str, _set_PTPhase_str) # type: str """ - 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. + For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. Must be less than or equal to the number of phases. Ignored for regulated bus. - DSS property name: `PTPhase`, DSS property index: 22. + Name: `PTPhase` + Default: 1 """ def _get_RevThreshold(self) -> float: @@ -450,9 +492,15 @@ def _set_RevThreshold(self, value: float, flags: enums.SetterFlags = 0): RevThreshold = property(_get_RevThreshold, _set_RevThreshold) # type: float """ - kW reverse power threshold for reversing the direction of the regulator. Default is 100.0 kw. + kW reverse power threshold for reversing the direction of the regulator. - DSS property name: `RevThreshold`, DSS property index: 23. + Defines a no-load band between `-RevThreshold` and `+RevThreshold`. + + **Important**: If an uneven band is desired, set `RevThreshold` to the desired lower bound (negative values allowed) and reset the upper bound using `FwdThreshold` right after. + + Name: `RevThreshold` + Units: kW + Default: -100.0 """ def _get_RevDelay(self) -> float: @@ -463,9 +511,11 @@ def _set_RevDelay(self, value: float, flags: enums.SetterFlags = 0): RevDelay = property(_get_RevDelay, _set_RevDelay) # type: float """ - Time Delay in seconds (s) for executing the reversing action once the threshold for reversing has been exceeded. Default is 60 s. + Time Delay for executing the reversing action once the threshold for reversing has been exceeded. - DSS property name: `RevDelay`, DSS property index: 24. + Name: `RevDelay` + Units: s + Default: 60.0 """ def _get_RevNeutral(self) -> bool: @@ -476,9 +526,10 @@ def _set_RevNeutral(self, value: bool, flags: enums.SetterFlags = 0): RevNeutral = property(_get_RevNeutral, _set_RevNeutral) # type: bool """ - {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. + 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. + Name: `RevNeutral` + Default: False """ def _get_EventLog(self) -> bool: @@ -489,9 +540,10 @@ def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): EventLog = property(_get_EventLog, _set_EventLog) # type: bool """ - {Yes/True | No/False*} Default is NO for regulator control. Log control actions to Eventlog. + Log control actions to Eventlog. - DSS property name: `EventLog`, DSS property index: 26. + Name: `EventLog` + Default: False """ def _get_RemotePTRatio(self) -> float: @@ -504,7 +556,7 @@ def _set_RemotePTRatio(self, value: float, flags: enums.SetterFlags = 0): """ 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. + Name: `RemotePTRatio` """ def _get_TapNum(self) -> int: @@ -517,14 +569,16 @@ def _set_TapNum(self, value: int, flags: enums.SetterFlags = 0): """ 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. + Name: `TapNum` + Default: 0 """ def Reset(self, value: bool = True, flags: enums.SetterFlags = 0): """ - {Yes | No} If Yes, forces Reset of this RegControl. + If Yes, forces Reset of this RegControl. - DSS property name: `Reset`, DSS property index: 29. + Name: `Reset` + Default: False """ self._lib.Obj_SetInt32(self._ptr, 29, value, flags) @@ -538,7 +592,8 @@ def _set_LDC_Z(self, value: float, flags: enums.SetterFlags = 0): """ Z value for Beckwith LDC_Z control option. Volts adjustment at rated control current. - DSS property name: `LDC_Z`, DSS property index: 30. + Name: `LDC_Z` + Default: 0.0 """ def _get_Rev_Z(self) -> float: @@ -551,7 +606,8 @@ def _set_Rev_Z(self, value: float, flags: enums.SetterFlags = 0): """ Reverse Z value for Beckwith LDC_Z control option. - DSS property name: `Rev_Z`, DSS property index: 31. + Name: `Rev_Z` + Default: 0.0 """ def _get_Cogen(self) -> bool: @@ -562,35 +618,101 @@ def _set_Cogen(self, value: bool, flags: enums.SetterFlags = 0): Cogen = property(_get_Cogen, _set_Cogen) # type: bool """ - {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. + Cogen feature. When enabled, continues looking forward if power reverses, but switches to reverse-mode LDC, vreg and band values. + Optionally, use the `Idle` property to specify if the regulator should idle in the "no-load region" (functionality typically described in the controller datasheet). + + Name: `Cogen` + Default: False + """ + + def _get_Idle(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 33) != 0 + + def _set_Idle(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 33, value, flags) + + Idle = property(_get_Idle, _set_Idle) # type: bool + """ + Enabling this property only has an effect when reversible or cogen properties are set to `yes`/`true`. For the "no-load region" where active power flow lies between `-revThreshold` and `+revThreshold`, the regulator will lock taps in the position it had before entering that region. Voltage override (`VLimit`) takes priority. - DSS property name: `Cogen`, DSS property index: 32. + Name: `Idle` + Default: False + """ + + def _get_IdleReverse(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 34) != 0 + + def _set_IdleReverse(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 34, value, flags) + + IdleReverse = property(_get_IdleReverse, _set_IdleReverse) # type: bool + """ + Similar to the `Idle` property but applicable only when `Reversible=Yes` (not for cogen mode) AND `RevNeutral=No`. When enabled, the regulator will lock taps in the position it had before entering the reverse flow zone. + Voltage override (Vlimit) takes priority. + + Name: `IdleReverse` + Default: False + """ + + def _get_IdleForward(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 35) != 0 + + def _set_IdleForward(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 35, value, flags) + + IdleForward = property(_get_IdleForward, _set_IdleForward) # type: bool + """ + Similar to the `Idle` property but applicable only when `Reversible=Yes` (not for cogen mode). When enabled, the regulator will lock taps in the position it had before entering the forward flow zone. + Voltage override (`VLimit`) takes priority. + + Name: `IdleForward` + Default: False + """ + + def _get_FwdThreshold(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 36) + + def _set_FwdThreshold(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 36, value, flags) + + FwdThreshold = property(_get_FwdThreshold, _set_FwdThreshold) # type: float + """ + kW forward power threshold to use in tandem with `RevTheshold`. + If `RevThreshold` is defined, the value of `FwdThreshold` is also updated for an even no-load band. + + If you require an uneven no-load zone band, set `FwdThreshold` after setting `RevThreshold`, or in the same DSS command (edit context). + + Name: `FwdThreshold` + Units: kW + Default: 100.0 """ def _get_BaseFreq(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 33) + return self._lib.Obj_GetFloat64(self._ptr, 37) def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 33, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 37, value, flags) BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: float """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 33. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: - return self._lib.Obj_GetInt32(self._ptr, 34) != 0 + return self._lib.Obj_GetInt32(self._ptr, 38) != 0 def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): - self._lib.Obj_SetInt32(self._ptr, 34, value, flags) + self._lib.Obj_SetInt32(self._ptr, 38, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 34. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -599,9 +721,11 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 35. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_string_o(35, value) + self._set_string_o(39, value) class RegControlProperties(TypedDict): @@ -637,6 +761,10 @@ class RegControlProperties(TypedDict): LDC_Z: float Rev_Z: float Cogen: bool + Idle: bool + IdleReverse: bool + IdleForward: bool + FwdThreshold: float BaseFreq: float Enabled: bool Like: AnyStr @@ -684,7 +812,7 @@ def _set_Transformer_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums. Transformer=Xfmr1 - DSS property name: `Transformer`, DSS property index: 1. + Name: `Transformer` """ def _get_Transformer(self) -> List[Union[TransformerObj, AutoTrans]]: @@ -699,7 +827,7 @@ def _set_Transformer(self, value: Union[AnyStr, TransformerObj, AutoTrans, List[ Transformer=Xfmr1 - DSS property name: `Transformer`, DSS property index: 1. + Name: `Transformer` """ def _get_Winding(self) -> BatchInt32ArrayProxy: @@ -712,7 +840,8 @@ def _set_Winding(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ 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. + Name: `Winding` + Default: 1 """ def _get_VReg(self) -> BatchFloat64ArrayProxy: @@ -723,9 +852,11 @@ def _set_VReg(self, value: Union[float, Float64Array], flags: enums.SetterFlags VReg = property(_get_VReg, _set_VReg) # type: BatchFloat64ArrayProxy """ - 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 + Voltage regulator setting for the winding being controlled. Multiplying this value times the ptratio should yield the voltage across the WINDING of the controlled transformer. - DSS property name: `VReg`, DSS property index: 3. + Name: `VReg` + Units: V + Default: 120.0 """ def _get_Band(self) -> BatchFloat64ArrayProxy: @@ -736,9 +867,10 @@ def _set_Band(self, value: Union[float, Float64Array], flags: enums.SetterFlags Band = property(_get_Band, _set_Band) # type: BatchFloat64ArrayProxy """ - Bandwidth in VOLTS for the controlled bus (see help for ptratio property). Default is 3.0 + Bandwidth in VOLTS for the controlled bus (see help for ptratio property). - DSS property name: `Band`, DSS property index: 4. + Name: `Band` + Default: 3.0 """ def _get_PTRatio(self) -> BatchFloat64ArrayProxy: @@ -749,9 +881,10 @@ def _set_PTRatio(self, value: Union[float, Float64Array], flags: enums.SetterFla PTRatio = property(_get_PTRatio, _set_PTRatio) # type: BatchFloat64ArrayProxy """ - 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. + Ratio of the PT that converts the controlled winding voltage to the regulator control voltage. 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. + Name: `PTRatio` + Default: 60.0 """ def _get_CTPrim(self) -> BatchFloat64ArrayProxy: @@ -762,9 +895,11 @@ def _set_CTPrim(self, value: Union[float, Float64Array], flags: enums.SetterFlag CTPrim = property(_get_CTPrim, _set_CTPrim) # type: BatchFloat64ArrayProxy """ - 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. + Rating 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. + Name: `CTPrim` + Units: A + Default: 300.0 """ def _get_R(self) -> BatchFloat64ArrayProxy: @@ -777,7 +912,8 @@ def _set_R(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ R setting on the line drop compensator in the regulator, expressed in VOLTS. - DSS property name: `R`, DSS property index: 7. + Name: `R` + Default: 0.0 """ def _get_X(self) -> BatchFloat64ArrayProxy: @@ -790,7 +926,8 @@ def _set_X(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ X setting on the line drop compensator in the regulator, expressed in VOLTS. - DSS property name: `X`, DSS property index: 8. + Name: `X` + Default: 0.0 """ def _get_Bus(self) -> List[str]: @@ -803,7 +940,7 @@ def _set_Bus(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ 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. + Name: `Bus` """ def _get_Delay(self) -> BatchFloat64ArrayProxy: @@ -814,9 +951,11 @@ def _set_Delay(self, value: Union[float, Float64Array], flags: enums.SetterFlags Delay = property(_get_Delay, _set_Delay) # type: BatchFloat64ArrayProxy """ - 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. + Time delay 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. You may specify any floating point number to achieve a model of whatever condition is necessary. - DSS property name: `Delay`, DSS property index: 10. + Name: `Delay` + Units: s + Default: 15.0 """ def _get_Reversible(self) -> List[bool]: @@ -824,14 +963,24 @@ def _get_Reversible(self) -> List[bool]: self._get_batch_int32_prop(11) ] - def _set_Reversible(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Reversible(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(11, value, flags) Reversible = property(_get_Reversible, _set_Reversible) # type: List[bool] """ - {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. + Indicates whether the regulator has a reverse operation mode (associated settings must be defined). + Default is `No`, which means the regulator forward settings apply for both forward and reverse power flow. + Typically applies only to line regulators and not to LTC on a substation transformer. - DSS property name: `Reversible`, DSS property index: 11. + Use the `RevNeutral`, `Idle`, `IdleReverse` and `IdleForward` properties to define the desired operating mode: + - Bidirectional: `Reversible=yes`,`Idle=yes/no` (idling in the "no-load region" depends on the controller and is a functionality typically described in its datasheet) + - Locked Forward: `Reversible=yes`, `IdleReverse=yes` + - Reverse Idle: `Reversible=yes`, `Idle=yes`, `IdleReverse=yes` + - Locked Reverse: `Reversible=yes`, `IdleForward=yes` + - Neutral Idle: `Reversible=yes`, `RevNeutral=yes`, `Idle=yes/no` (idling in the "no-load region" depends on the controller and is a functionality typically described in its datasheet) + + Name: `Reversible` + Default: False """ def _get_RevVReg(self) -> BatchFloat64ArrayProxy: @@ -844,7 +993,8 @@ def _set_RevVReg(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Voltage setting in volts for operation in the reverse direction. - DSS property name: `RevVReg`, DSS property index: 12. + Name: `RevVReg` + Default: 120.0 """ def _get_RevBand(self) -> BatchFloat64ArrayProxy: @@ -857,7 +1007,8 @@ def _set_RevBand(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Bandwidth for operating in the reverse direction. - DSS property name: `RevBand`, DSS property index: 13. + Name: `RevBand` + Default: 3.0 """ def _get_RevR(self) -> BatchFloat64ArrayProxy: @@ -870,7 +1021,8 @@ def _set_RevR(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ R line drop compensator setting for reverse direction. - DSS property name: `RevR`, DSS property index: 14. + Name: `RevR` + Default: 0.0 """ def _get_RevX(self) -> BatchFloat64ArrayProxy: @@ -883,7 +1035,8 @@ def _set_RevX(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ X line drop compensator setting for reverse direction. - DSS property name: `RevX`, DSS property index: 15. + Name: `RevX` + Default: 0.0 """ def _get_TapDelay(self) -> BatchFloat64ArrayProxy: @@ -894,9 +1047,11 @@ def _set_TapDelay(self, value: Union[float, Float64Array], flags: enums.SetterFl TapDelay = property(_get_TapDelay, _set_TapDelay) # type: BatchFloat64ArrayProxy """ - Delay in sec between tap changes. Default is 2. This is how long it takes between changes after the first change. + Delay between tap changes. This is how long it takes between changes after the first change. - DSS property name: `TapDelay`, DSS property index: 16. + Name: `TapDelay` + Units: s + Default: 2.0 """ def _get_DebugTrace(self) -> List[bool]: @@ -904,14 +1059,15 @@ def _get_DebugTrace(self) -> List[bool]: self._get_batch_int32_prop(17) ] - def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): + def _set_DebugTrace(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(17, value, flags) DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: List[bool] """ - {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". + 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. + Name: `DebugTrace` + Default: False """ def _get_MaxTapChange(self) -> BatchInt32ArrayProxy: @@ -922,13 +1078,14 @@ def _set_MaxTapChange(self, value: Union[int, Int32Array], flags: enums.SetterFl MaxTapChange = property(_get_MaxTapChange, _set_MaxTapChange) # type: BatchInt32ArrayProxy """ - Maximum allowable tap change per control iteration in STATIC control mode. Default is 16. + Maximum allowable tap change per control iteration in STATIC control mode. 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. + Name: `MaxTapChange` + Default: 16 """ def _get_InverseTime(self) -> List[bool]: @@ -936,14 +1093,15 @@ def _get_InverseTime(self) -> List[bool]: self._get_batch_int32_prop(19) ] - def _set_InverseTime(self, value: bool, flags: enums.SetterFlags = 0): + def _set_InverseTime(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(19, value, flags) InverseTime = property(_get_InverseTime, _set_InverseTime) # type: List[bool] """ - {Yes | No* } Default is no. The time delay is adjusted inversely proportional to the amount the voltage is outside the band down to 10%. + 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. + Name: `InverseTime` + Default: False """ def _get_TapWinding(self) -> BatchInt32ArrayProxy: @@ -956,7 +1114,7 @@ def _set_TapWinding(self, value: Union[int, Int32Array], flags: enums.SetterFlag """ 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. + Name: `TapWinding` """ def _get_VLimit(self) -> BatchFloat64ArrayProxy: @@ -967,9 +1125,11 @@ def _set_VLimit(self, value: Union[float, Float64Array], flags: enums.SetterFlag VLimit = property(_get_VLimit, _set_VLimit) # type: BatchFloat64ArrayProxy """ - 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. + Voltage Limit for bus to which regulated winding is connected (e.g. first customer). Set to a value greater then zero to activate this function. - DSS property name: `VLimit`, DSS property index: 21. + Name: `VLimit` + Units: V + Default: 0.0 """ def _get_PTPhase(self) -> BatchInt32ArrayProxy: @@ -984,9 +1144,10 @@ def _set_PTPhase(self, value: Union[AnyStr, int, enums.RegControlPhaseSelection, PTPhase = property(_get_PTPhase, _set_PTPhase) # type: BatchInt32ArrayProxy """ - 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. + For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. Must be less than or equal to the number of phases. Ignored for regulated bus. - DSS property name: `PTPhase`, DSS property index: 22. + Name: `PTPhase` + Default: 1 """ def _get_PTPhase_str(self) -> List[str]: @@ -997,9 +1158,10 @@ def _set_PTPhase_str(self, value: AnyStr, flags: enums.SetterFlags = 0): PTPhase_str = property(_get_PTPhase_str, _set_PTPhase_str) # type: List[str] """ - 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. + For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. Must be less than or equal to the number of phases. Ignored for regulated bus. - DSS property name: `PTPhase`, DSS property index: 22. + Name: `PTPhase` + Default: 1 """ def _get_RevThreshold(self) -> BatchFloat64ArrayProxy: @@ -1010,9 +1172,15 @@ def _set_RevThreshold(self, value: Union[float, Float64Array], flags: enums.Sett RevThreshold = property(_get_RevThreshold, _set_RevThreshold) # type: BatchFloat64ArrayProxy """ - kW reverse power threshold for reversing the direction of the regulator. Default is 100.0 kw. + kW reverse power threshold for reversing the direction of the regulator. + + Defines a no-load band between `-RevThreshold` and `+RevThreshold`. + + **Important**: If an uneven band is desired, set `RevThreshold` to the desired lower bound (negative values allowed) and reset the upper bound using `FwdThreshold` right after. - DSS property name: `RevThreshold`, DSS property index: 23. + Name: `RevThreshold` + Units: kW + Default: -100.0 """ def _get_RevDelay(self) -> BatchFloat64ArrayProxy: @@ -1023,9 +1191,11 @@ def _set_RevDelay(self, value: Union[float, Float64Array], flags: enums.SetterFl RevDelay = property(_get_RevDelay, _set_RevDelay) # type: BatchFloat64ArrayProxy """ - Time Delay in seconds (s) for executing the reversing action once the threshold for reversing has been exceeded. Default is 60 s. + Time Delay for executing the reversing action once the threshold for reversing has been exceeded. - DSS property name: `RevDelay`, DSS property index: 24. + Name: `RevDelay` + Units: s + Default: 60.0 """ def _get_RevNeutral(self) -> List[bool]: @@ -1033,14 +1203,15 @@ def _get_RevNeutral(self) -> List[bool]: self._get_batch_int32_prop(25) ] - def _set_RevNeutral(self, value: bool, flags: enums.SetterFlags = 0): + def _set_RevNeutral(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(25, value, flags) RevNeutral = property(_get_RevNeutral, _set_RevNeutral) # type: List[bool] """ - {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. + 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. + Name: `RevNeutral` + Default: False """ def _get_EventLog(self) -> List[bool]: @@ -1048,14 +1219,15 @@ def _get_EventLog(self) -> List[bool]: self._get_batch_int32_prop(26) ] - def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): + def _set_EventLog(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(26, value, flags) EventLog = property(_get_EventLog, _set_EventLog) # type: List[bool] """ - {Yes/True | No/False*} Default is NO for regulator control. Log control actions to Eventlog. + Log control actions to Eventlog. - DSS property name: `EventLog`, DSS property index: 26. + Name: `EventLog` + Default: False """ def _get_RemotePTRatio(self) -> BatchFloat64ArrayProxy: @@ -1068,7 +1240,7 @@ def _set_RemotePTRatio(self, value: Union[float, Float64Array], flags: enums.Set """ 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. + Name: `RemotePTRatio` """ def _get_TapNum(self) -> BatchInt32ArrayProxy: @@ -1081,14 +1253,16 @@ def _set_TapNum(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ 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. + Name: `TapNum` + Default: 0 """ def Reset(self, value: Union[bool, List[bool]] = True, flags: enums.SetterFlags = 0): """ - {Yes | No} If Yes, forces Reset of this RegControl. + If Yes, forces Reset of this RegControl. - DSS property name: `Reset`, DSS property index: 29. + Name: `Reset` + Default: False """ self._set_batch_int32_array(29, value, flags) @@ -1102,7 +1276,8 @@ def _set_LDC_Z(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Z value for Beckwith LDC_Z control option. Volts adjustment at rated control current. - DSS property name: `LDC_Z`, DSS property index: 30. + Name: `LDC_Z` + Default: 0.0 """ def _get_Rev_Z(self) -> BatchFloat64ArrayProxy: @@ -1115,7 +1290,8 @@ def _set_Rev_Z(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Reverse Z value for Beckwith LDC_Z control option. - DSS property name: `Rev_Z`, DSS property index: 31. + Name: `Rev_Z` + Default: 0.0 """ def _get_Cogen(self) -> List[bool]: @@ -1123,42 +1299,114 @@ def _get_Cogen(self) -> List[bool]: self._get_batch_int32_prop(32) ] - def _set_Cogen(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Cogen(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(32, value, flags) Cogen = property(_get_Cogen, _set_Cogen) # type: List[bool] """ - {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. + Cogen feature. When enabled, continues looking forward if power reverses, but switches to reverse-mode LDC, vreg and band values. + Optionally, use the `Idle` property to specify if the regulator should idle in the "no-load region" (functionality typically described in the controller datasheet). + + Name: `Cogen` + Default: False + """ + + def _get_Idle(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(33) + ] + + def _set_Idle(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(33, value, flags) + + Idle = property(_get_Idle, _set_Idle) # type: List[bool] + """ + Enabling this property only has an effect when reversible or cogen properties are set to `yes`/`true`. For the "no-load region" where active power flow lies between `-revThreshold` and `+revThreshold`, the regulator will lock taps in the position it had before entering that region. Voltage override (`VLimit`) takes priority. + + Name: `Idle` + Default: False + """ + + def _get_IdleReverse(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(34) + ] + + def _set_IdleReverse(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(34, value, flags) + + IdleReverse = property(_get_IdleReverse, _set_IdleReverse) # type: List[bool] + """ + Similar to the `Idle` property but applicable only when `Reversible=Yes` (not for cogen mode) AND `RevNeutral=No`. When enabled, the regulator will lock taps in the position it had before entering the reverse flow zone. + Voltage override (Vlimit) takes priority. + + Name: `IdleReverse` + Default: False + """ + + def _get_IdleForward(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(35) + ] + + def _set_IdleForward(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(35, value, flags) + + IdleForward = property(_get_IdleForward, _set_IdleForward) # type: List[bool] + """ + Similar to the `Idle` property but applicable only when `Reversible=Yes` (not for cogen mode). When enabled, the regulator will lock taps in the position it had before entering the forward flow zone. + Voltage override (`VLimit`) takes priority. + + Name: `IdleForward` + Default: False + """ + + def _get_FwdThreshold(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 36) + + def _set_FwdThreshold(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(36, value, flags) + + FwdThreshold = property(_get_FwdThreshold, _set_FwdThreshold) # type: BatchFloat64ArrayProxy + """ + kW forward power threshold to use in tandem with `RevTheshold`. + If `RevThreshold` is defined, the value of `FwdThreshold` is also updated for an even no-load band. - DSS property name: `Cogen`, DSS property index: 32. + If you require an uneven no-load zone band, set `FwdThreshold` after setting `RevThreshold`, or in the same DSS command (edit context). + + Name: `FwdThreshold` + Units: kW + Default: 100.0 """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 33) + return BatchFloat64ArrayProxy(self, 37) def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(33, value, flags) + self._set_batch_float64_array(37, value, flags) BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: BatchFloat64ArrayProxy """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 33. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: return [v != 0 for v in - self._get_batch_int32_prop(34) + self._get_batch_int32_prop(38) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): - self._set_batch_int32_array(34, value, flags) + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(38, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 34. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1167,9 +1415,11 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 35. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_batch_string(35, value, flags) + self._set_batch_string(39, value, flags) class RegControlBatchProperties(TypedDict): Transformer: Union[AnyStr, TransformerObj, AutoTrans, List[AnyStr], List[Union[TransformerObj, AutoTrans]]] @@ -1204,6 +1454,10 @@ class RegControlBatchProperties(TypedDict): LDC_Z: Union[float, Float64Array] Rev_Z: Union[float, Float64Array] Cogen: bool + Idle: bool + IdleReverse: bool + IdleForward: bool + FwdThreshold: Union[float, Float64Array] BaseFreq: Union[float, Float64Array] Enabled: bool Like: AnyStr diff --git a/altdss/Relay.py b/altdss/Relay.py index 25be609..3372117 100644 --- a/altdss/Relay.py +++ b/altdss/Relay.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -15,7 +15,7 @@ class Relay(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'Relay' - _cls_idx = 31 + _cls_idx = 32 _cls_int_idx = { 2, 4, @@ -158,7 +158,7 @@ def _set_MonitoredObj_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the relay's PT and/or CT are connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredObj(self) -> DSSObj: @@ -175,7 +175,7 @@ def _set_MonitoredObj(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFla """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the relay's PT and/or CT are connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredTerm(self) -> int: @@ -186,9 +186,10 @@ def _set_MonitoredTerm(self, value: int, flags: enums.SetterFlags = 0): MonitoredTerm = property(_get_MonitoredTerm, _set_MonitoredTerm) # type: int """ - Number of the terminal of the circuit element to which the Relay is connected. 1 or 2, typically. Default is 1. + Number of the terminal of the circuit element to which the Relay is connected. 1 or 2, typically. - DSS property name: `MonitoredTerm`, DSS property index: 2. + Name: `MonitoredTerm` + Default: 1 """ def _get_SwitchedObj_str(self) -> str: @@ -199,9 +200,9 @@ def _set_SwitchedObj_str(self, value: AnyStr, flags: enums.SetterFlags = 0): SwitchedObj_str = property(_get_SwitchedObj_str, _set_SwitchedObj_str) # type: str """ - Name of circuit element switch that the Relay controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Relay controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedObj(self) -> DSSObj: @@ -216,9 +217,9 @@ def _set_SwitchedObj(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlag SwitchedObj = property(_get_SwitchedObj, _set_SwitchedObj) # type: DSSObj """ - Name of circuit element switch that the Relay controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Relay controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedTerm(self) -> int: @@ -229,9 +230,10 @@ def _set_SwitchedTerm(self, value: int, flags: enums.SetterFlags = 0): SwitchedTerm = property(_get_SwitchedTerm, _set_SwitchedTerm) # type: int """ - Number of the terminal of the controlled element in which the switch is controlled by the Relay. 1 or 2, typically. Default is 1. + Number of the terminal of the controlled element in which the switch is controlled by the Relay. 1 or 2, typically. - DSS property name: `SwitchedTerm`, DSS property index: 4. + Name: `SwitchedTerm` + Default: 1 """ def _get_Type(self) -> enums.RelayType: @@ -258,7 +260,8 @@ def _set_Type(self, value: Union[AnyStr, int, enums.RelayType], flags: enums.Set Default is overcurrent relay (Current) Specify the curve and pickup settings appropriate for each type. Generic relays monitor PC Element Control variables and trip on out of over/under range in definite time. - DSS property name: `Type`, DSS property index: 5. + Name: `Type` + Default: Current """ def _get_Type_str(self) -> str: @@ -282,7 +285,8 @@ def _set_Type_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Default is overcurrent relay (Current) Specify the curve and pickup settings appropriate for each type. Generic relays monitor PC Element Control variables and trip on out of over/under range in definite time. - DSS property name: `Type`, DSS property index: 5. + Name: `Type` + Default: Current """ def _get_PhaseCurve_str(self) -> str: @@ -295,7 +299,7 @@ def _set_PhaseCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of the TCC Curve object that determines the phase trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored). For overcurrent relay, multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseCurve`, DSS property index: 6. + Name: `PhaseCurve` """ def _get_PhaseCurve(self) -> TCC_Curve: @@ -312,7 +316,7 @@ def _set_PhaseCurve(self, value: Union[AnyStr, TCC_Curve], flags: enums.SetterFl """ Name of the TCC Curve object that determines the phase trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored). For overcurrent relay, multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseCurve`, DSS property index: 6. + Name: `PhaseCurve` """ def _get_GroundCurve_str(self) -> str: @@ -325,7 +329,7 @@ def _set_GroundCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of the TCC Curve object that determines the ground trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored).For overcurrent relay, multiplying the current values in the curve by the "groundtrip" valuw gives the actual current. - DSS property name: `GroundCurve`, DSS property index: 7. + Name: `GroundCurve` """ def _get_GroundCurve(self) -> TCC_Curve: @@ -342,7 +346,7 @@ def _set_GroundCurve(self, value: Union[AnyStr, TCC_Curve], flags: enums.SetterF """ Name of the TCC Curve object that determines the ground trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored).For overcurrent relay, multiplying the current values in the curve by the "groundtrip" valuw gives the actual current. - DSS property name: `GroundCurve`, DSS property index: 7. + Name: `GroundCurve` """ def _get_PhaseTrip(self) -> float: @@ -353,9 +357,10 @@ def _set_PhaseTrip(self, value: float, flags: enums.SetterFlags = 0): PhaseTrip = property(_get_PhaseTrip, _set_PhaseTrip) # type: float """ - Multiplier or actual phase amps for the phase TCC curve. Defaults to 1.0. + Multiplier or actual phase amps for the phase TCC curve. - DSS property name: `PhaseTrip`, DSS property index: 8. + Name: `PhaseTrip` + Default: 1.0 """ def _get_GroundTrip(self) -> float: @@ -366,9 +371,10 @@ def _set_GroundTrip(self, value: float, flags: enums.SetterFlags = 0): GroundTrip = property(_get_GroundTrip, _set_GroundTrip) # type: float """ - Multiplier or actual ground amps (3I0) for the ground TCC curve. Defaults to 1.0. + Multiplier or actual ground amps (3I0) for the ground TCC curve. - DSS property name: `GroundTrip`, DSS property index: 9. + Name: `GroundTrip` + Default: 1.0 """ def _get_TDPhase(self) -> float: @@ -379,9 +385,10 @@ def _set_TDPhase(self, value: float, flags: enums.SetterFlags = 0): TDPhase = property(_get_TDPhase, _set_TDPhase) # type: float """ - Time dial for Phase trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Phase trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDPhase`, DSS property index: 10. + Name: `TDPhase` + Default: 1.0 """ def _get_TDGround(self) -> float: @@ -392,9 +399,10 @@ def _set_TDGround(self, value: float, flags: enums.SetterFlags = 0): TDGround = property(_get_TDGround, _set_TDGround) # type: float """ - Time dial for Ground trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Ground trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDGround`, DSS property index: 11. + Name: `TDGround` + Default: 1.0 """ def _get_PhaseInst(self) -> float: @@ -405,9 +413,10 @@ def _set_PhaseInst(self, value: float, flags: enums.SetterFlags = 0): PhaseInst = property(_get_PhaseInst, _set_PhaseInst) # type: float """ - Actual amps (Current relay) or kW (reverse power relay) for instantaneous phase trip which is assumed to happen in 0.01 sec + Delay Time. Default is 0.0, which signifies no inst trip. Use this value for specifying the Reverse Power threshold (kW) for reverse power relays. + Actual amps (Current relay) or kW (reverse power relay) for instantaneous phase trip which is assumed to happen in 0.01 sec + Delay Time. Default is 0.0, which signifies no inst trip. Use this value for specifying the Reverse Power threshold (kW) for reverse power relays. - DSS property name: `PhaseInst`, DSS property index: 12. + Name: `PhaseInst` + Default: 0.0 """ def _get_GroundInst(self) -> float: @@ -418,9 +427,11 @@ def _set_GroundInst(self, value: float, flags: enums.SetterFlags = 0): GroundInst = property(_get_GroundInst, _set_GroundInst) # type: float """ - Actual amps for instantaneous ground trip which is assumed to happen in 0.01 sec + Delay Time.Default is 0.0, which signifies no inst trip. + Actual amps for instantaneous ground trip which is assumed to happen in 0.01 sec + Delay Time. Default is 0, which signifies no inst trip. - DSS property name: `GroundInst`, DSS property index: 13. + Name: `GroundInst` + Units: A + Default: 0.0 """ def _get_Reset(self) -> float: @@ -431,9 +442,11 @@ def _set_Reset(self, value: float, flags: enums.SetterFlags = 0): Reset = property(_get_Reset, _set_Reset) # type: float """ - Reset time in sec for relay. Default is 15. If this much time passes between the last pickup event, and the relay has not locked out, the operation counter resets. + Reset time for relay. If this much time passes between the last pickup event, and the relay has not locked out, the operation counter resets. - DSS property name: `Reset`, DSS property index: 14. + Name: `Reset` + Units: s + Default: 15.0 """ def _get_Shots(self) -> int: @@ -444,9 +457,10 @@ def _set_Shots(self, value: int, flags: enums.SetterFlags = 0): Shots = property(_get_Shots, _set_Shots) # type: int """ - Number of shots to lockout. Default is 4. This is one more than the number of reclose intervals. + Number of shots to lockout. This is one more than the number of reclose intervals. - DSS property name: `Shots`, DSS property index: 15. + Name: `Shots` + Default: 4 """ def _get_RecloseIntervals(self) -> Float64Array: @@ -459,7 +473,8 @@ def _set_RecloseIntervals(self, value: Float64Array, flags: enums.SetterFlags = """ Array of reclose intervals. If none, specify "NONE". Default for overcurrent relay is (0.5, 2.0, 2.0) seconds. Default for a voltage relay is (5.0). In a voltage relay, this is seconds after restoration of voltage that the reclose occurs. Reverse power relay is one shot to lockout, so this is ignored. A locked out relay must be closed manually (set action=close). - DSS property name: `RecloseIntervals`, DSS property index: 16. + Name: `RecloseIntervals` + Default: [0.5, 2.0, 2.0] """ def _get_Delay(self) -> float: @@ -470,9 +485,9 @@ def _set_Delay(self, value: float, flags: enums.SetterFlags = 0): Delay = property(_get_Delay, _set_Delay) # type: float """ - Trip time delay (sec) for DEFINITE TIME relays. Default is 0.0 for current, voltage and DOC relays. If >0 then this value is used instead of curves. Used by Generic, RevPower, 46 and 47 relays. Defaults to 0.1 s for these relays. + Trip time delay (sec) for DEFINITE TIME relays. Default is 0 for current, voltage and DOC relays. If >0 then this value is used instead of curves. Used by Generic, RevPower, 46 and 47 relays. Defaults to 0.1 s for these relays. - DSS property name: `Delay`, DSS property index: 17. + Name: `Delay` """ def _get_OvervoltCurve_str(self) -> str: @@ -483,9 +498,9 @@ def _set_OvervoltCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): OvervoltCurve_str = property(_get_OvervoltCurve_str, _set_OvervoltCurve_str) # type: str """ - TCC Curve object to use for overvoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). + TCC Curve object to use for overvoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). - DSS property name: `OvervoltCurve`, DSS property index: 18. + Name: `OvervoltCurve` """ def _get_OvervoltCurve(self) -> TCC_Curve: @@ -500,9 +515,9 @@ def _set_OvervoltCurve(self, value: Union[AnyStr, TCC_Curve], flags: enums.Sette OvervoltCurve = property(_get_OvervoltCurve, _set_OvervoltCurve) # type: TCC_Curve """ - TCC Curve object to use for overvoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). + TCC Curve object to use for overvoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). - DSS property name: `OvervoltCurve`, DSS property index: 18. + Name: `OvervoltCurve` """ def _get_UndervoltCurve_str(self) -> str: @@ -513,9 +528,9 @@ def _set_UndervoltCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): UndervoltCurve_str = property(_get_UndervoltCurve_str, _set_UndervoltCurve_str) # type: str """ - TCC Curve object to use for undervoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). + TCC Curve object to use for undervoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). - DSS property name: `UndervoltCurve`, DSS property index: 19. + Name: `UndervoltCurve` """ def _get_UndervoltCurve(self) -> TCC_Curve: @@ -530,9 +545,9 @@ def _set_UndervoltCurve(self, value: Union[AnyStr, TCC_Curve], flags: enums.Sett UndervoltCurve = property(_get_UndervoltCurve, _set_UndervoltCurve) # type: TCC_Curve """ - TCC Curve object to use for undervoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). + TCC Curve object to use for undervoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). - DSS property name: `UndervoltCurve`, DSS property index: 19. + Name: `UndervoltCurve` """ def _get_kVBase(self) -> float: @@ -545,7 +560,8 @@ def _set_kVBase(self, value: float, flags: enums.SetterFlags = 0): """ Voltage base (kV) for the relay. Specify line-line for 3 phase devices); line-neutral for 1-phase devices. Relay assumes the number of phases of the monitored element. Default is 0.0, which results in assuming the voltage values in the "TCC" curve are specified in actual line-to-neutral volts. - DSS property name: `kVBase`, DSS property index: 20. + Name: `kVBase` + Default: 0.0 """ def _get_F47pctPickup(self) -> float: @@ -558,7 +574,8 @@ def _set_F47pctPickup(self, value: float, flags: enums.SetterFlags = 0): """ Percent voltage pickup for 47 relay (Neg seq voltage). Default is 2. Specify also base voltage (kvbase) and delay time value. - DSS property name: `47%Pickup`, DSS property index: 21. + Name: `47%Pickup` + Default: 2.0 """ def _get_F46BaseAmps(self) -> float: @@ -569,9 +586,10 @@ def _set_F46BaseAmps(self, value: float, flags: enums.SetterFlags = 0): F46BaseAmps = property(_get_F46BaseAmps, _set_F46BaseAmps) # type: float """ - Base current, Amps, for 46 relay (neg seq current). Used for establishing pickup and per unit I-squared-t. + Base current, Amps, for 46 relay (neg seq current). Used for establishing pickup and per unit I-squared-t. - DSS property name: `46BaseAmps`, DSS property index: 22. + Name: `46BaseAmps` + Default: 100.0 """ def _get_F46pctPickup(self) -> float: @@ -582,9 +600,10 @@ def _set_F46pctPickup(self, value: float, flags: enums.SetterFlags = 0): F46pctPickup = property(_get_F46pctPickup, _set_F46pctPickup) # type: float """ - Percent pickup current for 46 relay (neg seq current). Default is 20.0. When current exceeds this value * BaseAmps, I-squared-t calc starts. + Percent pickup current for 46 relay (neg seq current). Default is 20. When current exceeds this value × BaseAmps, I-squared-t calc starts. - DSS property name: `46%Pickup`, DSS property index: 23. + Name: `46%Pickup` + Default: 20.0 """ def _get_F46isqt(self) -> float: @@ -597,7 +616,8 @@ def _set_F46isqt(self, value: float, flags: enums.SetterFlags = 0): """ Negative Sequence I-squared-t trip value for 46 relay (neg seq current). Default is 1 (trips in 1 sec for 1 per unit neg seq current). Should be 1 to 99. - DSS property name: `46isqt`, DSS property index: 24. + Name: `46isqt` + Default: 1.0 """ def _get_Variable(self) -> str: @@ -610,7 +630,7 @@ def _set_Variable(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of variable in PC Elements being monitored. Only applies to Generic relay. - DSS property name: `Variable`, DSS property index: 25. + Name: `Variable` """ def _get_Overtrip(self) -> float: @@ -623,7 +643,8 @@ def _set_Overtrip(self, value: float, flags: enums.SetterFlags = 0): """ Trip setting (high value) for Generic relay variable. Relay trips in definite time if value of variable exceeds this value. - DSS property name: `Overtrip`, DSS property index: 26. + Name: `Overtrip` + Default: 1.2 """ def _get_Undertrip(self) -> float: @@ -636,7 +657,8 @@ def _set_Undertrip(self, value: float, flags: enums.SetterFlags = 0): """ Trip setting (low value) for Generic relay variable. Relay trips in definite time if value of variable is less than this value. - DSS property name: `Undertrip`, DSS property index: 27. + Name: `Undertrip` + Default: 0.8 """ def _get_BreakerTime(self) -> float: @@ -647,9 +669,10 @@ def _set_BreakerTime(self, value: float, flags: enums.SetterFlags = 0): BreakerTime = property(_get_BreakerTime, _set_BreakerTime) # type: float """ - Fixed delay time (sec) added to relay time. Default is 0.0. Designed to represent breaker time or some other delay after a trip decision is made.Use Delay property for setting a fixed trip time delay.Added to trip time of current and voltage relays. Could use in combination with inst trip value to obtain a definite time overcurrent relay. + Fixed delay time (sec) added to relay time. Designed to represent breaker time or some other delay after a trip decision is made.Use Delay property for setting a fixed trip time delay.Added to trip time of current and voltage relays. Could use in combination with inst trip value to obtain a definite time overcurrent relay. - DSS property name: `BreakerTime`, DSS property index: 28. + Name: `BreakerTime` + Default: 0.0 """ def _get_Action(self) -> enums.RelayAction: @@ -665,7 +688,7 @@ def _set_Action(self, value: Union[AnyStr, int, enums.RelayAction], flags: enums """ DEPRECATED. See "State" property - DSS property name: `Action`, DSS property index: 29. + Name: `Action` """ def _get_Action_str(self) -> str: @@ -678,7 +701,7 @@ def _set_Action_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ DEPRECATED. See "State" property - DSS property name: `Action`, DSS property index: 29. + Name: `Action` """ def _get_Z1Mag(self) -> float: @@ -689,9 +712,10 @@ def _set_Z1Mag(self, value: float, flags: enums.SetterFlags = 0): Z1Mag = property(_get_Z1Mag, _set_Z1Mag) # type: float """ - Positive sequence reach impedance in primary ohms for Distance and TD21 functions. Default=0.7 + Positive sequence reach impedance in primary ohms for Distance and TD21 functions. - DSS property name: `Z1Mag`, DSS property index: 30. + Name: `Z1Mag` + Default: 0.7 """ def _get_Z1Ang(self) -> float: @@ -702,9 +726,10 @@ def _set_Z1Ang(self, value: float, flags: enums.SetterFlags = 0): Z1Ang = property(_get_Z1Ang, _set_Z1Ang) # type: float """ - Positive sequence reach impedance angle in degrees for Distance and TD21 functions. Default=64.0 + Positive sequence reach impedance angle in degrees for Distance and TD21 functions. - DSS property name: `Z1Ang`, DSS property index: 31. + Name: `Z1Ang` + Default: 64.0 """ def _get_Z0Mag(self) -> float: @@ -715,9 +740,10 @@ def _set_Z0Mag(self, value: float, flags: enums.SetterFlags = 0): Z0Mag = property(_get_Z0Mag, _set_Z0Mag) # type: float """ - Zero sequence reach impedance in primary ohms for Distance and TD21 functions. Default=2.1 + Zero sequence reach impedance in primary ohms for Distance and TD21 functions. - DSS property name: `Z0Mag`, DSS property index: 32. + Name: `Z0Mag` + Default: 2.1 """ def _get_Z0Ang(self) -> float: @@ -728,9 +754,10 @@ def _set_Z0Ang(self, value: float, flags: enums.SetterFlags = 0): Z0Ang = property(_get_Z0Ang, _set_Z0Ang) # type: float """ - Zero sequence reach impedance angle in degrees for Distance and TD21 functions. Default=68.0 + Zero sequence reach impedance angle in degrees for Distance and TD21 functions. - DSS property name: `Z0Ang`, DSS property index: 33. + Name: `Z0Ang` + Default: 68.0 """ def _get_MPhase(self) -> float: @@ -741,9 +768,10 @@ def _set_MPhase(self, value: float, flags: enums.SetterFlags = 0): MPhase = property(_get_MPhase, _set_MPhase) # type: float """ - Phase reach multiplier in per-unit for Distance and TD21 functions. Default=0.7 + Phase reach multiplier in per-unit for Distance and TD21 functions. - DSS property name: `MPhase`, DSS property index: 34. + Name: `MPhase` + Default: 0.7 """ def _get_MGround(self) -> float: @@ -754,9 +782,10 @@ def _set_MGround(self, value: float, flags: enums.SetterFlags = 0): MGround = property(_get_MGround, _set_MGround) # type: float """ - Ground reach multiplier in per-unit for Distance and TD21 functions. Default=0.7 + Ground reach multiplier in per-unit for Distance and TD21 functions. - DSS property name: `MGround`, DSS property index: 35. + Name: `MGround` + Default: 0.7 """ def _get_EventLog(self) -> bool: @@ -767,9 +796,10 @@ def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): EventLog = property(_get_EventLog, _set_EventLog) # type: bool """ - {Yes/True | No/False* } Default is No for Relay. Write trips, reclose and reset events to EventLog. + Write trips, reclose and reset events to EventLog. - DSS property name: `EventLog`, DSS property index: 36. + Name: `EventLog` + Default: False """ def _get_DebugTrace(self) -> bool: @@ -780,9 +810,10 @@ def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: bool """ - {Yes/True* | No/False* } Default is No for Relay. Write extra details to Eventlog. + Write extra details to Eventlog. - DSS property name: `DebugTrace`, DSS property index: 37. + Name: `DebugTrace` + Default: False """ def _get_DistReverse(self) -> bool: @@ -793,9 +824,10 @@ def _set_DistReverse(self, value: bool, flags: enums.SetterFlags = 0): DistReverse = property(_get_DistReverse, _set_DistReverse) # type: bool """ - {Yes/True* | No/False} Default is No; reverse direction for distance and td21 types. + Reverse direction for distance and td21 types. - DSS property name: `DistReverse`, DSS property index: 38. + Name: `DistReverse` + Default: False """ def _get_Normal(self) -> enums.RelayState: @@ -811,7 +843,8 @@ def _set_Normal(self, value: Union[AnyStr, int, enums.RelayState], flags: enums. """ {Open | Closed} Normal state of the relay. The relay reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. - DSS property name: `Normal`, DSS property index: 39. + Name: `Normal` + Default: Closed """ def _get_Normal_str(self) -> str: @@ -824,7 +857,8 @@ def _set_Normal_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ {Open | Closed} Normal state of the relay. The relay reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. - DSS property name: `Normal`, DSS property index: 39. + Name: `Normal` + Default: Closed """ def _get_State(self) -> enums.RelayState: @@ -840,7 +874,8 @@ def _set_State(self, value: Union[AnyStr, int, enums.RelayState], flags: enums.S """ {Open | Closed} Actual state of the relay. Upon setting, immediately forces state of the relay, overriding the Relay control. Simulates manual control on relay. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the relay to reset to its first operation. - DSS property name: `State`, DSS property index: 40. + Name: `State` + Default: Closed """ def _get_State_str(self) -> str: @@ -853,7 +888,8 @@ def _set_State_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ {Open | Closed} Actual state of the relay. Upon setting, immediately forces state of the relay, overriding the Relay control. Simulates manual control on relay. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the relay to reset to its first operation. - DSS property name: `State`, DSS property index: 40. + Name: `State` + Default: Closed """ def _get_DOC_TiltAngleLow(self) -> float: @@ -864,9 +900,10 @@ def _set_DOC_TiltAngleLow(self, value: float, flags: enums.SetterFlags = 0): DOC_TiltAngleLow = property(_get_DOC_TiltAngleLow, _set_DOC_TiltAngleLow) # type: float """ - Tilt angle for low-current trip line. Default is 90. + Tilt angle for low-current trip line. - DSS property name: `DOC_TiltAngleLow`, DSS property index: 41. + Name: `DOC_TiltAngleLow` + Default: 90.0 """ def _get_DOC_TiltAngleHigh(self) -> float: @@ -877,9 +914,10 @@ def _set_DOC_TiltAngleHigh(self, value: float, flags: enums.SetterFlags = 0): DOC_TiltAngleHigh = property(_get_DOC_TiltAngleHigh, _set_DOC_TiltAngleHigh) # type: float """ - Tilt angle for high-current trip line. Default is 90. + Tilt angle for high-current trip line. - DSS property name: `DOC_TiltAngleHigh`, DSS property index: 42. + Name: `DOC_TiltAngleHigh` + Default: 90.0 """ def _get_DOC_TripSettingLow(self) -> float: @@ -890,9 +928,10 @@ def _set_DOC_TripSettingLow(self, value: float, flags: enums.SetterFlags = 0): DOC_TripSettingLow = property(_get_DOC_TripSettingLow, _set_DOC_TripSettingLow) # type: float """ - Resistive trip setting for low-current line. Default is 0. + Resistive trip setting for low-current line. - DSS property name: `DOC_TripSettingLow`, DSS property index: 43. + Name: `DOC_TripSettingLow` + Default: 0.0 """ def _get_DOC_TripSettingHigh(self) -> float: @@ -905,7 +944,8 @@ def _set_DOC_TripSettingHigh(self, value: float, flags: enums.SetterFlags = 0): """ Resistive trip setting for high-current line. Default is -1 (deactivated). To activate, set a positive value. Must be greater than "DOC_TripSettingLow". - DSS property name: `DOC_TripSettingHigh`, DSS property index: 44. + Name: `DOC_TripSettingHigh` + Default: -1.0 """ def _get_DOC_TripSettingMag(self) -> float: @@ -918,7 +958,8 @@ def _set_DOC_TripSettingMag(self, value: float, flags: enums.SetterFlags = 0): """ Trip setting for current magnitude (defines a circle in the relay characteristics). Default is -1 (deactivated). To activate, set a positive value. - DSS property name: `DOC_TripSettingMag`, DSS property index: 45. + Name: `DOC_TripSettingMag` + Default: -1.0 """ def _get_DOC_DelayInner(self) -> float: @@ -931,7 +972,8 @@ def _set_DOC_DelayInner(self, value: float, flags: enums.SetterFlags = 0): """ Trip time delay (sec) for operation in inner region for DOC relay, defined when "DOC_TripSettingMag" or "DOC_TripSettingHigh" are activate. Default is -1.0 (deactivated), meaning that the relay characteristic is insensitive in the inner region (no trip). Set to 0 for instantaneous trip and >0 for a definite time delay. If "DOC_PhaseCurveInner" is specified, time delay from curve is utilized instead. - DSS property name: `DOC_DelayInner`, DSS property index: 46. + Name: `DOC_DelayInner` + Default: -1.0 """ def _get_DOC_PhaseCurveInner_str(self) -> str: @@ -944,7 +986,7 @@ def _set_DOC_PhaseCurveInner_str(self, value: AnyStr, flags: enums.SetterFlags = """ Name of the TCC Curve object that determines the phase trip for operation in inner region for DOC relay. Must have been previously defined as a TCC_Curve object. Default is none (ignored). Multiplying the current values in the curve by the "DOC_PhaseTripInner" value gives the actual current. - DSS property name: `DOC_PhaseCurveInner`, DSS property index: 47. + Name: `DOC_PhaseCurveInner` """ def _get_DOC_PhaseCurveInner(self) -> TCC_Curve: @@ -961,7 +1003,7 @@ def _set_DOC_PhaseCurveInner(self, value: Union[AnyStr, TCC_Curve], flags: enums """ Name of the TCC Curve object that determines the phase trip for operation in inner region for DOC relay. Must have been previously defined as a TCC_Curve object. Default is none (ignored). Multiplying the current values in the curve by the "DOC_PhaseTripInner" value gives the actual current. - DSS property name: `DOC_PhaseCurveInner`, DSS property index: 47. + Name: `DOC_PhaseCurveInner` """ def _get_DOC_PhaseTripInner(self) -> float: @@ -972,9 +1014,10 @@ def _set_DOC_PhaseTripInner(self, value: float, flags: enums.SetterFlags = 0): DOC_PhaseTripInner = property(_get_DOC_PhaseTripInner, _set_DOC_PhaseTripInner) # type: float """ - Multiplier for the "DOC_PhaseCurveInner" TCC curve. Defaults to 1.0. + Multiplier for the "DOC_PhaseCurveInner" TCC curve. - DSS property name: `DOC_PhaseTripInner`, DSS property index: 48. + Name: `DOC_PhaseTripInner` + Default: 1.0 """ def _get_DOC_TDPhaseInner(self) -> float: @@ -985,9 +1028,10 @@ def _set_DOC_TDPhaseInner(self, value: float, flags: enums.SetterFlags = 0): DOC_TDPhaseInner = property(_get_DOC_TDPhaseInner, _set_DOC_TDPhaseInner) # type: float """ - Time dial for "DOC_PhaseCurveInner" TCC curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for "DOC_PhaseCurveInner" TCC curve. Multiplier on time axis of specified curve. - DSS property name: `DOC_TDPhaseInner`, DSS property index: 49. + Name: `DOC_TDPhaseInner` + Default: 1.0 """ def _get_DOC_P1Blocking(self) -> bool: @@ -998,9 +1042,10 @@ def _set_DOC_P1Blocking(self, value: bool, flags: enums.SetterFlags = 0): DOC_P1Blocking = property(_get_DOC_P1Blocking, _set_DOC_P1Blocking) # type: bool """ - {Yes/True* | No/False} Blocking element that impedes relay from tripping if balanced net three-phase active power is in the forward direction (i.e., flowing into the monitored terminal). For a delayed trip, if at any given time the reverse power flow condition stops, the tripping is reset. Default=True. + Blocking element that impedes relay from tripping if balanced net three-phase active power is in the forward direction (i.e., flowing into the monitored terminal). For a delayed trip, if at any given time the reverse power flow condition stops, the tripping is reset. Default=True. - DSS property name: `DOC_P1Blocking`, DSS property index: 50. + Name: `DOC_P1Blocking` + Default: True """ def _get_BaseFreq(self) -> float: @@ -1013,7 +1058,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 51. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -1024,9 +1070,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 52. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -1035,7 +1082,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 53. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(53, value) @@ -1098,7 +1147,7 @@ class RelayProperties(TypedDict): class RelayBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'Relay' _obj_cls = Relay - _cls_idx = 31 + _cls_idx = 32 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -1136,7 +1185,7 @@ def _set_MonitoredObj_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the relay's PT and/or CT are connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredObj(self) -> List[DSSObj]: @@ -1149,7 +1198,7 @@ def _set_MonitoredObj(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSO """ Full object name of the circuit element, typically a line, transformer, load, or generator, to which the relay's PT and/or CT are connected. This is the "monitored" element. There is no default; must be specified. - DSS property name: `MonitoredObj`, DSS property index: 1. + Name: `MonitoredObj` """ def _get_MonitoredTerm(self) -> BatchInt32ArrayProxy: @@ -1160,9 +1209,10 @@ def _set_MonitoredTerm(self, value: Union[int, Int32Array], flags: enums.SetterF MonitoredTerm = property(_get_MonitoredTerm, _set_MonitoredTerm) # type: BatchInt32ArrayProxy """ - Number of the terminal of the circuit element to which the Relay is connected. 1 or 2, typically. Default is 1. + Number of the terminal of the circuit element to which the Relay is connected. 1 or 2, typically. - DSS property name: `MonitoredTerm`, DSS property index: 2. + Name: `MonitoredTerm` + Default: 1 """ def _get_SwitchedObj_str(self) -> List[str]: @@ -1173,9 +1223,9 @@ def _set_SwitchedObj_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums. SwitchedObj_str = property(_get_SwitchedObj_str, _set_SwitchedObj_str) # type: List[str] """ - Name of circuit element switch that the Relay controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Relay controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedObj(self) -> List[DSSObj]: @@ -1186,9 +1236,9 @@ def _set_SwitchedObj(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSOb SwitchedObj = property(_get_SwitchedObj, _set_SwitchedObj) # type: List[DSSObj] """ - Name of circuit element switch that the Relay controls. Specify the full object name.Defaults to the same as the Monitored element. This is the "controlled" element. + Name of circuit element switch that the Relay controls. Specify the full object name. Defaults to the same as the Monitored element. This is the "controlled" element. - DSS property name: `SwitchedObj`, DSS property index: 3. + Name: `SwitchedObj` """ def _get_SwitchedTerm(self) -> BatchInt32ArrayProxy: @@ -1199,9 +1249,10 @@ def _set_SwitchedTerm(self, value: Union[int, Int32Array], flags: enums.SetterFl SwitchedTerm = property(_get_SwitchedTerm, _set_SwitchedTerm) # type: BatchInt32ArrayProxy """ - Number of the terminal of the controlled element in which the switch is controlled by the Relay. 1 or 2, typically. Default is 1. + Number of the terminal of the controlled element in which the switch is controlled by the Relay. 1 or 2, typically. - DSS property name: `SwitchedTerm`, DSS property index: 4. + Name: `SwitchedTerm` + Default: 1 """ def _get_Type(self) -> BatchInt32ArrayProxy: @@ -1229,7 +1280,8 @@ def _set_Type(self, value: Union[AnyStr, int, enums.RelayType, List[AnyStr], Lis Default is overcurrent relay (Current) Specify the curve and pickup settings appropriate for each type. Generic relays monitor PC Element Control variables and trip on out of over/under range in definite time. - DSS property name: `Type`, DSS property index: 5. + Name: `Type` + Default: Current """ def _get_Type_str(self) -> List[str]: @@ -1253,7 +1305,8 @@ def _set_Type_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Default is overcurrent relay (Current) Specify the curve and pickup settings appropriate for each type. Generic relays monitor PC Element Control variables and trip on out of over/under range in definite time. - DSS property name: `Type`, DSS property index: 5. + Name: `Type` + Default: Current """ def _get_PhaseCurve_str(self) -> List[str]: @@ -1266,7 +1319,7 @@ def _set_PhaseCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.S """ Name of the TCC Curve object that determines the phase trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored). For overcurrent relay, multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseCurve`, DSS property index: 6. + Name: `PhaseCurve` """ def _get_PhaseCurve(self) -> List[TCC_Curve]: @@ -1279,7 +1332,7 @@ def _set_PhaseCurve(self, value: Union[AnyStr, TCC_Curve, List[AnyStr], List[TCC """ Name of the TCC Curve object that determines the phase trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored). For overcurrent relay, multiplying the current values in the curve by the "phasetrip" value gives the actual current. - DSS property name: `PhaseCurve`, DSS property index: 6. + Name: `PhaseCurve` """ def _get_GroundCurve_str(self) -> List[str]: @@ -1292,7 +1345,7 @@ def _set_GroundCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums. """ Name of the TCC Curve object that determines the ground trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored).For overcurrent relay, multiplying the current values in the curve by the "groundtrip" valuw gives the actual current. - DSS property name: `GroundCurve`, DSS property index: 7. + Name: `GroundCurve` """ def _get_GroundCurve(self) -> List[TCC_Curve]: @@ -1305,7 +1358,7 @@ def _set_GroundCurve(self, value: Union[AnyStr, TCC_Curve, List[AnyStr], List[TC """ Name of the TCC Curve object that determines the ground trip. Must have been previously defined as a TCC_Curve object. Default is none (ignored).For overcurrent relay, multiplying the current values in the curve by the "groundtrip" valuw gives the actual current. - DSS property name: `GroundCurve`, DSS property index: 7. + Name: `GroundCurve` """ def _get_PhaseTrip(self) -> BatchFloat64ArrayProxy: @@ -1316,9 +1369,10 @@ def _set_PhaseTrip(self, value: Union[float, Float64Array], flags: enums.SetterF PhaseTrip = property(_get_PhaseTrip, _set_PhaseTrip) # type: BatchFloat64ArrayProxy """ - Multiplier or actual phase amps for the phase TCC curve. Defaults to 1.0. + Multiplier or actual phase amps for the phase TCC curve. - DSS property name: `PhaseTrip`, DSS property index: 8. + Name: `PhaseTrip` + Default: 1.0 """ def _get_GroundTrip(self) -> BatchFloat64ArrayProxy: @@ -1329,9 +1383,10 @@ def _set_GroundTrip(self, value: Union[float, Float64Array], flags: enums.Setter GroundTrip = property(_get_GroundTrip, _set_GroundTrip) # type: BatchFloat64ArrayProxy """ - Multiplier or actual ground amps (3I0) for the ground TCC curve. Defaults to 1.0. + Multiplier or actual ground amps (3I0) for the ground TCC curve. - DSS property name: `GroundTrip`, DSS property index: 9. + Name: `GroundTrip` + Default: 1.0 """ def _get_TDPhase(self) -> BatchFloat64ArrayProxy: @@ -1342,9 +1397,10 @@ def _set_TDPhase(self, value: Union[float, Float64Array], flags: enums.SetterFla TDPhase = property(_get_TDPhase, _set_TDPhase) # type: BatchFloat64ArrayProxy """ - Time dial for Phase trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Phase trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDPhase`, DSS property index: 10. + Name: `TDPhase` + Default: 1.0 """ def _get_TDGround(self) -> BatchFloat64ArrayProxy: @@ -1355,9 +1411,10 @@ def _set_TDGround(self, value: Union[float, Float64Array], flags: enums.SetterFl TDGround = property(_get_TDGround, _set_TDGround) # type: BatchFloat64ArrayProxy """ - Time dial for Ground trip curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for Ground trip curve. Multiplier on time axis of specified curve. - DSS property name: `TDGround`, DSS property index: 11. + Name: `TDGround` + Default: 1.0 """ def _get_PhaseInst(self) -> BatchFloat64ArrayProxy: @@ -1368,9 +1425,10 @@ def _set_PhaseInst(self, value: Union[float, Float64Array], flags: enums.SetterF PhaseInst = property(_get_PhaseInst, _set_PhaseInst) # type: BatchFloat64ArrayProxy """ - Actual amps (Current relay) or kW (reverse power relay) for instantaneous phase trip which is assumed to happen in 0.01 sec + Delay Time. Default is 0.0, which signifies no inst trip. Use this value for specifying the Reverse Power threshold (kW) for reverse power relays. + Actual amps (Current relay) or kW (reverse power relay) for instantaneous phase trip which is assumed to happen in 0.01 sec + Delay Time. Default is 0.0, which signifies no inst trip. Use this value for specifying the Reverse Power threshold (kW) for reverse power relays. - DSS property name: `PhaseInst`, DSS property index: 12. + Name: `PhaseInst` + Default: 0.0 """ def _get_GroundInst(self) -> BatchFloat64ArrayProxy: @@ -1381,9 +1439,11 @@ def _set_GroundInst(self, value: Union[float, Float64Array], flags: enums.Setter GroundInst = property(_get_GroundInst, _set_GroundInst) # type: BatchFloat64ArrayProxy """ - Actual amps for instantaneous ground trip which is assumed to happen in 0.01 sec + Delay Time.Default is 0.0, which signifies no inst trip. + Actual amps for instantaneous ground trip which is assumed to happen in 0.01 sec + Delay Time. Default is 0, which signifies no inst trip. - DSS property name: `GroundInst`, DSS property index: 13. + Name: `GroundInst` + Units: A + Default: 0.0 """ def _get_Reset(self) -> BatchFloat64ArrayProxy: @@ -1394,9 +1454,11 @@ def _set_Reset(self, value: Union[float, Float64Array], flags: enums.SetterFlags Reset = property(_get_Reset, _set_Reset) # type: BatchFloat64ArrayProxy """ - Reset time in sec for relay. Default is 15. If this much time passes between the last pickup event, and the relay has not locked out, the operation counter resets. + Reset time for relay. If this much time passes between the last pickup event, and the relay has not locked out, the operation counter resets. - DSS property name: `Reset`, DSS property index: 14. + Name: `Reset` + Units: s + Default: 15.0 """ def _get_Shots(self) -> BatchInt32ArrayProxy: @@ -1407,9 +1469,10 @@ def _set_Shots(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0 Shots = property(_get_Shots, _set_Shots) # type: BatchInt32ArrayProxy """ - Number of shots to lockout. Default is 4. This is one more than the number of reclose intervals. + Number of shots to lockout. This is one more than the number of reclose intervals. - DSS property name: `Shots`, DSS property index: 15. + Name: `Shots` + Default: 4 """ def _get_RecloseIntervals(self) -> List[Float64Array]: @@ -1425,7 +1488,8 @@ def _set_RecloseIntervals(self, value: Union[Float64Array, List[Float64Array]], """ Array of reclose intervals. If none, specify "NONE". Default for overcurrent relay is (0.5, 2.0, 2.0) seconds. Default for a voltage relay is (5.0). In a voltage relay, this is seconds after restoration of voltage that the reclose occurs. Reverse power relay is one shot to lockout, so this is ignored. A locked out relay must be closed manually (set action=close). - DSS property name: `RecloseIntervals`, DSS property index: 16. + Name: `RecloseIntervals` + Default: [0.5, 2.0, 2.0] """ def _get_Delay(self) -> BatchFloat64ArrayProxy: @@ -1436,9 +1500,9 @@ def _set_Delay(self, value: Union[float, Float64Array], flags: enums.SetterFlags Delay = property(_get_Delay, _set_Delay) # type: BatchFloat64ArrayProxy """ - Trip time delay (sec) for DEFINITE TIME relays. Default is 0.0 for current, voltage and DOC relays. If >0 then this value is used instead of curves. Used by Generic, RevPower, 46 and 47 relays. Defaults to 0.1 s for these relays. + Trip time delay (sec) for DEFINITE TIME relays. Default is 0 for current, voltage and DOC relays. If >0 then this value is used instead of curves. Used by Generic, RevPower, 46 and 47 relays. Defaults to 0.1 s for these relays. - DSS property name: `Delay`, DSS property index: 17. + Name: `Delay` """ def _get_OvervoltCurve_str(self) -> List[str]: @@ -1449,9 +1513,9 @@ def _set_OvervoltCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enum OvervoltCurve_str = property(_get_OvervoltCurve_str, _set_OvervoltCurve_str) # type: List[str] """ - TCC Curve object to use for overvoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). + TCC Curve object to use for overvoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). - DSS property name: `OvervoltCurve`, DSS property index: 18. + Name: `OvervoltCurve` """ def _get_OvervoltCurve(self) -> List[TCC_Curve]: @@ -1462,9 +1526,9 @@ def _set_OvervoltCurve(self, value: Union[AnyStr, TCC_Curve, List[AnyStr], List[ OvervoltCurve = property(_get_OvervoltCurve, _set_OvervoltCurve) # type: List[TCC_Curve] """ - TCC Curve object to use for overvoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). + TCC Curve object to use for overvoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). - DSS property name: `OvervoltCurve`, DSS property index: 18. + Name: `OvervoltCurve` """ def _get_UndervoltCurve_str(self) -> List[str]: @@ -1475,9 +1539,9 @@ def _set_UndervoltCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enu UndervoltCurve_str = property(_get_UndervoltCurve_str, _set_UndervoltCurve_str) # type: List[str] """ - TCC Curve object to use for undervoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). + TCC Curve object to use for undervoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). - DSS property name: `UndervoltCurve`, DSS property index: 19. + Name: `UndervoltCurve` """ def _get_UndervoltCurve(self) -> List[TCC_Curve]: @@ -1488,9 +1552,9 @@ def _set_UndervoltCurve(self, value: Union[AnyStr, TCC_Curve, List[AnyStr], List UndervoltCurve = property(_get_UndervoltCurve, _set_UndervoltCurve) # type: List[TCC_Curve] """ - TCC Curve object to use for undervoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). + TCC Curve object to use for undervoltage relay. Curve is assumed to be defined with per unit voltage values. Voltage base should be defined for the relay. Default is none (ignored). - DSS property name: `UndervoltCurve`, DSS property index: 19. + Name: `UndervoltCurve` """ def _get_kVBase(self) -> BatchFloat64ArrayProxy: @@ -1503,7 +1567,8 @@ def _set_kVBase(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Voltage base (kV) for the relay. Specify line-line for 3 phase devices); line-neutral for 1-phase devices. Relay assumes the number of phases of the monitored element. Default is 0.0, which results in assuming the voltage values in the "TCC" curve are specified in actual line-to-neutral volts. - DSS property name: `kVBase`, DSS property index: 20. + Name: `kVBase` + Default: 0.0 """ def _get_F47pctPickup(self) -> BatchFloat64ArrayProxy: @@ -1516,7 +1581,8 @@ def _set_F47pctPickup(self, value: Union[float, Float64Array], flags: enums.Sett """ Percent voltage pickup for 47 relay (Neg seq voltage). Default is 2. Specify also base voltage (kvbase) and delay time value. - DSS property name: `47%Pickup`, DSS property index: 21. + Name: `47%Pickup` + Default: 2.0 """ def _get_F46BaseAmps(self) -> BatchFloat64ArrayProxy: @@ -1527,9 +1593,10 @@ def _set_F46BaseAmps(self, value: Union[float, Float64Array], flags: enums.Sette F46BaseAmps = property(_get_F46BaseAmps, _set_F46BaseAmps) # type: BatchFloat64ArrayProxy """ - Base current, Amps, for 46 relay (neg seq current). Used for establishing pickup and per unit I-squared-t. + Base current, Amps, for 46 relay (neg seq current). Used for establishing pickup and per unit I-squared-t. - DSS property name: `46BaseAmps`, DSS property index: 22. + Name: `46BaseAmps` + Default: 100.0 """ def _get_F46pctPickup(self) -> BatchFloat64ArrayProxy: @@ -1540,9 +1607,10 @@ def _set_F46pctPickup(self, value: Union[float, Float64Array], flags: enums.Sett F46pctPickup = property(_get_F46pctPickup, _set_F46pctPickup) # type: BatchFloat64ArrayProxy """ - Percent pickup current for 46 relay (neg seq current). Default is 20.0. When current exceeds this value * BaseAmps, I-squared-t calc starts. + Percent pickup current for 46 relay (neg seq current). Default is 20. When current exceeds this value × BaseAmps, I-squared-t calc starts. - DSS property name: `46%Pickup`, DSS property index: 23. + Name: `46%Pickup` + Default: 20.0 """ def _get_F46isqt(self) -> BatchFloat64ArrayProxy: @@ -1555,7 +1623,8 @@ def _set_F46isqt(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Negative Sequence I-squared-t trip value for 46 relay (neg seq current). Default is 1 (trips in 1 sec for 1 per unit neg seq current). Should be 1 to 99. - DSS property name: `46isqt`, DSS property index: 24. + Name: `46isqt` + Default: 1.0 """ def _get_Variable(self) -> List[str]: @@ -1568,7 +1637,7 @@ def _set_Variable(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ Name of variable in PC Elements being monitored. Only applies to Generic relay. - DSS property name: `Variable`, DSS property index: 25. + Name: `Variable` """ def _get_Overtrip(self) -> BatchFloat64ArrayProxy: @@ -1581,7 +1650,8 @@ def _set_Overtrip(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Trip setting (high value) for Generic relay variable. Relay trips in definite time if value of variable exceeds this value. - DSS property name: `Overtrip`, DSS property index: 26. + Name: `Overtrip` + Default: 1.2 """ def _get_Undertrip(self) -> BatchFloat64ArrayProxy: @@ -1594,7 +1664,8 @@ def _set_Undertrip(self, value: Union[float, Float64Array], flags: enums.SetterF """ Trip setting (low value) for Generic relay variable. Relay trips in definite time if value of variable is less than this value. - DSS property name: `Undertrip`, DSS property index: 27. + Name: `Undertrip` + Default: 0.8 """ def _get_BreakerTime(self) -> BatchFloat64ArrayProxy: @@ -1605,9 +1676,10 @@ def _set_BreakerTime(self, value: Union[float, Float64Array], flags: enums.Sette BreakerTime = property(_get_BreakerTime, _set_BreakerTime) # type: BatchFloat64ArrayProxy """ - Fixed delay time (sec) added to relay time. Default is 0.0. Designed to represent breaker time or some other delay after a trip decision is made.Use Delay property for setting a fixed trip time delay.Added to trip time of current and voltage relays. Could use in combination with inst trip value to obtain a definite time overcurrent relay. + Fixed delay time (sec) added to relay time. Designed to represent breaker time or some other delay after a trip decision is made.Use Delay property for setting a fixed trip time delay.Added to trip time of current and voltage relays. Could use in combination with inst trip value to obtain a definite time overcurrent relay. - DSS property name: `BreakerTime`, DSS property index: 28. + Name: `BreakerTime` + Default: 0.0 """ def _get_Action(self) -> BatchInt32ArrayProxy: @@ -1624,7 +1696,7 @@ def _set_Action(self, value: Union[AnyStr, int, enums.RelayAction, List[AnyStr], """ DEPRECATED. See "State" property - DSS property name: `Action`, DSS property index: 29. + Name: `Action` """ def _get_Action_str(self) -> List[str]: @@ -1637,7 +1709,7 @@ def _set_Action_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ DEPRECATED. See "State" property - DSS property name: `Action`, DSS property index: 29. + Name: `Action` """ def _get_Z1Mag(self) -> BatchFloat64ArrayProxy: @@ -1648,9 +1720,10 @@ def _set_Z1Mag(self, value: Union[float, Float64Array], flags: enums.SetterFlags Z1Mag = property(_get_Z1Mag, _set_Z1Mag) # type: BatchFloat64ArrayProxy """ - Positive sequence reach impedance in primary ohms for Distance and TD21 functions. Default=0.7 + Positive sequence reach impedance in primary ohms for Distance and TD21 functions. - DSS property name: `Z1Mag`, DSS property index: 30. + Name: `Z1Mag` + Default: 0.7 """ def _get_Z1Ang(self) -> BatchFloat64ArrayProxy: @@ -1661,9 +1734,10 @@ def _set_Z1Ang(self, value: Union[float, Float64Array], flags: enums.SetterFlags Z1Ang = property(_get_Z1Ang, _set_Z1Ang) # type: BatchFloat64ArrayProxy """ - Positive sequence reach impedance angle in degrees for Distance and TD21 functions. Default=64.0 + Positive sequence reach impedance angle in degrees for Distance and TD21 functions. - DSS property name: `Z1Ang`, DSS property index: 31. + Name: `Z1Ang` + Default: 64.0 """ def _get_Z0Mag(self) -> BatchFloat64ArrayProxy: @@ -1674,9 +1748,10 @@ def _set_Z0Mag(self, value: Union[float, Float64Array], flags: enums.SetterFlags Z0Mag = property(_get_Z0Mag, _set_Z0Mag) # type: BatchFloat64ArrayProxy """ - Zero sequence reach impedance in primary ohms for Distance and TD21 functions. Default=2.1 + Zero sequence reach impedance in primary ohms for Distance and TD21 functions. - DSS property name: `Z0Mag`, DSS property index: 32. + Name: `Z0Mag` + Default: 2.1 """ def _get_Z0Ang(self) -> BatchFloat64ArrayProxy: @@ -1687,9 +1762,10 @@ def _set_Z0Ang(self, value: Union[float, Float64Array], flags: enums.SetterFlags Z0Ang = property(_get_Z0Ang, _set_Z0Ang) # type: BatchFloat64ArrayProxy """ - Zero sequence reach impedance angle in degrees for Distance and TD21 functions. Default=68.0 + Zero sequence reach impedance angle in degrees for Distance and TD21 functions. - DSS property name: `Z0Ang`, DSS property index: 33. + Name: `Z0Ang` + Default: 68.0 """ def _get_MPhase(self) -> BatchFloat64ArrayProxy: @@ -1700,9 +1776,10 @@ def _set_MPhase(self, value: Union[float, Float64Array], flags: enums.SetterFlag MPhase = property(_get_MPhase, _set_MPhase) # type: BatchFloat64ArrayProxy """ - Phase reach multiplier in per-unit for Distance and TD21 functions. Default=0.7 + Phase reach multiplier in per-unit for Distance and TD21 functions. - DSS property name: `MPhase`, DSS property index: 34. + Name: `MPhase` + Default: 0.7 """ def _get_MGround(self) -> BatchFloat64ArrayProxy: @@ -1713,9 +1790,10 @@ def _set_MGround(self, value: Union[float, Float64Array], flags: enums.SetterFla MGround = property(_get_MGround, _set_MGround) # type: BatchFloat64ArrayProxy """ - Ground reach multiplier in per-unit for Distance and TD21 functions. Default=0.7 + Ground reach multiplier in per-unit for Distance and TD21 functions. - DSS property name: `MGround`, DSS property index: 35. + Name: `MGround` + Default: 0.7 """ def _get_EventLog(self) -> List[bool]: @@ -1723,14 +1801,15 @@ def _get_EventLog(self) -> List[bool]: self._get_batch_int32_prop(36) ] - def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): + def _set_EventLog(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(36, value, flags) EventLog = property(_get_EventLog, _set_EventLog) # type: List[bool] """ - {Yes/True | No/False* } Default is No for Relay. Write trips, reclose and reset events to EventLog. + Write trips, reclose and reset events to EventLog. - DSS property name: `EventLog`, DSS property index: 36. + Name: `EventLog` + Default: False """ def _get_DebugTrace(self) -> List[bool]: @@ -1738,14 +1817,15 @@ def _get_DebugTrace(self) -> List[bool]: self._get_batch_int32_prop(37) ] - def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): + def _set_DebugTrace(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(37, value, flags) DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: List[bool] """ - {Yes/True* | No/False* } Default is No for Relay. Write extra details to Eventlog. + Write extra details to Eventlog. - DSS property name: `DebugTrace`, DSS property index: 37. + Name: `DebugTrace` + Default: False """ def _get_DistReverse(self) -> List[bool]: @@ -1753,14 +1833,15 @@ def _get_DistReverse(self) -> List[bool]: self._get_batch_int32_prop(38) ] - def _set_DistReverse(self, value: bool, flags: enums.SetterFlags = 0): + def _set_DistReverse(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(38, value, flags) DistReverse = property(_get_DistReverse, _set_DistReverse) # type: List[bool] """ - {Yes/True* | No/False} Default is No; reverse direction for distance and td21 types. + Reverse direction for distance and td21 types. - DSS property name: `DistReverse`, DSS property index: 38. + Name: `DistReverse` + Default: False """ def _get_Normal(self) -> BatchInt32ArrayProxy: @@ -1777,7 +1858,8 @@ def _set_Normal(self, value: Union[AnyStr, int, enums.RelayState, List[AnyStr], """ {Open | Closed} Normal state of the relay. The relay reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. - DSS property name: `Normal`, DSS property index: 39. + Name: `Normal` + Default: Closed """ def _get_Normal_str(self) -> List[str]: @@ -1790,7 +1872,8 @@ def _set_Normal_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ {Open | Closed} Normal state of the relay. The relay reverts to this state for reset, change of mode, etc. Defaults to "State" if not specifically declared. - DSS property name: `Normal`, DSS property index: 39. + Name: `Normal` + Default: Closed """ def _get_State(self) -> BatchInt32ArrayProxy: @@ -1807,7 +1890,8 @@ def _set_State(self, value: Union[AnyStr, int, enums.RelayState, List[AnyStr], L """ {Open | Closed} Actual state of the relay. Upon setting, immediately forces state of the relay, overriding the Relay control. Simulates manual control on relay. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the relay to reset to its first operation. - DSS property name: `State`, DSS property index: 40. + Name: `State` + Default: Closed """ def _get_State_str(self) -> List[str]: @@ -1820,7 +1904,8 @@ def _set_State_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ {Open | Closed} Actual state of the relay. Upon setting, immediately forces state of the relay, overriding the Relay control. Simulates manual control on relay. Defaults to Closed. "Open" causes the controlled element to open and lock out. "Closed" causes the controlled element to close and the relay to reset to its first operation. - DSS property name: `State`, DSS property index: 40. + Name: `State` + Default: Closed """ def _get_DOC_TiltAngleLow(self) -> BatchFloat64ArrayProxy: @@ -1831,9 +1916,10 @@ def _set_DOC_TiltAngleLow(self, value: Union[float, Float64Array], flags: enums. DOC_TiltAngleLow = property(_get_DOC_TiltAngleLow, _set_DOC_TiltAngleLow) # type: BatchFloat64ArrayProxy """ - Tilt angle for low-current trip line. Default is 90. + Tilt angle for low-current trip line. - DSS property name: `DOC_TiltAngleLow`, DSS property index: 41. + Name: `DOC_TiltAngleLow` + Default: 90.0 """ def _get_DOC_TiltAngleHigh(self) -> BatchFloat64ArrayProxy: @@ -1844,9 +1930,10 @@ def _set_DOC_TiltAngleHigh(self, value: Union[float, Float64Array], flags: enums DOC_TiltAngleHigh = property(_get_DOC_TiltAngleHigh, _set_DOC_TiltAngleHigh) # type: BatchFloat64ArrayProxy """ - Tilt angle for high-current trip line. Default is 90. + Tilt angle for high-current trip line. - DSS property name: `DOC_TiltAngleHigh`, DSS property index: 42. + Name: `DOC_TiltAngleHigh` + Default: 90.0 """ def _get_DOC_TripSettingLow(self) -> BatchFloat64ArrayProxy: @@ -1857,9 +1944,10 @@ def _set_DOC_TripSettingLow(self, value: Union[float, Float64Array], flags: enum DOC_TripSettingLow = property(_get_DOC_TripSettingLow, _set_DOC_TripSettingLow) # type: BatchFloat64ArrayProxy """ - Resistive trip setting for low-current line. Default is 0. + Resistive trip setting for low-current line. - DSS property name: `DOC_TripSettingLow`, DSS property index: 43. + Name: `DOC_TripSettingLow` + Default: 0.0 """ def _get_DOC_TripSettingHigh(self) -> BatchFloat64ArrayProxy: @@ -1872,7 +1960,8 @@ def _set_DOC_TripSettingHigh(self, value: Union[float, Float64Array], flags: enu """ Resistive trip setting for high-current line. Default is -1 (deactivated). To activate, set a positive value. Must be greater than "DOC_TripSettingLow". - DSS property name: `DOC_TripSettingHigh`, DSS property index: 44. + Name: `DOC_TripSettingHigh` + Default: -1.0 """ def _get_DOC_TripSettingMag(self) -> BatchFloat64ArrayProxy: @@ -1885,7 +1974,8 @@ def _set_DOC_TripSettingMag(self, value: Union[float, Float64Array], flags: enum """ Trip setting for current magnitude (defines a circle in the relay characteristics). Default is -1 (deactivated). To activate, set a positive value. - DSS property name: `DOC_TripSettingMag`, DSS property index: 45. + Name: `DOC_TripSettingMag` + Default: -1.0 """ def _get_DOC_DelayInner(self) -> BatchFloat64ArrayProxy: @@ -1898,7 +1988,8 @@ def _set_DOC_DelayInner(self, value: Union[float, Float64Array], flags: enums.Se """ Trip time delay (sec) for operation in inner region for DOC relay, defined when "DOC_TripSettingMag" or "DOC_TripSettingHigh" are activate. Default is -1.0 (deactivated), meaning that the relay characteristic is insensitive in the inner region (no trip). Set to 0 for instantaneous trip and >0 for a definite time delay. If "DOC_PhaseCurveInner" is specified, time delay from curve is utilized instead. - DSS property name: `DOC_DelayInner`, DSS property index: 46. + Name: `DOC_DelayInner` + Default: -1.0 """ def _get_DOC_PhaseCurveInner_str(self) -> List[str]: @@ -1911,7 +2002,7 @@ def _set_DOC_PhaseCurveInner_str(self, value: Union[AnyStr, List[AnyStr]], flags """ Name of the TCC Curve object that determines the phase trip for operation in inner region for DOC relay. Must have been previously defined as a TCC_Curve object. Default is none (ignored). Multiplying the current values in the curve by the "DOC_PhaseTripInner" value gives the actual current. - DSS property name: `DOC_PhaseCurveInner`, DSS property index: 47. + Name: `DOC_PhaseCurveInner` """ def _get_DOC_PhaseCurveInner(self) -> List[TCC_Curve]: @@ -1924,7 +2015,7 @@ def _set_DOC_PhaseCurveInner(self, value: Union[AnyStr, TCC_Curve, List[AnyStr], """ Name of the TCC Curve object that determines the phase trip for operation in inner region for DOC relay. Must have been previously defined as a TCC_Curve object. Default is none (ignored). Multiplying the current values in the curve by the "DOC_PhaseTripInner" value gives the actual current. - DSS property name: `DOC_PhaseCurveInner`, DSS property index: 47. + Name: `DOC_PhaseCurveInner` """ def _get_DOC_PhaseTripInner(self) -> BatchFloat64ArrayProxy: @@ -1935,9 +2026,10 @@ def _set_DOC_PhaseTripInner(self, value: Union[float, Float64Array], flags: enum DOC_PhaseTripInner = property(_get_DOC_PhaseTripInner, _set_DOC_PhaseTripInner) # type: BatchFloat64ArrayProxy """ - Multiplier for the "DOC_PhaseCurveInner" TCC curve. Defaults to 1.0. + Multiplier for the "DOC_PhaseCurveInner" TCC curve. - DSS property name: `DOC_PhaseTripInner`, DSS property index: 48. + Name: `DOC_PhaseTripInner` + Default: 1.0 """ def _get_DOC_TDPhaseInner(self) -> BatchFloat64ArrayProxy: @@ -1948,9 +2040,10 @@ def _set_DOC_TDPhaseInner(self, value: Union[float, Float64Array], flags: enums. DOC_TDPhaseInner = property(_get_DOC_TDPhaseInner, _set_DOC_TDPhaseInner) # type: BatchFloat64ArrayProxy """ - Time dial for "DOC_PhaseCurveInner" TCC curve. Multiplier on time axis of specified curve. Default=1.0. + Time dial for "DOC_PhaseCurveInner" TCC curve. Multiplier on time axis of specified curve. - DSS property name: `DOC_TDPhaseInner`, DSS property index: 49. + Name: `DOC_TDPhaseInner` + Default: 1.0 """ def _get_DOC_P1Blocking(self) -> List[bool]: @@ -1958,14 +2051,15 @@ def _get_DOC_P1Blocking(self) -> List[bool]: self._get_batch_int32_prop(50) ] - def _set_DOC_P1Blocking(self, value: bool, flags: enums.SetterFlags = 0): + def _set_DOC_P1Blocking(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(50, value, flags) DOC_P1Blocking = property(_get_DOC_P1Blocking, _set_DOC_P1Blocking) # type: List[bool] """ - {Yes/True* | No/False} Blocking element that impedes relay from tripping if balanced net three-phase active power is in the forward direction (i.e., flowing into the monitored terminal). For a delayed trip, if at any given time the reverse power flow condition stops, the tripping is reset. Default=True. + Blocking element that impedes relay from tripping if balanced net three-phase active power is in the forward direction (i.e., flowing into the monitored terminal). For a delayed trip, if at any given time the reverse power flow condition stops, the tripping is reset. Default=True. - DSS property name: `DOC_P1Blocking`, DSS property index: 50. + Name: `DOC_P1Blocking` + Default: True """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -1978,7 +2072,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 51. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -1986,14 +2081,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(52) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(52, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 52. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -2002,7 +2098,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 53. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(53, value, flags) diff --git a/altdss/Sensor.py b/altdss/Sensor.py index b21a6dc..ffa5d12 100644 --- a/altdss/Sensor.py +++ b/altdss/Sensor.py @@ -14,7 +14,7 @@ class Sensor(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'Sensor' - _cls_idx = 49 + _cls_idx = 50 _cls_int_idx = { 2, 9, @@ -77,7 +77,7 @@ def _set_Element_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name (Full Object name) of element to which the Sensor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Element(self) -> DSSObj: @@ -94,7 +94,7 @@ def _set_Element(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlags = """ Name (Full Object name) of element to which the Sensor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Terminal(self) -> int: @@ -105,9 +105,10 @@ def _set_Terminal(self, value: int, flags: enums.SetterFlags = 0): Terminal = property(_get_Terminal, _set_Terminal) # type: int """ - Number of the terminal of the circuit element to which the Sensor is connected. 1 or 2, typically. Default is 1. + Number of the terminal of the circuit element to which the Sensor is connected. 1 or 2, typically. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_kVBase(self) -> float: @@ -119,16 +120,19 @@ def _set_kVBase(self, value: float, flags: enums.SetterFlags = 0): kVBase = property(_get_kVBase, _set_kVBase) # type: float """ Voltage base for the sensor, in kV. If connected to a 2- or 3-phase terminal, - specify L-L voltage. For 1-phase devices specify L-N or actual 1-phase voltage. Like many other DSS devices, default is 12.47kV. + specify L-L voltage. For 1-phase devices specify L-N or actual 1-phase voltage. - DSS property name: `kVBase`, DSS property index: 3. + Name: `kVBase` + Units: kV + Default: 12.47 """ def Clear(self, value: bool = True, flags: enums.SetterFlags = 0): """ - { Yes | No }. Clear=Yes clears sensor values. Should be issued before putting in a new set of measurements. + Clear=Yes clears sensor values. Should be issued before putting in a new set of measurements. - DSS property name: `Clear`, DSS property index: 4. + Name: `Clear` + Default: False """ self._lib.Obj_SetInt32(self._ptr, 4, value, flags) @@ -142,7 +146,7 @@ def _set_kVs(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Array of Voltages (kV) measured by the voltage sensor. For Delta-connected sensors, Line-Line voltages are expected. For Wye, Line-Neutral are expected. - DSS property name: `kVs`, DSS property index: 5. + Name: `kVs` """ def _get_Currents(self) -> Float64Array: @@ -155,7 +159,7 @@ def _set_Currents(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Array of Currents (amps) measured by the current sensor. Specify this or power quantities; not both. - DSS property name: `Currents`, DSS property index: 6. + Name: `Currents` """ def _get_kWs(self) -> Float64Array: @@ -169,7 +173,7 @@ def _set_kWs(self, value: Float64Array, flags: enums.SetterFlags = 0): Array of Active power (kW) measurements at the sensor. Is converted into Currents along with q=[...] Will override any currents=[...] specification. - DSS property name: `kWs`, DSS property index: 7. + Name: `kWs` """ def _get_kvars(self) -> Float64Array: @@ -182,7 +186,7 @@ def _set_kvars(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Array of Reactive power (kvar) measurements at the sensor. Is converted into Currents along with p=[...] - DSS property name: `kvars`, DSS property index: 8. + Name: `kvars` """ def _get_Conn(self) -> enums.Connection: @@ -196,11 +200,12 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection], flags: enums.Se Conn = property(_get_Conn, _set_Conn) # type: enums.Connection """ - Voltage sensor Connection: { wye | delta | LN | LL }. Default is wye. Applies to voltage measurement only. + Voltage sensor connection. Applies to voltage measurement only. Currents are always assumed to be line currents. If wye or LN, voltage is assumed measured line-neutral; otherwise, line-line. - DSS property name: `Conn`, DSS property index: 9. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> str: @@ -211,11 +216,12 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Conn_str = property(_get_Conn_str, _set_Conn_str) # type: str """ - Voltage sensor Connection: { wye | delta | LN | LL }. Default is wye. Applies to voltage measurement only. + Voltage sensor connection. Applies to voltage measurement only. Currents are always assumed to be line currents. If wye or LN, voltage is assumed measured line-neutral; otherwise, line-line. - DSS property name: `Conn`, DSS property index: 9. + Name: `Conn` + Default: Wye """ def _get_DeltaDirection(self) -> int: @@ -226,9 +232,10 @@ def _set_DeltaDirection(self, value: int, flags: enums.SetterFlags = 0): DeltaDirection = property(_get_DeltaDirection, _set_DeltaDirection) # type: int """ - {1 or -1} Default is 1: 1-2, 2-3, 3-1. For reverse rotation, enter -1. Any positive or negative entry will suffice. + Default is 1: 1-2, 2-3, 3-1. For reverse rotation, enter -1. - DSS property name: `DeltaDirection`, DSS property index: 10. + Name: `DeltaDirection` + Default: 1 """ def _get_pctError(self) -> float: @@ -239,9 +246,10 @@ def _set_pctError(self, value: float, flags: enums.SetterFlags = 0): pctError = property(_get_pctError, _set_pctError) # type: float """ - Assumed percent error in the measurement. Default is 1. + Assumed percent error in the measurement. - DSS property name: `%Error`, DSS property index: 11. + Name: `%Error` + Default: 1.0 """ def _get_Weight(self) -> float: @@ -252,9 +260,10 @@ def _set_Weight(self, value: float, flags: enums.SetterFlags = 0): Weight = property(_get_Weight, _set_Weight) # type: float """ - Weighting factor: Default is 1. + Weighting factor. - DSS property name: `Weight`, DSS property index: 12. + Name: `Weight` + Default: 1.0 """ def _get_BaseFreq(self) -> float: @@ -267,7 +276,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 13. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -278,9 +288,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 14. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -289,7 +300,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 15. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(15, value) @@ -314,7 +327,7 @@ class SensorProperties(TypedDict): class SensorBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'Sensor' _obj_cls = Sensor - _cls_idx = 49 + _cls_idx = 50 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -352,7 +365,7 @@ def _set_Element_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett """ Name (Full Object name) of element to which the Sensor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Element(self) -> List[DSSObj]: @@ -365,7 +378,7 @@ def _set_Element(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSObj]], """ Name (Full Object name) of element to which the Sensor is connected. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Terminal(self) -> BatchInt32ArrayProxy: @@ -376,9 +389,10 @@ def _set_Terminal(self, value: Union[int, Int32Array], flags: enums.SetterFlags Terminal = property(_get_Terminal, _set_Terminal) # type: BatchInt32ArrayProxy """ - Number of the terminal of the circuit element to which the Sensor is connected. 1 or 2, typically. Default is 1. + Number of the terminal of the circuit element to which the Sensor is connected. 1 or 2, typically. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_kVBase(self) -> BatchFloat64ArrayProxy: @@ -390,16 +404,19 @@ def _set_kVBase(self, value: Union[float, Float64Array], flags: enums.SetterFlag kVBase = property(_get_kVBase, _set_kVBase) # type: BatchFloat64ArrayProxy """ Voltage base for the sensor, in kV. If connected to a 2- or 3-phase terminal, - specify L-L voltage. For 1-phase devices specify L-N or actual 1-phase voltage. Like many other DSS devices, default is 12.47kV. + specify L-L voltage. For 1-phase devices specify L-N or actual 1-phase voltage. - DSS property name: `kVBase`, DSS property index: 3. + Name: `kVBase` + Units: kV + Default: 12.47 """ def Clear(self, value: Union[bool, List[bool]] = True, flags: enums.SetterFlags = 0): """ - { Yes | No }. Clear=Yes clears sensor values. Should be issued before putting in a new set of measurements. + Clear=Yes clears sensor values. Should be issued before putting in a new set of measurements. - DSS property name: `Clear`, DSS property index: 4. + Name: `Clear` + Default: False """ self._set_batch_int32_array(4, value, flags) @@ -416,7 +433,7 @@ def _set_kVs(self, value: Union[Float64Array, List[Float64Array]], flags: enums. """ Array of Voltages (kV) measured by the voltage sensor. For Delta-connected sensors, Line-Line voltages are expected. For Wye, Line-Neutral are expected. - DSS property name: `kVs`, DSS property index: 5. + Name: `kVs` """ def _get_Currents(self) -> List[Float64Array]: @@ -432,7 +449,7 @@ def _set_Currents(self, value: Union[Float64Array, List[Float64Array]], flags: e """ Array of Currents (amps) measured by the current sensor. Specify this or power quantities; not both. - DSS property name: `Currents`, DSS property index: 6. + Name: `Currents` """ def _get_kWs(self) -> List[Float64Array]: @@ -449,7 +466,7 @@ def _set_kWs(self, value: Union[Float64Array, List[Float64Array]], flags: enums. Array of Active power (kW) measurements at the sensor. Is converted into Currents along with q=[...] Will override any currents=[...] specification. - DSS property name: `kWs`, DSS property index: 7. + Name: `kWs` """ def _get_kvars(self) -> List[Float64Array]: @@ -465,7 +482,7 @@ def _set_kvars(self, value: Union[Float64Array, List[Float64Array]], flags: enum """ Array of Reactive power (kvar) measurements at the sensor. Is converted into Currents along with p=[...] - DSS property name: `kvars`, DSS property index: 8. + Name: `kvars` """ def _get_Conn(self) -> BatchInt32ArrayProxy: @@ -480,11 +497,12 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection, List[AnyStr], Li Conn = property(_get_Conn, _set_Conn) # type: BatchInt32ArrayProxy """ - Voltage sensor Connection: { wye | delta | LN | LL }. Default is wye. Applies to voltage measurement only. + Voltage sensor connection. Applies to voltage measurement only. Currents are always assumed to be line currents. If wye or LN, voltage is assumed measured line-neutral; otherwise, line-line. - DSS property name: `Conn`, DSS property index: 9. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> List[str]: @@ -495,11 +513,12 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Conn_str = property(_get_Conn_str, _set_Conn_str) # type: List[str] """ - Voltage sensor Connection: { wye | delta | LN | LL }. Default is wye. Applies to voltage measurement only. + Voltage sensor connection. Applies to voltage measurement only. Currents are always assumed to be line currents. If wye or LN, voltage is assumed measured line-neutral; otherwise, line-line. - DSS property name: `Conn`, DSS property index: 9. + Name: `Conn` + Default: Wye """ def _get_DeltaDirection(self) -> BatchInt32ArrayProxy: @@ -510,9 +529,10 @@ def _set_DeltaDirection(self, value: Union[int, Int32Array], flags: enums.Setter DeltaDirection = property(_get_DeltaDirection, _set_DeltaDirection) # type: BatchInt32ArrayProxy """ - {1 or -1} Default is 1: 1-2, 2-3, 3-1. For reverse rotation, enter -1. Any positive or negative entry will suffice. + Default is 1: 1-2, 2-3, 3-1. For reverse rotation, enter -1. - DSS property name: `DeltaDirection`, DSS property index: 10. + Name: `DeltaDirection` + Default: 1 """ def _get_pctError(self) -> BatchFloat64ArrayProxy: @@ -523,9 +543,10 @@ def _set_pctError(self, value: Union[float, Float64Array], flags: enums.SetterFl pctError = property(_get_pctError, _set_pctError) # type: BatchFloat64ArrayProxy """ - Assumed percent error in the measurement. Default is 1. + Assumed percent error in the measurement. - DSS property name: `%Error`, DSS property index: 11. + Name: `%Error` + Default: 1.0 """ def _get_Weight(self) -> BatchFloat64ArrayProxy: @@ -536,9 +557,10 @@ def _set_Weight(self, value: Union[float, Float64Array], flags: enums.SetterFlag Weight = property(_get_Weight, _set_Weight) # type: BatchFloat64ArrayProxy """ - Weighting factor: Default is 1. + Weighting factor. - DSS property name: `Weight`, DSS property index: 12. + Name: `Weight` + Default: 1.0 """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -551,7 +573,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 13. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -559,14 +582,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(14) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(14, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 14. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -575,7 +599,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 15. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(15, value, flags) @@ -596,8 +622,6 @@ class SensorBatchProperties(TypedDict): Enabled: bool Like: AnyStr -#TODO: warn that begin_edit=False with extra params will be ignored? - class ISensor(IDSSObj, SensorBatch): __slots__ = IDSSObj._extra_slots diff --git a/altdss/Settings.py b/altdss/Settings.py index 073aa1b..8e85f90 100644 --- a/altdss/Settings.py +++ b/altdss/Settings.py @@ -1,204 +1,314 @@ # Copyright (c) 2016-2024 Paulo Meira # Copyright (c) 2018-2024 DSS-Extensions contributors -from .common import Base +from .common import Base, InvalidatedObjectIterator from .types import Float64Array, Int32Array -from typing import AnyStr -from dss.enums import DSSPropertyNameStyle +from typing import AnyStr, Union, List +from dss.enums import DSSPropertyNameStyle, CktModels +from .DSSObj import DSSObj + +class MapToIterators: + def __init__(self, settings): + self._api_util = settings._api_util + self._previous_state = None + self._tmp_it_objs = [None] * (self._api_util.lib.DSS_Get_NumClasses() + 1) + + def __enter__(self): + self._previous_state = self._api_util._map_objs + self._api_util._map_objs = self + + def _map_obj(self, obj_cls: int, ptr) -> DSSObj: + idx = obj_cls._cls_idx + it_obj = self._tmp_it_objs[idx] + if it_obj is None: + it_obj = obj_cls(self._api_util, InvalidatedObjectIterator) + it_obj._is_iterator = True + self._tmp_it_objs[idx] = it_obj + + it_obj._ptr = ptr + return it_obj + + def __exit__(self, exc_type, exc_val, exc_tb): + self._api_util._map_objs = self._previous_state + # Invalidate our temporary iterators + for it_obj in self._tmp_it_objs: + if it_obj is None: + continue + + it_obj._ptr = InvalidatedObjectIterator + class ISettings(Base): - __slots__ = [] + __slots__ = [ + '_command_dict' + ] _columns = [ - 'Trapezoidal', - 'LossRegs', - 'VoltageBases', - 'ZoneLock', - 'EmergVminpu', - 'PriceSignal', - 'CktModel', - 'UEregs', - 'UEweight', - 'PriceCurve', - 'NormVminpu', - 'LossWeight', - 'EmergVmaxpu', - 'AutoBusList', - 'NormVmaxpu', + 'AdvancedTypes', + 'AllowChangeDir', + 'AllowDOScmd', 'AllowDuplicates', + 'AllowEditor', + 'AllowForms', + 'AutoBusList', + 'CircuitModel', + 'COMErrorResults', + 'CompatFlags', 'ControlTrace', - 'LoadsTerminalCheck', + 'DataPath', + 'DefaultEditor', + 'EmergVMaxpu', + 'EmergVMinpu', 'IterateDisabled', + 'LoadsTerminalCheck', + 'LossRegisters', + 'LossWeight', + 'NormalVMaxpu', + 'NormalVMinpu', + 'PriceCurve', + 'PriceSignal', + 'SkipCommands', + 'SkipFileRegExp', + 'Trapezoidal', + 'UERegisters', + 'UEWeight', + 'VoltageBases', + 'ZoneLock', ] + def __init__(self, api_util): + Base.__init__(self, api_util) + num_commands = self._lib.DSS_Executive_Get_NumCommands() + self._command_dict = { + self._lib.DSS_Executive_Get_Command(i).lower(): i + for i in range(1, num_commands + 1) + } + @property def AllowDuplicates(self) -> bool: ''' Designates whether to allow duplicate names of objects + + False by default. **NOTE**: for DSS-Extensions, we are considering removing this option in a future release since it has performance impacts even when not used. ''' - return self._check_for_error(self._lib.Settings_Get_AllowDuplicates()) != 0 + return self._lib.Settings_Get_AllowDuplicates() @AllowDuplicates.setter def AllowDuplicates(self, Value: bool): - self._check_for_error(self._lib.Settings_Set_AllowDuplicates(Value)) + self._lib.Settings_Set_AllowDuplicates(Value) @property def AutoBusList(self) -> str: - '''List of Buses or (File=xxxx) syntax for the AutoAdd solution mode.''' - return self._get_string(self._check_for_error(self._lib.Settings_Get_AutoBusList())) + ''' + List of Buses or (File=xxxx) syntax for the AutoAdd solution mode. + + Original COM help: https://opendss.epri.com/AutoBusList.html + ''' + return self._lib.Settings_Get_AutoBusList() @AutoBusList.setter def AutoBusList(self, Value: AnyStr): - if not isinstance(Value, bytes): - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.Settings_Set_AutoBusList(Value)) + self._lib.Settings_Set_AutoBusList(Value) @property - def CktModel(self) -> int: - '''{dssMultiphase (0) * | dssPositiveSeq (1) } Indicate if the circuit model is positive sequence.''' - return self._check_for_error(self._lib.Settings_Get_CktModel()) + def CircuitModel(self) -> CktModels: + ''' + Indicate if the circuit model is positive sequence. + + Original COM help: https://opendss.epri.com/CktModel.html + ''' + return CktModels(self._lib.Settings_Get_CktModel()) - @CktModel.setter - def CktModel(self, Value: int): - self._check_for_error(self._lib.Settings_Set_CktModel(Value)) + @CircuitModel.setter + def CircuitModel(self, Value: Union[int, CktModels]): + self._lib.Settings_Set_CktModel(Value) @property def ControlTrace(self) -> bool: - '''{True | False*} Denotes whether to trace the control actions to a file.''' - return self._check_for_error(self._lib.Settings_Get_ControlTrace()) != 0 + ''' + Denotes whether to trace the control actions to a file. + + Original COM help: https://opendss.epri.com/ControlTrace.html + ''' + return self._lib.Settings_Get_ControlTrace() @ControlTrace.setter def ControlTrace(self, Value: bool): - self._check_for_error(self._lib.Settings_Set_ControlTrace(Value)) + self._lib.Settings_Set_ControlTrace(Value) @property - def EmergVmaxpu(self) -> float: - '''Per Unit maximum voltage for Emergency conditions.''' - return self._check_for_error(self._lib.Settings_Get_EmergVmaxpu()) + def EmergVMaxpu(self) -> float: + ''' + Per Unit maximum voltage for Emergency conditions. + + Original COM help: https://opendss.epri.com/EmergVmaxpu.html + ''' + return self._lib.Settings_Get_EmergVmaxpu() - @EmergVmaxpu.setter - def EmergVmaxpu(self, Value: float): - self._check_for_error(self._lib.Settings_Set_EmergVmaxpu(Value)) + @EmergVMaxpu.setter + def EmergVMaxpu(self, Value: float): + self._lib.Settings_Set_EmergVmaxpu(Value) @property - def EmergVminpu(self) -> float: - '''Per Unit minimum voltage for Emergency conditions.''' - return self._check_for_error(self._lib.Settings_Get_EmergVminpu()) + def EmergVMinpu(self) -> float: + ''' + Per Unit minimum voltage for Emergency conditions. + + Original COM help: https://opendss.epri.com/EmergVminpu.html + ''' + return self._lib.Settings_Get_EmergVminpu() - @EmergVminpu.setter - def EmergVminpu(self, Value: float): - self._check_for_error(self._lib.Settings_Set_EmergVminpu(Value)) + @EmergVMinpu.setter + def EmergVMinpu(self, Value: float): + self._lib.Settings_Set_EmergVminpu(Value) @property - def LossRegs(self) -> Int32Array: - '''Integer array defining which energy meter registers to use for computing losses''' - self._check_for_error(self._lib.Settings_Get_LossRegs_GR()) - return self._get_int32_gr_array() + def LossRegisters(self) -> Int32Array: + ''' + Integer array defining which energy meter registers to use for computing losses - @LossRegs.setter - def LossRegs(self, Value: Int32Array): + Original COM help: https://opendss.epri.com/LossRegs.html + ''' + return self._lib.Settings_Get_LossRegs_GR() + + @LossRegisters.setter + def LossRegisters(self, Value: Int32Array): Value, ValuePtr, ValueCount = self._prepare_int32_array(Value) - self._check_for_error(self._lib.Settings_Set_LossRegs(ValuePtr, ValueCount)) + self._lib.Settings_Set_LossRegs(ValuePtr, ValueCount) @property def LossWeight(self) -> float: - '''Weighting factor applied to Loss register values.''' - return self._check_for_error(self._lib.Settings_Get_LossWeight()) + ''' + Weighting factor applied to Loss register values. + + Original COM help: https://opendss.epri.com/LossWeight.html + ''' + return self._lib.Settings_Get_LossWeight() @LossWeight.setter def LossWeight(self, Value: float): - self._check_for_error(self._lib.Settings_Set_LossWeight(Value)) + self._lib.Settings_Set_LossWeight(Value) @property - def NormVmaxpu(self) -> float: - '''Per Unit maximum voltage for Normal conditions.''' - return self._check_for_error(self._lib.Settings_Get_NormVmaxpu()) + def NormalVMaxpu(self) -> float: + ''' + Per Unit maximum voltage for Normal conditions. + + Original COM help: https://opendss.epri.com/NormVmaxpu.html + ''' + return self._lib.Settings_Get_NormVmaxpu() - @NormVmaxpu.setter - def NormVmaxpu(self, Value: float): - self._check_for_error(self._lib.Settings_Set_NormVmaxpu(Value)) + @NormalVMaxpu.setter + def NormalVMaxpu(self, Value: float): + self._lib.Settings_Set_NormVmaxpu(Value) @property - def NormVminpu(self) -> float: - '''Per Unit minimum voltage for Normal conditions.''' - return self._check_for_error(self._lib.Settings_Get_NormVminpu()) + def NormalVMinpu(self) -> float: + ''' + Per Unit minimum voltage for Normal conditions. + + Original COM help: https://opendss.epri.com/NormVminpu.html + ''' + return self._lib.Settings_Get_NormVminpu() - @NormVminpu.setter - def NormVminpu(self, Value: float): - self._check_for_error(self._lib.Settings_Set_NormVminpu(Value)) + @NormalVMinpu.setter + def NormalVMinpu(self, Value: float): + self._lib.Settings_Set_NormVminpu(Value) @property def PriceCurve(self) -> str: - '''Name of LoadShape object that serves as the source of price signal data for yearly simulations, etc.''' - return self._get_string(self._check_for_error(self._lib.Settings_Get_PriceCurve())) + ''' + Name of LoadShape object that serves as the source of price signal data for yearly simulations, etc. + + Original COM help: https://opendss.epri.com/PriceCurve.html + ''' + return self._lib.Settings_Get_PriceCurve() @PriceCurve.setter def PriceCurve(self, Value: AnyStr): - if not isinstance(Value, bytes): - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.Settings_Set_PriceCurve(Value)) + self._lib.Settings_Set_PriceCurve(Value) @property def PriceSignal(self) -> float: - '''Price Signal for the Circuit''' - return self._check_for_error(self._lib.Settings_Get_PriceSignal()) + ''' + Price Signal for the Circuit + + Original COM help: https://opendss.epri.com/PriceSignal.html + ''' + return self._lib.Settings_Get_PriceSignal() @PriceSignal.setter def PriceSignal(self, Value: float): - self._check_for_error(self._lib.Settings_Set_PriceSignal(Value)) + self._lib.Settings_Set_PriceSignal(Value) @property def Trapezoidal(self) -> bool: - '''Gets value of trapezoidal integration flag in energy meters. Defaults to `False`.''' - return self._check_for_error(self._lib.Settings_Get_Trapezoidal()) != 0 + ''' + Gets value of trapezoidal integration flag in energy meters. Defaults to `False`. + + Original COM help: https://opendss.epri.com/Trapezoidal.html + ''' + return self._lib.Settings_Get_Trapezoidal() @Trapezoidal.setter def Trapezoidal(self, Value: bool): - self._check_for_error(self._lib.Settings_Set_Trapezoidal(Value)) + self._lib.Settings_Set_Trapezoidal(Value) @property - def UEregs(self) -> Int32Array: - '''Array of Integers defining energy meter registers to use for computing UE''' - self._check_for_error(self._lib.Settings_Get_UEregs_GR()) - return self._get_int32_gr_array() + def UERegisters(self) -> Int32Array: + ''' + Array of Integers defining energy meter registers to use for computing UE + + Original COM help: https://opendss.epri.com/UEregs.html + ''' + return self._lib.Settings_Get_UEregs_GR() - @UEregs.setter - def UEregs(self, Value: Int32Array): + @UERegisters.setter + def UERegisters(self, Value: Int32Array): Value, ValuePtr, ValueCount = self._prepare_int32_array(Value) - self._check_for_error(self._lib.Settings_Set_UEregs(ValuePtr, ValueCount)) + self._lib.Settings_Set_UEregs(ValuePtr, ValueCount) @property - def UEweight(self) -> float: - '''Weighting factor applied to UE register values.''' - return self._check_for_error(self._lib.Settings_Get_UEweight()) + def UEWeight(self) -> float: + ''' + Weighting factor applied to UE register values. + + Original COM help: https://opendss.epri.com/UEweight.html + ''' + return self._lib.Settings_Get_UEweight() - @UEweight.setter - def UEweight(self, Value: float): - self._check_for_error(self._lib.Settings_Set_UEweight(Value)) + @UEWeight.setter + def UEWeight(self, Value: float): + self._lib.Settings_Set_UEweight(Value) @property def VoltageBases(self) -> Float64Array: - '''Array of doubles defining the legal voltage bases in kV L-L''' - self._check_for_error(self._lib.Settings_Get_VoltageBases_GR()) - return self._get_float64_gr_array() + ''' + Array of doubles defining the legal voltage bases in kV L-L + + Original COM help: https://opendss.epri.com/VoltageBases.html + ''' + return self._lib.Settings_Get_VoltageBases_GR() @VoltageBases.setter def VoltageBases(self, Value: Float64Array): Value, ValuePtr, ValueCount = self._prepare_float64_array(Value) - self._check_for_error(self._lib.Settings_Set_VoltageBases(ValuePtr, ValueCount)) + self._lib.Settings_Set_VoltageBases(ValuePtr, ValueCount) @property def ZoneLock(self) -> bool: - '''{True | False*} Locks Zones on energy meters to prevent rebuilding if a circuit change occurs.''' - return self._check_for_error(self._lib.Settings_Get_ZoneLock()) != 0 + ''' + Locks Zones on energy meters to prevent rebuilding if a circuit change occurs. + + Original COM help: https://opendss.epri.com/ZoneLock.html + ''' + return self._lib.Settings_Get_ZoneLock() @ZoneLock.setter def ZoneLock(self, Value: bool): - self._check_for_error(self._lib.Settings_Set_ZoneLock(Value)) + self._lib.Settings_Set_ZoneLock(Value) @property def AllocationFactors(self): @@ -207,7 +317,7 @@ def AllocationFactors(self): @AllocationFactors.setter def AllocationFactors(self, Value: float): - self._check_for_error(self._lib.Settings_Set_AllocationFactors(Value)) + self._lib.Settings_Set_AllocationFactors(Value) @property def LoadsTerminalCheck(self) -> bool: @@ -215,13 +325,13 @@ def LoadsTerminalCheck(self) -> bool: 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) + **(API Extension)** ''' - return self._check_for_error(self._lib.Settings_Get_LoadsTerminalCheck()) != 0 + return self._lib.Settings_Get_LoadsTerminalCheck() @LoadsTerminalCheck.setter def LoadsTerminalCheck(self, Value: bool): - self._check_for_error(self._lib.Settings_Set_LoadsTerminalCheck(Value)) + self._lib.Settings_Set_LoadsTerminalCheck(Value) @property def IterateDisabled(self) -> int: @@ -233,13 +343,13 @@ def IterateDisabled(self) -> int: Set it to 1 (or `True`) to include disabled elements. Other numeric values are reserved for other potential behaviors. - (API Extension) + **(API Extension)** ''' - return self._check_for_error(self._lib.Settings_Get_IterateDisabled()) + return self._lib.Settings_Get_IterateDisabled() @IterateDisabled.setter def IterateDisabled(self, Value: int): - self._check_for_error(self._lib.Settings_Set_IterateDisabled(Value)) + self._lib.Settings_Set_IterateDisabled(Value) @property def AdvancedTypes(self) -> bool: @@ -249,44 +359,25 @@ def AdvancedTypes(self) -> bool: - **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. + As a result, for example, a `YPrim` matrix 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) + **(API Extension)** ''' - - arr_dim = self._check_for_error(self._lib.DSS_Get_EnableArrayDimensions()) != 0 - allow_complex = self._api_util._allow_complex - return arr_dim and allow_complex + return self._lib.advanced_types @AdvancedTypes.setter def AdvancedTypes(self, Value: bool): - self._check_for_error(self._lib.DSS_Set_EnableArrayDimensions(Value)) - self._api_util._allow_complex = bool(Value) - + self._lib.advanced_types = bool(Value) @property def CompatFlags(self) -> int: ''' 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: - - - 0x1 (bit 0): If enabled, don't check for NaNs in the inner solution loop. This can lead to various errors. - 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. - - 0x2 (bit 1): Toggle worse precision for certain aspects of the engine. For example, the sequence-to-phase - (`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. - - 0x4 (bit 2): Toggle some InvControl behavior introduced in OpenDSS 9.6.1.1. It could be a regression - but needs further investigation, so we added this flag in the time being. + **THE FLAGS ARE GLOBAL, affecting all DSS engines in the process.** These flags may change for each version of DSS C-API, but the same value will not be reused. That is, when we remove a compatibility flag, it will have no effect but will also not affect anything else @@ -296,24 +387,28 @@ def CompatFlags(self) -> int: options/flags, it was preferred to add this generic function instead of a separate function per flag. - Related enumeration: DSSCompatFlags + See the enumeration `DSSCompatFlags` for available flags, including description. - (API Extension) + **(API Extension)** ''' - return self._check_for_error(self._lib.DSS_Get_CompatFlags()) + return self._lib.DSS_Get_CompatFlags() @CompatFlags.setter def CompatFlags(self, Value: int): - self._check_for_error(self._lib.DSS_Set_CompatFlags(Value)) + self._lib.DSS_Set_CompatFlags(Value) @property def AllowForms(self) -> bool: - '''Gets/sets whether text output is allowed''' - return self._check_for_error(self._lib.DSS_Get_AllowForms()) != 0 + ''' + Gets/sets whether text output is allowed (DSS-Extensions) or general forms/windows are shown (official OpenDSS). + + Original COM help: https://opendss.epri.com/AllowForms.html + ''' + return self._lib.DSS_Get_AllowForms() @AllowForms.setter def AllowForms(self, value: bool): - self._check_for_error(self._lib.DSS_Set_AllowForms(value)) + self._lib.DSS_Set_AllowForms(value) @property def AllowEditor(self) -> bool: @@ -324,34 +419,48 @@ def AllowEditor(self) -> bool: 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) + **(API Extension)** ''' - return self._check_for_error(self._lib.DSS_Get_AllowEditor()) != 0 + return self._lib.DSS_Get_AllowEditor() @AllowEditor.setter def AllowEditor(self, value: bool): - self._check_for_error(self._lib.DSS_Set_AllowEditor(value)) + self._lib.DSS_Set_AllowEditor(value) @property def DataPath(self) -> str: - '''DSS Data File Path. Default path for reports, etc. from DSS''' - return self._get_string(self._check_for_error(self._lib.DSS_Get_DataPath())) + ''' + DSS Data File Path. Default path for reports, etc. from DSS + + Original COM help: https://opendss.epri.com/DataPath.html + ''' + return self._lib.DSS_Get_DataPath() @DataPath.setter def DataPath(self, Value: AnyStr): - if not isinstance(Value, bytes): - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.DSS_Set_DataPath(Value)) + self._lib.DSS_Set_DataPath(Value) @property def DefaultEditor(self) -> str: - '''Returns the path name for the default text editor.''' - return self._get_string(self._check_for_error(self._lib.DSS_Get_DefaultEditor())) + ''' + Returns the path name for the default text editor. + + Original COM help: https://opendss.epri.com/DefaultEditor.html + ''' + return self._lib.DSS_Get_DefaultEditor() + def SetPropertyNameStyle(self, value: DSSPropertyNameStyle): - '''Switch the property names according''' - self._check_for_error(self._lib.Settings_SetPropertyNameStyle(value)) + ''' + Switch the property names according to the target style. + + Use this method for compatibility with code that doesn't consider that + OpenDSS is case insensitive. Check the enumeration for more: + [DSSPropertyNameStyle](#dss_python_backend.enums.DSSPropertyNameStyle) + + **(API Extension)** + ''' + self._lib.Settings_SetPropertyNameStyle(value) @property def AllowChangeDir(self) -> bool: @@ -369,11 +478,11 @@ def AllowChangeDir(self) -> bool: **(API Extension)** ''' - return self._check_for_error(self._lib.DSS_Get_AllowChangeDir()) != 0 + return self._lib.DSS_Get_AllowChangeDir() @AllowChangeDir.setter def AllowChangeDir(self, Value: bool): - self._check_for_error(self._lib.DSS_Set_AllowChangeDir(Value)) + self._lib.DSS_Set_AllowChangeDir(Value) @property def AllowDOScmd(self) -> bool: @@ -387,11 +496,11 @@ def AllowDOScmd(self) -> bool: **(API Extension)** ''' - return self._check_for_error(self._lib.DSS_Get_AllowDOScmd()) != 0 + return self._lib.DSS_Get_AllowDOScmd() @AllowDOScmd.setter def AllowDOScmd(self, Value: bool): - self._check_for_error(self._lib.DSS_Set_AllowDOScmd(Value)) + self._lib.DSS_Set_AllowDOScmd(Value) @property def COMErrorResults(self) -> bool: @@ -405,15 +514,90 @@ def COMErrorResults(self) -> bool: - 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. + Defaults to False/0 (disabled state), starting DSS-Python v0.16. 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)** ''' - return self._check_for_error(self._lib.DSS_Get_COMErrorResults()) != 0 + return self._lib.DSS_Get_COMErrorResults() @COMErrorResults.setter def COMErrorResults(self, Value: bool): - self._check_for_error(self._lib.DSS_Set_COMErrorResults(Value)) \ No newline at end of file + self._lib.DSS_Set_COMErrorResults(Value) + + @property + def SkipFileRegExp(self) -> str: + ''' + Regular expression pattern to skip files. + + If a file name as provided in the input for the `Redirect` and `Compile` commands + matches the regular expression pattern, it is skipped (the file is not read nor + commands contained in the file are executed). + + Set to an empty string to reset/disable the filter. + + Case-insensitive. + See https://regex.sorokin.engineer/en/latest/regular_expressions.html for information on + the expression syntax and options. + + Even if the `clear` command is included in `Settings.SkipCommands`, the `DSS.ClearAll()` method can + still be called. It resets both skip settings, `SkipCommands` and `SkipFileRegExp`. + + **(API Extension)** + ''' + return self._lib.Settings_Get_SkipFileRegExp() + + @SkipFileRegExp.setter + def SkipFileRegExp(self, Value: Union[AnyStr, None]): + self._lib.Settings_Set_SkipFileRegExp(Value or '') + + @property + def SkipCommands(self) -> List[str]: + ''' + List of commands to skip + + List of strings representing the command names to skip when processing DSS text commands or files. + + If the `clear` command is included in `Settings.SkipCommands`, the `DSS.ClearAll()` method can + still be called and it will reset both skip settings, `SkipCommands` and `SkipFileRegExp`. + + **(API Extension)** + ''' + + return [ + self._lib.DSS_Executive_Get_Command(i) + for i in self._lib.Settings_Get_SkipCommands_GR() + ] + + @SkipCommands.setter + def SkipCommands(self, Value: List[str]): + if len(Value) != 0 and isinstance(Value[0], str): + # map command names to integer codes + Value = [self._command_dict[cmd_name] for cmd_name in Value] + + Value, ValuePtr, ValueCount = self._prepare_int32_array(Value) + + self._lib.Settings_Set_SkipCommands(ValuePtr, ValueCount) + + + def map_to_iterators(self): + ''' + Returns a Python context manager that temporary disables mapping new DSS objects + to permanent Python objects; instead, use AltDSS object iterators where required. + + Use this to remove the extra Python overhead if you do not plan to interact + with every single object in Python. The objects can always be accessed later + through the implicit collections (e.g. `altdss.Load` for load objects). + + Alternatively, prefer the batch API to create objects in bulk, when possible. + Batches do not instantiate individual Python objects for each DSS object when + they are created. + + For advanced users. + + **(API Extension)** + ''' + return MapToIterators(self) + diff --git a/altdss/Solution.py b/altdss/Solution.py index 3e32060..166bdc1 100644 --- a/altdss/Solution.py +++ b/altdss/Solution.py @@ -4,6 +4,7 @@ from .types import Int32Array from typing import Union, AnyStr, List from dss.enums import SolveModes, ControlModes, SolutionAlgorithms +import numpy as np class ISolution(Base): __slots__ = [] @@ -19,7 +20,7 @@ class ISolution(Base): 'ProcessTime', 'AddType', 'GenkW', - 'Hour', + 'Time', 'Capkvar', 'Seconds', 'GenMult', @@ -51,384 +52,524 @@ class ISolution(Base): ] def BuildYMatrix(self, BuildOption: int, AllocateVI: bool): - self._check_for_error(self._lib.Solution_BuildYMatrix(BuildOption, AllocateVI)) + self._lib.Solution_BuildYMatrix(BuildOption, AllocateVI) def CheckControls(self): - self._check_for_error(self._lib.Solution_CheckControls()) + self._lib.Solution_CheckControls() def CheckFaultStatus(self): - self._check_for_error(self._lib.Solution_CheckFaultStatus()) + self._lib.Solution_CheckFaultStatus() def Cleanup(self): - '''' - Same as Circuit.EndOfTimeStepUpdate - ''' - self._check_for_error(self._lib.Solution_Cleanup()) + self._lib.Solution_Cleanup() def DoControlActions(self): - self._check_for_error(self._lib.Solution_DoControlActions()) + self._lib.Solution_DoControlActions() def FinishTimeStep(self): - self._check_for_error(self._lib.Solution_FinishTimeStep()) + self._lib.Solution_FinishTimeStep() def InitSnap(self): - self._check_for_error(self._lib.Solution_InitSnap()) + self._lib.Solution_InitSnap() def SampleControlDevices(self): - self._check_for_error(self._lib.Solution_SampleControlDevices()) + self._lib.Solution_SampleControlDevices() def Sample_DoControlActions(self): - self._check_for_error(self._lib.Solution_Sample_DoControlActions()) + self._lib.Solution_Sample_DoControlActions() def Solve(self): - self._check_for_error(self._lib.Solution_Solve()) + self._lib.Solution_Solve() def SolveDirect(self): - self._check_for_error(self._lib.Solution_SolveDirect()) + self._lib.Solution_SolveDirect() def SolveNoControl(self): - self._check_for_error(self._lib.Solution_SolveNoControl()) + self._lib.Solution_SolveNoControl() def SolvePflow(self): - self._check_for_error(self._lib.Solution_SolvePflow()) + self._lib.Solution_SolvePflow() def SolvePlusControl(self): - self._check_for_error(self._lib.Solution_SolvePlusControl()) + self._lib.Solution_SolvePlusControl() def SolveSnap(self): - self._check_for_error(self._lib.Solution_SolveSnap()) + self._lib.Solution_SolveSnap() @property def AddType(self) -> int: - '''Type of device to add in AutoAdd Mode: {dssGen (Default) | dssCap}''' - return self._check_for_error(self._lib.Solution_Get_AddType()) + ''' + Type of device to add in AutoAdd Mode: {dssGen (Default) | dssCap} + + Original COM help: https://opendss.epri.com/AddType.html + ''' + return self._lib.Solution_Get_AddType() @AddType.setter def AddType(self, Value: int): - self._check_for_error(self._lib.Solution_Set_AddType(Value)) + self._lib.Solution_Set_AddType(Value) @property def Algorithm(self) -> SolutionAlgorithms: - '''Base Solution algorithm: {dssNormalSolve | dssNewtonSolve}''' - return SolutionAlgorithms(self._check_for_error(self._lib.Solution_Get_Algorithm())) + ''' + Base Solution algorithm + + Original COM help: https://opendss.epri.com/Algorithm.html + ''' + return SolutionAlgorithms(self._lib.Solution_Get_Algorithm()) @Algorithm.setter def Algorithm(self, Value: Union[int, SolutionAlgorithms]): - self._check_for_error(self._lib.Solution_Set_Algorithm(Value)) + self._lib.Solution_Set_Algorithm(Value) @property def Capkvar(self) -> float: - '''Capacitor kvar for adding capacitors in AutoAdd mode''' - return self._check_for_error(self._lib.Solution_Get_Capkvar()) + ''' + Capacitor kvar for adding capacitors in AutoAdd mode + + Original COM help: https://opendss.epri.com/Capkvar.html + ''' + return self._lib.Solution_Get_Capkvar() @Capkvar.setter def Capkvar(self, Value: float): - self._check_for_error(self._lib.Solution_Set_Capkvar(Value)) + self._lib.Solution_Set_Capkvar(Value) @property def ControlActionsDone(self) -> bool: - '''Flag indicating the control actions are done.''' - return self._check_for_error(self._lib.Solution_Get_ControlActionsDone()) != 0 + ''' + Flag indicating the control actions are done. + + Original COM help: https://opendss.epri.com/ControlActionsDone.html + ''' + return self._lib.Solution_Get_ControlActionsDone() @ControlActionsDone.setter def ControlActionsDone(self, Value: bool): - self._check_for_error(self._lib.Solution_Set_ControlActionsDone(Value)) + self._lib.Solution_Set_ControlActionsDone(Value) @property def ControlIterations(self) -> int: - '''Value of the control iteration counter''' - return self._check_for_error(self._lib.Solution_Get_ControlIterations()) + ''' + Value of the control iteration counter + + Original COM help: https://opendss.epri.com/ControlIterations.html + ''' + return self._lib.Solution_Get_ControlIterations() @ControlIterations.setter def ControlIterations(self, Value: int): - self._check_for_error(self._lib.Solution_Set_ControlIterations(Value)) + self._lib.Solution_Set_ControlIterations(Value) @property def ControlMode(self) -> ControlModes: - '''{dssStatic* | dssEvent | dssTime} Modes for control devices''' - return ControlModes(self._check_for_error(self._lib.Solution_Get_ControlMode())) + ''' + Modes for control devices + + Original COM help: https://opendss.epri.com/ControlMode.html + ''' + return ControlModes(self._lib.Solution_Get_ControlMode()) @ControlMode.setter def ControlMode(self, Value: Union[int, ControlModes]): - self._check_for_error(self._lib.Solution_Set_ControlMode(Value)) + self._lib.Solution_Set_ControlMode(Value) @property def Converged(self) -> bool: - '''Flag to indicate whether the circuit solution converged''' - return self._check_for_error(self._lib.Solution_Get_Converged()) != 0 + ''' + Flag to indicate whether the circuit solution converged + + Original COM help: https://opendss.epri.com/Converged.html + ''' + return self._lib.Solution_Get_Converged() @Converged.setter def Converged(self, Value: bool): - self._check_for_error(self._lib.Solution_Set_Converged(Value)) + self._lib.Solution_Set_Converged(Value) @property def DefaultDaily(self) -> str: - '''Default daily load shape (defaults to "Default")''' - return self._get_string(self._check_for_error(self._lib.Solution_Get_DefaultDaily())) + ''' + Default daily load shape (defaults to "Default") + + Original COM help: https://opendss.epri.com/DefaultDaily.html + ''' + return self._lib.Solution_Get_DefaultDaily() @DefaultDaily.setter def DefaultDaily(self, Value: AnyStr): - if not isinstance(Value, bytes): - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.Solution_Set_DefaultDaily(Value)) + self._lib.Solution_Set_DefaultDaily(Value) @property def DefaultYearly(self) -> str: - '''Default Yearly load shape (defaults to "Default")''' - return self._get_string(self._check_for_error(self._lib.Solution_Get_DefaultYearly())) + ''' + Default Yearly load shape (defaults to "Default") + + Original COM help: https://opendss.epri.com/DefaultYearly.html + ''' + return self._lib.Solution_Get_DefaultYearly() @DefaultYearly.setter def DefaultYearly(self, Value: AnyStr): - if not isinstance(Value, bytes): - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.Solution_Set_DefaultYearly(Value)) + self._lib.Solution_Set_DefaultYearly(Value) @property def EventLog(self) -> List[str]: - '''Array of strings containing the Event Log''' - return self._check_for_error(self._get_string_array(self._lib.Solution_Get_EventLog)) + ''' + Array of strings containing the Event Log + + Original COM help: https://opendss.epri.com/EventLog.html + ''' + return self._lib.Solution_Get_EventLog() @property def Frequency(self) -> float: - '''Set the Frequency for next solution''' - return self._check_for_error(self._lib.Solution_Get_Frequency()) + ''' + Set the Frequency for next solution + + Original COM help: https://opendss.epri.com/Frequency1.html + ''' + return self._lib.Solution_Get_Frequency() @Frequency.setter def Frequency(self, Value: float): - self._check_for_error(self._lib.Solution_Set_Frequency(Value)) + self._lib.Solution_Set_Frequency(Value) @property def GenMult(self) -> float: - '''Default Multiplier applied to generators (like LoadMult)''' - return self._check_for_error(self._lib.Solution_Get_GenMult()) + ''' + Default Multiplier applied to generators (like LoadMult) + + Original COM help: https://opendss.epri.com/GenMult.html + ''' + return self._lib.Solution_Get_GenMult() @GenMult.setter def GenMult(self, Value: float): - self._check_for_error(self._lib.Solution_Set_GenMult(Value)) + self._lib.Solution_Set_GenMult(Value) @property def GenPF(self) -> float: - '''PF for generators in AutoAdd mode''' - return self._check_for_error(self._lib.Solution_Get_GenPF()) + ''' + PF for generators in AutoAdd mode + + Original COM help: https://opendss.epri.com/GenPF.html + ''' + return self._lib.Solution_Get_GenPF() @GenPF.setter def GenPF(self, Value: float): - self._check_for_error(self._lib.Solution_Set_GenPF(Value)) + self._lib.Solution_Set_GenPF(Value) @property def GenkW(self) -> float: - '''Generator kW for AutoAdd mode''' - return self._check_for_error(self._lib.Solution_Get_GenkW()) + ''' + Generator kW for AutoAdd mode + + Original COM help: https://opendss.epri.com/GenkW.html + ''' + return self._lib.Solution_Get_GenkW() @GenkW.setter def GenkW(self, Value: float): - self._check_for_error(self._lib.Solution_Set_GenkW(Value)) + self._lib.Solution_Set_GenkW(Value) @property def Hour(self) -> int: - '''Set Hour for time series solutions.''' - return self._check_for_error(self._lib.Solution_Get_Hour()) + ''' + Set Hour for time series solutions. + + Original COM help: https://opendss.epri.com/Hour.html + ''' + return self._lib.Solution_Get_Hour() @Hour.setter def Hour(self, Value: int): - self._check_for_error(self._lib.Solution_Set_Hour(Value)) + self._lib.Solution_Set_Hour(Value) @property def IntervalHrs(self) -> float: ''' Get/Set the Solution.IntervalHrs variable used for devices that integrate / custom solution algorithms ''' - return self._check_for_error(self._lib.Solution_Get_IntervalHrs()) + return self._lib.Solution_Get_IntervalHrs() @IntervalHrs.setter def IntervalHrs(self, Value: float): - self._check_for_error(self._lib.Solution_Set_IntervalHrs(Value)) + self._lib.Solution_Set_IntervalHrs(Value) @property def Iterations(self) -> int: - '''Number of iterations taken for last solution. (Same as TotalIterations)''' - return self._check_for_error(self._lib.Solution_Get_Iterations()) + ''' + Number of iterations taken for last solution. (Same as TotalIterations) + + Original COM help: https://opendss.epri.com/Iterations.html + ''' + return self._lib.Solution_Get_Iterations() @property def LDCurve(self) -> str: - '''Load-Duration Curve name for LD modes''' - return self._get_string(self._check_for_error(self._lib.Solution_Get_LDCurve())) + ''' + Load-Duration Curve name for LD modes + + Original COM help: https://opendss.epri.com/LDCurve.html + ''' + return self._lib.Solution_Get_LDCurve() @LDCurve.setter def LDCurve(self, Value: AnyStr): - if not isinstance(Value, bytes): - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.Solution_Set_LDCurve(Value)) + self._lib.Solution_Set_LDCurve(Value) @property def LoadModel(self) -> int: - '''Load Model: {dssPowerFlow (default) | dssAdmittance}''' - return self._check_for_error(self._lib.Solution_Get_LoadModel()) + ''' + Load Model: {dssPowerFlow (default) | dssAdmittance} + + Original COM help: https://opendss.epri.com/LoadModel.html + ''' + return self._lib.Solution_Get_LoadModel() @LoadModel.setter def LoadModel(self, Value: int): - self._check_for_error(self._lib.Solution_Set_LoadModel(Value)) + self._lib.Solution_Set_LoadModel(Value) @property def LoadMult(self) -> float: - '''Default load multiplier applied to all non-fixed loads''' - return self._check_for_error(self._lib.Solution_Get_LoadMult()) + ''' + Default load multiplier applied to all non-fixed loads + + Original COM help: https://opendss.epri.com/LoadMult.html + ''' + return self._lib.Solution_Get_LoadMult() @LoadMult.setter def LoadMult(self, Value: float): - self._check_for_error(self._lib.Solution_Set_LoadMult(Value)) + self._lib.Solution_Set_LoadMult(Value) @property def MaxControlIterations(self) -> int: - '''Maximum allowable control iterations''' - return self._check_for_error(self._lib.Solution_Get_MaxControlIterations()) + ''' + Maximum allowable control iterations + + Original COM help: https://opendss.epri.com/MaxControlIterations.html + ''' + return self._lib.Solution_Get_MaxControlIterations() @MaxControlIterations.setter def MaxControlIterations(self, Value): - self._check_for_error(self._lib.Solution_Set_MaxControlIterations(Value)) + self._lib.Solution_Set_MaxControlIterations(Value) @property def MaxIterations(self) -> int: - '''Max allowable iterations.''' - return self._check_for_error(self._lib.Solution_Get_MaxIterations()) + ''' + Max allowable iterations. + + Original COM help: https://opendss.epri.com/MaxIterations.html + ''' + return self._lib.Solution_Get_MaxIterations() @MaxIterations.setter def MaxIterations(self, Value: int): - self._check_for_error(self._lib.Solution_Set_MaxIterations(Value)) + self._lib.Solution_Set_MaxIterations(Value) @property def MinIterations(self) -> int: - '''Minimum number of iterations required for a power flow solution.''' - return self._check_for_error(self._lib.Solution_Get_MinIterations()) + ''' + Minimum number of iterations required for a power flow solution. + + Original COM help: https://opendss.epri.com/MinIterations.html + ''' + return self._lib.Solution_Get_MinIterations() @MinIterations.setter def MinIterations(self, Value: int): - self._check_for_error(self._lib.Solution_Set_MinIterations(Value)) + self._lib.Solution_Set_MinIterations(Value) @property def Mode(self) -> SolveModes: - '''Set present solution mode''' - return SolveModes(self._check_for_error(self._lib.Solution_Get_Mode())) + ''' + Set present solution mode + + Original COM help: https://opendss.epri.com/Mode2.html + ''' + return SolveModes(self._lib.Solution_Get_Mode()) @Mode.setter def Mode(self, Value: Union[int, SolveModes]): - self._check_for_error(self._lib.Solution_Set_Mode(Value)) + self._lib.Solution_Set_Mode(Value) @property def Mode_str(self) -> str: - '''Present solution mode as string (classic ModeID)''' - return self._get_string(self._check_for_error(self._lib.Solution_Get_ModeID())) + ''' + ID (text) of the present solution mode + + Original COM help: https://opendss.epri.com/Mode_str.html + ''' + return self._lib.Solution_Get_ModeID() @property def MostIterationsDone(self) -> int: - '''Max number of iterations required to converge at any control iteration of the most recent solution.''' - return self._check_for_error(self._lib.Solution_Get_MostIterationsDone()) + ''' + Max number of iterations required to converge at any control iteration of the most recent solution. + + Original COM help: https://opendss.epri.com/MostIterationsDone.html + ''' + return self._lib.Solution_Get_MostIterationsDone() @property def Number(self) -> int: - '''Number of solutions to perform for Monte Carlo and time series simulations''' - return self._check_for_error(self._lib.Solution_Get_Number()) + ''' + Number of solutions to perform for Monte Carlo and time series simulations + + Original COM help: https://opendss.epri.com/Number1.html + ''' + return self._lib.Solution_Get_Number() @Number.setter def Number(self, Value: int): - self._check_for_error(self._lib.Solution_Set_Number(Value)) + self._lib.Solution_Set_Number(Value) @property def ProcessTime(self) -> float: - '''Gets the time required to perform the latest solution (Read only)''' - return self._check_for_error(self._lib.Solution_Get_Process_Time()) + ''' + Gets the time required to perform the latest solution (Read only) + + Original COM help: https://opendss.epri.com/ProcessTime.html + ''' + return self._lib.Solution_Get_Process_Time() @property def Random(self) -> int: - '''Randomization mode for random variables "Gaussian" or "Uniform"''' - return self._check_for_error(self._lib.Solution_Get_Random()) + ''' + Randomization mode for random variables "Gaussian" or "Uniform" + + Original COM help: https://opendss.epri.com/Random.html + ''' + return self._lib.Solution_Get_Random() @Random.setter def Random(self, Value: int): - self._check_for_error(self._lib.Solution_Set_Random(Value)) + self._lib.Solution_Set_Random(Value) @property def Seconds(self) -> float: - '''Seconds from top of the hour.''' - return self._check_for_error(self._lib.Solution_Get_Seconds()) + ''' + Seconds from top of the hour. + + Original COM help: https://opendss.epri.com/Seconds.html + ''' + return self._lib.Solution_Get_Seconds() @Seconds.setter def Seconds(self, Value: float): - self._check_for_error(self._lib.Solution_Set_Seconds(Value)) + self._lib.Solution_Set_Seconds(Value) @property def StepSize(self) -> float: - '''Time step size in sec''' - return self._check_for_error(self._lib.Solution_Get_StepSize()) + ''' + Time step size in sec + + Original COM help: https://opendss.epri.com/StepSize.html + ''' + return self._lib.Solution_Get_StepSize() @StepSize.setter def StepSize(self, Value: float): - self._check_for_error(self._lib.Solution_Set_StepSize(Value)) + self._lib.Solution_Set_StepSize(Value) @property def SystemYChanged(self) -> bool: - '''Flag that indicates if elements of the System Y have been changed by recent activity.''' - return self._check_for_error(self._lib.Solution_Get_SystemYChanged() != 0) + ''' + Flag that indicates if elements of the System Y have been changed by recent activity. + + Original COM help: https://opendss.epri.com/SystemYChanged.html + ''' + return self._lib.Solution_Get_SystemYChanged() @property def TimeOfStep(self) -> float: - '''Get the solution process time + sample time for time step''' - return self._check_for_error(self._lib.Solution_Get_Time_of_Step()) + ''' + Get the solution process time + sample time for time step + + Original COM help: https://opendss.epri.com/TimeOfStep.html + ''' + return self._lib.Solution_Get_Time_of_Step() @property def Tolerance(self) -> float: - '''Solution convergence tolerance.''' - return self._check_for_error(self._lib.Solution_Get_Tolerance()) + ''' + Solution convergence tolerance. + + Original COM help: https://opendss.epri.com/Tolerance.html + ''' + return self._lib.Solution_Get_Tolerance() @Tolerance.setter def Tolerance(self, Value: float): - self._check_for_error(self._lib.Solution_Set_Tolerance(Value)) + self._lib.Solution_Set_Tolerance(Value) @property def TotalTime(self) -> float: ''' Gets/sets the accumulated time of the simulation + + This accumulator has to be reset manually. + + Original COM help: https://opendss.epri.com/TotalTime.html ''' - return self._check_for_error(self._lib.Solution_Get_Total_Time()) + return self._lib.Solution_Get_Total_Time() @TotalTime.setter def TotalTime(self, Value: float): - self._check_for_error(self._lib.Solution_Set_Total_Time(Value)) + self._lib.Solution_Set_Total_Time(Value) @property def TotalIterations(self) -> int: - '''Total iterations including control iterations for most recent solution.''' - return self._check_for_error(self._lib.Solution_Get_Totaliterations()) + ''' + Total iterations including control iterations for most recent solution. + + Original COM help: https://opendss.epri.com/TotalIterations.html + ''' + return self._lib.Solution_Get_Totaliterations() @property def Year(self) -> int: - '''Set year for planning studies''' - return self._check_for_error(self._lib.Solution_Get_Year()) + ''' + Set year for planning studies + + Original COM help: https://opendss.epri.com/Year.html + ''' + return self._lib.Solution_Get_Year() @Year.setter def Year(self, Value: int): - self._check_for_error(self._lib.Solution_Set_Year(Value)) + self._lib.Solution_Set_Year(Value) @property - def Hour(self) -> float: - '''Hour as a double, including fractional part''' - return self._check_for_error(self._lib.Solution_Get_dblHour()) + def Time(self) -> float: + ''' + Current time in the simulation as a float number, representing hours including fractional part - @Hour.setter - def Hour(self, Value: float): - self._check_for_error(self._lib.Solution_Set_dblHour(Value)) + Original COM help: https://opendss.epri.com/dblHour1.html + ''' + return self._lib.Solution_Get_dblHour() + + @Time.setter + def Time(self, Value: float): + self._lib.Solution_Set_dblHour(Value) @property def pctGrowth(self) -> float: - '''Percent default annual load growth rate''' - return self._check_for_error(self._lib.Solution_Get_pctGrowth()) + ''' + Percent default annual load growth rate + + Original COM help: https://opendss.epri.com/pctGrowth.html + ''' + return self._lib.Solution_Get_pctGrowth() @pctGrowth.setter def pctGrowth(self, Value: float): - self._check_for_error(self._lib.Solution_Set_pctGrowth(Value)) + self._lib.Solution_Set_pctGrowth(Value) @property def StepsizeHr(self) -> float: @@ -437,7 +578,7 @@ def StepsizeHr(self) -> float: @StepsizeHr.setter def StepsizeHr(self, Value: float): - self._check_for_error(self._lib.Solution_Set_StepsizeHr(Value)) + self._lib.Solution_Set_StepsizeHr(Value) @property def StepsizeMin(self) -> float: @@ -446,32 +587,97 @@ def StepsizeMin(self) -> float: @StepsizeMin.setter def StepsizeMin(self, Value: float): - self._check_for_error(self._lib.Solution_Set_StepsizeMin(Value)) + self._lib.Solution_Set_StepsizeMin(Value) # The following are officially available only in v8 @property def BusLevels(self) -> Int32Array: - self._check_for_error(self._lib.Solution_Get_BusLevels_GR()) - return self._get_int32_gr_array() + ''' + Bus levels for all the buses in the model. + + The bus levels are calculated after calculating the incidence branch-to-node (B2N) + matrix and they represent the distance from the buses to a reference that goes from + the feeder head to the farthest bus in the model. The bus level index matches with + the bus list obtained with the circuit interface. + + Original COM help: https://opendss.epri.com/BusLevels.html + ''' + return self._lib.Solution_Get_BusLevels_GR() @property def IncMatrix(self) -> Int32Array: - self._check_for_error(self._lib.Solution_Get_IncMatrix_GR()) - return self._get_int32_gr_array() + ''' + Incidence branch-to-node (B2N) matrix calculated for the model as a vector of integers. + + The vector represents a sparse matrix (non-zero values are the only ones delivered) and + can be interpreted as follows: The first element is the row number, the second one is + the column and the third is the value, this way, by dividing the number of elements + in the array by 3 the user can obtain the number of rows in case of wanting to sort + the vector values within a matrix. + + Original COM help: https://opendss.epri.com/IncMatrix.html + ''' + #TODO: expose as sparse matrix + result = self._lib.Solution_Get_IncMatrix_GR() + n = len(result) + if n >= 3 and (n % 3) == 0: # Compatibility with COM + if isinstance(result, np.ndarray): + result = np.resize(result, n + 1) + result[-1] = 0 + else: + result.append(0) + + return result @property def IncMatrixCols(self) -> List[str]: - return self._check_for_error(self._get_string_array(self._lib.Solution_Get_IncMatrixCols)) + ''' + Names of the columns of the branch-to-node (B2N) matrix. + + Original COM help: https://opendss.epri.com/IncMatrixCols.html + ''' + return self._lib.Solution_Get_IncMatrixCols() @property def IncMatrixRows(self) -> List[str]: - return self._check_for_error(self._get_string_array(self._lib.Solution_Get_IncMatrixRows)) + ''' + Names of the rows of the branch-to-node (B2N) matrix. + + Original COM help: https://opendss.epri.com/IncMatrixRows.html + ''' + return self._lib.Solution_Get_IncMatrixRows() @property def Laplacian(self) -> Int32Array: - self._check_for_error(self._lib.Solution_Get_Laplacian_GR()) - return self._get_int32_gr_array() + ''' + Laplacian matrix calculated in OpenDSS based on the latest branch-to-node (B2N) matrix. + + The vector represents a sparse matrix (non-zero values are the only ones delivered) and + can be interpreted as follows: The first element is the row number, the second one is + the column and the third is the value, this way, by dividing the number of elements + in the array by 3 the user can obtain the number of rows in case of wanting to sort + the vector values within a matrix. The tables for the columns and rows are the same + as the columns for the B2N columns (square matrix). + + Original COM help: https://opendss.epri.com/Laplacian.html + ''' + #TODO: expose as sparse matrix + result = self._lib.Solution_Get_Laplacian_GR() + n = len(result) + if n >= 3 and (n % 3) == 0: # Compatibility with COM + if isinstance(result, np.ndarray): + result = np.resize(result, n + 1) + result[-1] = 0 + else: + result.append(0) + + return result def SolveAll(self): - self._check_for_error(self._lib.Solution_SolveAll()) + ''' + Solves all the circuits (Actors) loaded into memory by the user. + + Original COM help: https://opendss.epri.com/SolveAll.html + ''' + self._lib.Solution_SolveAll() diff --git a/altdss/Spectrum.py b/altdss/Spectrum.py index 650054f..514bdd9 100644 --- a/altdss/Spectrum.py +++ b/altdss/Spectrum.py @@ -56,7 +56,7 @@ def _set_NumHarm(self, value: int, flags: enums.SetterFlags = 0): """ Number of frequencies in this spectrum. (See CSVFile) - DSS property name: `NumHarm`, DSS property index: 1. + Name: `NumHarm` """ def _get_Harmonic(self) -> Float64Array: @@ -72,7 +72,7 @@ def _set_Harmonic(self, value: Float64Array, flags: enums.SetterFlags = 0): harmonic = (dblfile=filename) !for packed file of doubles harmonic = (sngfile=filename) !for packed file of singles - DSS property name: `Harmonic`, DSS property index: 2. + Name: `Harmonic` """ def _get_pctMag(self) -> Float64Array: @@ -88,7 +88,7 @@ def _set_pctMag(self, value: Float64Array, flags: enums.SetterFlags = 0): %mag = (dblfile=filename) !for packed file of doubles %mag = (sngfile=filename) !for packed file of singles - DSS property name: `%Mag`, DSS property index: 3. + Name: `%Mag` """ def _get_Angle(self) -> Float64Array: @@ -104,7 +104,7 @@ def _set_Angle(self, value: Float64Array, flags: enums.SetterFlags = 0): angle = (dblfile=filename) !for packed file of doubles angle = (sngfile=filename) !for packed file of singles - DSS property name: `Angle`, DSS property index: 4. + Name: `Angle` """ def _get_CSVFile(self) -> str: @@ -117,7 +117,7 @@ def _set_CSVFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ File of spectrum points with (harmonic, magnitude-percent, angle-degrees) values, one set of 3 per line, in CSV format. If fewer than NUMHARM frequencies found in the file, NUMHARM is set to the smaller value. - DSS property name: `CSVFile`, DSS property index: 5. + Name: `CSVFile` """ def Like(self, value: AnyStr): @@ -126,7 +126,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 6. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(6, value) @@ -177,7 +179,7 @@ def _set_NumHarm(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of frequencies in this spectrum. (See CSVFile) - DSS property name: `NumHarm`, DSS property index: 1. + Name: `NumHarm` """ def _get_Harmonic(self) -> List[Float64Array]: @@ -196,7 +198,7 @@ def _set_Harmonic(self, value: Union[Float64Array, List[Float64Array]], flags: e harmonic = (dblfile=filename) !for packed file of doubles harmonic = (sngfile=filename) !for packed file of singles - DSS property name: `Harmonic`, DSS property index: 2. + Name: `Harmonic` """ def _get_pctMag(self) -> List[Float64Array]: @@ -215,7 +217,7 @@ def _set_pctMag(self, value: Union[Float64Array, List[Float64Array]], flags: enu %mag = (dblfile=filename) !for packed file of doubles %mag = (sngfile=filename) !for packed file of singles - DSS property name: `%Mag`, DSS property index: 3. + Name: `%Mag` """ def _get_Angle(self) -> List[Float64Array]: @@ -234,7 +236,7 @@ def _set_Angle(self, value: Union[Float64Array, List[Float64Array]], flags: enum angle = (dblfile=filename) !for packed file of doubles angle = (sngfile=filename) !for packed file of singles - DSS property name: `Angle`, DSS property index: 4. + Name: `Angle` """ def _get_CSVFile(self) -> List[str]: @@ -247,7 +249,7 @@ def _set_CSVFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ File of spectrum points with (harmonic, magnitude-percent, angle-degrees) values, one set of 3 per line, in CSV format. If fewer than NUMHARM frequencies found in the file, NUMHARM is set to the smaller value. - DSS property name: `CSVFile`, DSS property index: 5. + Name: `CSVFile` """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -256,7 +258,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 6. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(6, value, flags) diff --git a/altdss/Storage.py b/altdss/Storage.py index 13529b4..04066d8 100644 --- a/altdss/Storage.py +++ b/altdss/Storage.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -19,7 +19,7 @@ class Storage(DSSObj, CircuitElementMixin, PCElementMixin, ElementHasRegistersMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PCElementMixin._extra_slots + ElementHasRegistersMixin._extra_slots _cls_name = 'Storage' - _cls_idx = 29 + _cls_idx = 30 _cls_int_idx = { 1, 4, @@ -192,7 +192,8 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): """ Number of Phases, this Storage element. Power is evenly divided among phases. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Bus1(self) -> str: @@ -205,7 +206,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Bus to which the Storage element is connected. May include specific node specification. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kV(self) -> float: @@ -222,7 +223,9 @@ def _set_kV(self, value: float, flags: enums.SetterFlags = 0): If delta or phase-phase connected, specify phase-phase kV. - DSS property name: `kV`, DSS property index: 3. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_Conn(self) -> enums.Connection: @@ -238,7 +241,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection], flags: enums.Se """ ={wye|LN|delta|LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 4. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> str: @@ -251,7 +255,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={wye|LN|delta|LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 4. + Name: `Conn` + Default: Wye """ def _get_kW(self) -> float: @@ -264,7 +269,9 @@ def _set_kW(self, value: float, flags: enums.SetterFlags = 0): """ Get/set the requested kW value. Final kW is subjected to the inverter ratings. A positive value denotes power coming OUT of the element, which is the opposite of a Load element. A negative value indicates the Storage element is in Charging state. This value is modified internally depending on the dispatch mode. - DSS property name: `kW`, DSS property index: 5. + Name: `kW` + Units: kW + Default: -0.25 """ def _get_kvar(self) -> float: @@ -275,9 +282,15 @@ def _set_kvar(self, value: float, flags: enums.SetterFlags = 0): kvar = property(_get_kvar, _set_kvar) # type: float """ - Get/set the requested kvar value. Final kvar is subjected to the inverter ratings. Sets inverter to operate in constant kvar mode. + **Set:** write the **requested** kvar value. + **Get:** read the **adjusted** kvar value, subject to limits and modes. - DSS property name: `kvar`, DSS property index: 6. + The final kvar is subjected to the inverter ratings. + Setting a new value updates the inverter to operate in constant kvar mode. + + Name: `kvar` + Units: kvar + Default: 0.0 """ def _get_PF(self) -> float: @@ -294,7 +307,8 @@ def _set_PF(self, value: float, flags: enums.SetterFlags = 0): A positive power factor signifies kw and kvar at the same direction. - DSS property name: `PF`, DSS property index: 7. + Name: `PF` + Default: 1.0 """ def _get_kVA(self) -> float: @@ -307,7 +321,9 @@ def _set_kVA(self, value: float, flags: enums.SetterFlags = 0): """ Indicates the inverter nameplate capability (in kVA). Used as the base for Dynamics mode and Harmonics mode values. - DSS property name: `kVA`, DSS property index: 8. + Name: `kVA` + Units: kVA + Default: 25.0 """ def _get_pctCutIn(self) -> float: @@ -320,7 +336,8 @@ def _set_pctCutIn(self, value: float, flags: enums.SetterFlags = 0): """ Cut-in power as a percentage of inverter kVA rating. It is the minimum DC power necessary to turn the inverter ON when it is OFF. Must be greater than or equal to %CutOut. Defaults to 2 for PVSystems and 0 for Storage elements which means that the inverter state will be always ON for this element. - DSS property name: `%CutIn`, DSS property index: 9. + Name: `%CutIn` + Default: 0.0 """ def _get_pctCutOut(self) -> float: @@ -333,7 +350,8 @@ def _set_pctCutOut(self, value: float, flags: enums.SetterFlags = 0): """ Cut-out power as a percentage of inverter kVA rating. It is the minimum DC power necessary to keep the inverter ON. Must be less than or equal to %CutIn. Defaults to 0, which means that, once ON, the inverter state will be always ON for this element. - DSS property name: `%CutOut`, DSS property index: 10. + Name: `%CutOut` + Default: 0.0 """ def _get_EffCurve_str(self) -> str: @@ -346,7 +364,7 @@ def _set_EffCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter. Power at the AC side of the inverter is discounted by the multiplier obtained from this curve. - DSS property name: `EffCurve`, DSS property index: 11. + Name: `EffCurve` """ def _get_EffCurve(self) -> XYcurve: @@ -363,7 +381,7 @@ def _set_EffCurve(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags """ An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter. Power at the AC side of the inverter is discounted by the multiplier obtained from this curve. - DSS property name: `EffCurve`, DSS property index: 11. + Name: `EffCurve` """ def _get_VarFollowInverter(self) -> bool: @@ -374,9 +392,10 @@ def _set_VarFollowInverter(self, value: bool, flags: enums.SetterFlags = 0): VarFollowInverter = property(_get_VarFollowInverter, _set_VarFollowInverter) # type: bool """ - Boolean variable (Yes|No) or (True|False). Defaults to False, which indicates that the reactive power generation/absorption does not respect the inverter status.When set to True, the reactive power generation/absorption will cease when the inverter status is off, due to DC kW dropping below %CutOut. The reactive power generation/absorption will begin again when the DC kW is above %CutIn. When set to False, the Storage will generate/absorb reactive power regardless of the status of the inverter. + A false value indicates that the reactive power generation/absorption does not respect the inverter status. When set to True, the reactive power generation/absorption will cease when the inverter status is off, due to DC kW dropping below %CutOut. The reactive power generation/absorption will begin again when the DC kW is above %CutIn. When set to False, the Storage will generate/absorb reactive power regardless of the status of the inverter. - DSS property name: `VarFollowInverter`, DSS property index: 12. + Name: `VarFollowInverter` + Default: False """ def _get_kvarMax(self) -> float: @@ -389,7 +408,8 @@ def _set_kvarMax(self, value: float, flags: enums.SetterFlags = 0): """ Indicates the maximum reactive power GENERATION (un-signed numerical variable in kvar) for the inverter. Defaults to kVA rating of the inverter. - DSS property name: `kvarMax`, DSS property index: 13. + Name: `kvarMax` + Units: kvar """ def _get_kvarMaxAbs(self) -> float: @@ -402,7 +422,8 @@ def _set_kvarMaxAbs(self, value: float, flags: enums.SetterFlags = 0): """ Indicates the maximum reactive power ABSORPTION (un-signed numerical variable in kvar) for the inverter. Defaults to kvarMax. - DSS property name: `kvarMaxAbs`, DSS property index: 14. + Name: `kvarMaxAbs` + Units: kvar """ def _get_WattPriority(self) -> bool: @@ -413,9 +434,10 @@ def _set_WattPriority(self, value: bool, flags: enums.SetterFlags = 0): WattPriority = property(_get_WattPriority, _set_WattPriority) # type: bool """ - {Yes/No*/True/False} Set inverter to watt priority instead of the default var priority. + Set inverter to watt priority instead of the default var priority. - DSS property name: `WattPriority`, DSS property index: 15. + Name: `WattPriority` + Default: False """ def _get_PFPriority(self) -> bool: @@ -428,7 +450,8 @@ def _set_PFPriority(self, value: bool, flags: enums.SetterFlags = 0): """ If set to true, priority is given to power factor and WattPriority is neglected. It works only if operating in either constant PF or constant kvar modes. Defaults to False. - DSS property name: `PFPriority`, DSS property index: 16. + Name: `PFPriority` + Default: False """ def _get_pctPMinNoVars(self) -> float: @@ -441,7 +464,8 @@ def _set_pctPMinNoVars(self, value: float, flags: enums.SetterFlags = 0): """ Minimum active power as percentage of kWrated under which there is no vars production/absorption. Defaults to 0 (disabled). - DSS property name: `%PMinNoVars`, DSS property index: 17. + Name: `%PMinNoVars` + Default: 0.0 """ def _get_pctPMinkvarMax(self) -> float: @@ -454,7 +478,8 @@ def _set_pctPMinkvarMax(self, value: float, flags: enums.SetterFlags = 0): """ Minimum active power as percentage of kWrated that allows the inverter to produce/absorb reactive power up to its maximum reactive power, which can be either kvarMax or kvarMaxAbs, depending on the current operation quadrant. Defaults to 0 (disabled). - DSS property name: `%PMinkvarMax`, DSS property index: 18. + Name: `%PMinkvarMax` + Default: 0.0 """ def _get_kWRated(self) -> float: @@ -467,7 +492,9 @@ def _set_kWRated(self, value: float, flags: enums.SetterFlags = 0): """ kW rating of power output. Base for Loadshapes when DispMode=Follow. Sets kVA property if it has not been specified yet. Defaults to 25. - DSS property name: `kWRated`, DSS property index: 19. + Name: `kWRated` + Units: kW + Default: 25.0 """ def _get_pctkWRated(self) -> float: @@ -480,7 +507,8 @@ def _set_pctkWRated(self, value: float, flags: enums.SetterFlags = 0): """ Upper limit on active power as a percentage of kWrated. Defaults to 100 (disabled). - DSS property name: `%kWRated`, DSS property index: 20. + Name: `%kWRated` + Default: 100.0 """ def _get_kWhRated(self) -> float: @@ -491,9 +519,11 @@ def _set_kWhRated(self, value: float, flags: enums.SetterFlags = 0): kWhRated = property(_get_kWhRated, _set_kWhRated) # type: float """ - Rated Storage capacity in kWh. Default is 50. + Rated Storage capacity in kWh. - DSS property name: `kWhRated`, DSS property index: 21. + Name: `kWhRated` + Units: kWh + Default: 50.0 """ def _get_kWhStored(self) -> float: @@ -506,7 +536,8 @@ def _set_kWhStored(self, value: float, flags: enums.SetterFlags = 0): """ Present amount of energy stored, kWh. Default is same as kWhrated. - DSS property name: `kWhStored`, DSS property index: 22. + Name: `kWhStored` + Units: kWh """ def _get_pctStored(self) -> float: @@ -517,9 +548,10 @@ def _set_pctStored(self, value: float, flags: enums.SetterFlags = 0): pctStored = property(_get_pctStored, _set_pctStored) # type: float """ - Present amount of energy stored, % of rated kWh. Default is 100. + Present amount of energy stored, % of rated kWh. - DSS property name: `%Stored`, DSS property index: 23. + Name: `%Stored` + Default: 100.0 """ def _get_pctReserve(self) -> float: @@ -530,10 +562,11 @@ def _set_pctReserve(self, value: float, flags: enums.SetterFlags = 0): pctReserve = property(_get_pctReserve, _set_pctReserve) # type: float """ - Percentage of rated kWh Storage capacity to be held in reserve for normal operation. Default = 20. + Percentage of rated kWh Storage capacity to be held in reserve for normal operation. This is treated as the minimum energy discharge level unless there is an emergency. For emergency operation set this property lower. Cannot be less than zero. - DSS property name: `%Reserve`, DSS property index: 24. + Name: `%Reserve` + Default: 20.0 """ def _get_State(self) -> enums.StorageState: @@ -549,7 +582,8 @@ def _set_State(self, value: Union[AnyStr, int, enums.StorageState], flags: enums """ {IDLING | CHARGING | DISCHARGING} Get/Set present operational state. In DISCHARGING mode, the Storage element acts as a generator and the kW property is positive. The element continues discharging at the scheduled output power level until the Storage reaches the reserve value. Then the state reverts to IDLING. In the CHARGING state, the Storage element behaves like a Load and the kW property is negative. The element continues to charge until the max Storage kWh is reached and then switches to IDLING state. In IDLING state, the element draws the idling losses plus the associated inverter losses. - DSS property name: `State`, DSS property index: 25. + Name: `State` + Default: Idling """ def _get_State_str(self) -> str: @@ -562,7 +596,8 @@ def _set_State_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ {IDLING | CHARGING | DISCHARGING} Get/Set present operational state. In DISCHARGING mode, the Storage element acts as a generator and the kW property is positive. The element continues discharging at the scheduled output power level until the Storage reaches the reserve value. Then the state reverts to IDLING. In the CHARGING state, the Storage element behaves like a Load and the kW property is negative. The element continues to charge until the max Storage kWh is reached and then switches to IDLING state. In IDLING state, the element draws the idling losses plus the associated inverter losses. - DSS property name: `State`, DSS property index: 25. + Name: `State` + Default: Idling """ def _get_pctDischarge(self) -> float: @@ -573,9 +608,10 @@ def _set_pctDischarge(self, value: float, flags: enums.SetterFlags = 0): pctDischarge = property(_get_pctDischarge, _set_pctDischarge) # type: float """ - Discharge rate (output power) in percentage of rated kW. Default = 100. + Discharge rate (output power) in percentage of rated kW. - DSS property name: `%Discharge`, DSS property index: 26. + Name: `%Discharge` + Default: 100.0 """ def _get_pctCharge(self) -> float: @@ -586,9 +622,10 @@ def _set_pctCharge(self, value: float, flags: enums.SetterFlags = 0): pctCharge = property(_get_pctCharge, _set_pctCharge) # type: float """ - Charging rate (input power) in percentage of rated kW. Default = 100. + Charging rate (input power) in percentage of rated kW. - DSS property name: `%Charge`, DSS property index: 27. + Name: `%Charge` + Default: 100.0 """ def _get_pctEffCharge(self) -> float: @@ -599,9 +636,10 @@ def _set_pctEffCharge(self, value: float, flags: enums.SetterFlags = 0): pctEffCharge = property(_get_pctEffCharge, _set_pctEffCharge) # type: float """ - Percentage efficiency for CHARGING the Storage element. Default = 90. + Percentage efficiency for CHARGING the Storage element. - DSS property name: `%EffCharge`, DSS property index: 28. + Name: `%EffCharge` + Default: 90.0 """ def _get_pctEffDischarge(self) -> float: @@ -612,9 +650,10 @@ def _set_pctEffDischarge(self, value: float, flags: enums.SetterFlags = 0): pctEffDischarge = property(_get_pctEffDischarge, _set_pctEffDischarge) # type: float """ - Percentage efficiency for DISCHARGING the Storage element. Default = 90. + Percentage efficiency for DISCHARGING the Storage element. - DSS property name: `%EffDischarge`, DSS property index: 29. + Name: `%EffDischarge` + Default: 90.0 """ def _get_pctIdlingkW(self) -> float: @@ -625,9 +664,10 @@ def _set_pctIdlingkW(self, value: float, flags: enums.SetterFlags = 0): pctIdlingkW = property(_get_pctIdlingkW, _set_pctIdlingkW) # type: float """ - Percentage of rated kW consumed by idling losses. Default = 1. + Percentage of rated kW consumed by idling losses. - DSS property name: `%IdlingkW`, DSS property index: 30. + Name: `%IdlingkW` + Default: 1.0 """ def _get_pctR(self) -> float: @@ -638,9 +678,10 @@ def _set_pctR(self, value: float, flags: enums.SetterFlags = 0): pctR = property(_get_pctR, _set_pctR) # type: float """ - Equivalent percentage internal resistance, ohms. Default is 0. Placed in series with internal voltage source for harmonics and dynamics modes. Use a combination of %IdlingkW, %EffCharge and %EffDischarge to account for losses in power flow modes. + Equivalent percentage internal resistance, ohms. Placed in series with internal voltage source for harmonics and dynamics modes. Use a combination of %IdlingkW, %EffCharge and %EffDischarge to account for losses in power flow modes. - DSS property name: `%R`, DSS property index: 32. + Name: `%R` + Default: 0.0 """ def _get_pctX(self) -> float: @@ -651,9 +692,10 @@ def _set_pctX(self, value: float, flags: enums.SetterFlags = 0): pctX = property(_get_pctX, _set_pctX) # type: float """ - Equivalent percentage internal reactance, ohms. Default is 50%. Placed in series with internal voltage source for harmonics and dynamics modes. (Limits fault current to 2 pu. + Equivalent percentage internal reactance, ohms. Placed in series with internal voltage source for harmonics and dynamics modes. (Limits fault current to 2 pu. - DSS property name: `%X`, DSS property index: 33. + Name: `%X` + Default: 50.0 """ def _get_Model(self) -> int: @@ -670,7 +712,8 @@ def _set_Model(self, value: int, flags: enums.SetterFlags = 0): 2:Storage element is modeled as a CONSTANT IMPEDANCE. 3:Compute load injection from User-written Model. - DSS property name: `Model`, DSS property index: 34. + Name: `Model` + Default: 1 """ def _get_VMinpu(self) -> float: @@ -683,7 +726,8 @@ def _set_VMinpu(self, value: float, flags: enums.SetterFlags = 0): """ Default = 0.90. Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model. - DSS property name: `VMinpu`, DSS property index: 35. + Name: `VMinpu` + Default: 0.9 """ def _get_VMaxpu(self) -> float: @@ -696,7 +740,8 @@ def _set_VMaxpu(self, value: float, flags: enums.SetterFlags = 0): """ Default = 1.10. Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model. - DSS property name: `VMaxpu`, DSS property index: 36. + Name: `VMaxpu` + Default: 1.1 """ def _get_Balanced(self) -> bool: @@ -707,9 +752,10 @@ def _set_Balanced(self, value: bool, flags: enums.SetterFlags = 0): Balanced = property(_get_Balanced, _set_Balanced) # type: bool """ - {Yes | No*} Default is No. Force balanced current only for 3-phase Storage. Forces zero- and negative-sequence to zero. + Force balanced current only for 3-phase Storage. Forces zero- and negative-sequence to zero. - DSS property name: `Balanced`, DSS property index: 37. + Name: `Balanced` + Default: False """ def _get_LimitCurrent(self) -> bool: @@ -722,7 +768,8 @@ def _set_LimitCurrent(self, value: bool, flags: enums.SetterFlags = 0): """ Limits current magnitude to Vminpu value for both 1-phase and 3-phase Storage similar to Generator Model 7. For 3-phase, limits the positive-sequence current but not the negative-sequence. - DSS property name: `LimitCurrent`, DSS property index: 38. + Name: `LimitCurrent` + Default: False """ def _get_Yearly_str(self) -> str: @@ -735,7 +782,7 @@ def _set_Yearly_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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 Storage element uses this loadshape to trigger State changes. - DSS property name: `Yearly`, DSS property index: 39. + Name: `Yearly` """ def _get_Yearly(self) -> LoadShape: @@ -752,7 +799,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags """ 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 Storage element uses this loadshape to trigger State changes. - DSS property name: `Yearly`, DSS property index: 39. + Name: `Yearly` """ def _get_Daily_str(self) -> str: @@ -765,7 +812,7 @@ def _set_Daily_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ 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 Storage element uses this loadshape to trigger State changes. - DSS property name: `Daily`, DSS property index: 40. + Name: `Daily` """ def _get_Daily(self) -> LoadShape: @@ -782,7 +829,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ 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 Storage element uses this loadshape to trigger State changes. - DSS property name: `Daily`, DSS property index: 40. + Name: `Daily` """ def _get_Duty_str(self) -> str: @@ -799,7 +846,7 @@ def _set_Duty_str(self, value: AnyStr, flags: enums.SetterFlags = 0): 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. - DSS property name: `Duty`, DSS property index: 41. + Name: `Duty` """ def _get_Duty(self) -> LoadShape: @@ -820,7 +867,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = 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. - DSS property name: `Duty`, DSS property index: 41. + Name: `Duty` """ def _get_DispMode(self) -> enums.StorageDispatchMode: @@ -844,7 +891,8 @@ def _set_DispMode(self, value: Union[AnyStr, int, enums.StorageDispatchMode], fl For the other two dispatch modes, the Storage element state is controlled by either the global default Loadlevel value or the price level. - DSS property name: `DispMode`, DSS property index: 42. + Name: `DispMode` + Default: Default """ def _get_DispMode_str(self) -> str: @@ -865,7 +913,8 @@ def _set_DispMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): For the other two dispatch modes, the Storage element state is controlled by either the global default Loadlevel value or the price level. - DSS property name: `DispMode`, DSS property index: 42. + Name: `DispMode` + Default: Default """ def _get_DischargeTrigger(self) -> float: @@ -877,10 +926,11 @@ def _set_DischargeTrigger(self, value: float, flags: enums.SetterFlags = 0): DischargeTrigger = property(_get_DischargeTrigger, _set_DischargeTrigger) # type: float """ Dispatch trigger value for discharging the Storage. - If = 0.0 the Storage element state is changed by the State command or by a StorageController object. - If <> 0 the Storage element state is set to DISCHARGING when this trigger level is EXCEEDED by either the specified Loadshape curve value or the price signal or global Loadlevel value, depending on dispatch mode. See State property. + If = 0 the Storage element state is changed by the State command or by a StorageController object. + If ≠ 0 the Storage element state is set to DISCHARGING when this trigger level is EXCEEDED by either the specified Loadshape curve value or the price signal or global Loadlevel value, depending on dispatch mode. See State property. - DSS property name: `DischargeTrigger`, DSS property index: 43. + Name: `DischargeTrigger` + Default: 0.0 """ def _get_ChargeTrigger(self) -> float: @@ -893,11 +943,12 @@ def _set_ChargeTrigger(self, value: float, flags: enums.SetterFlags = 0): """ Dispatch trigger value for charging the Storage. - If = 0.0 the Storage element state is changed by the State command or StorageController object. + If = 0 the Storage element state is changed by the State command or StorageController object. - If <> 0 the Storage element state is set to CHARGING when this trigger level is GREATER than either the specified Loadshape curve value or the price signal or global Loadlevel value, depending on dispatch mode. See State property. + If ≠ 0 the Storage element state is set to CHARGING when this trigger level is GREATER than either the specified Loadshape curve value or the price signal or global Loadlevel value, depending on dispatch mode. See State property. - DSS property name: `ChargeTrigger`, DSS property index: 44. + Name: `ChargeTrigger` + Default: 0.0 """ def _get_TimeChargeTrig(self) -> float: @@ -908,9 +959,11 @@ def _set_TimeChargeTrig(self, value: float, flags: enums.SetterFlags = 0): TimeChargeTrig = property(_get_TimeChargeTrig, _set_TimeChargeTrig) # type: float """ - Time of day in fractional hours (0230 = 2.5) at which Storage element will automatically go into charge state. Default is 2.0. Enter a negative time value to disable this feature. + Time of day in fractional hours (0230 = 2.5) at which Storage element will automatically go into charge state. Enter a negative time value to disable this feature. - DSS property name: `TimeChargeTrig`, DSS property index: 45. + Name: `TimeChargeTrig` + Units: hour (0-24) + Default: 2.0 """ def _get_Class(self) -> int: @@ -923,7 +976,8 @@ def _set_Class(self, value: int, flags: enums.SetterFlags = 0): """ An arbitrary integer number representing the class of Storage element so that Storage values may be segregated by class. - DSS property name: `Class`, DSS property index: 46. + Name: `Class` + Default: 1 """ def _get_DynaDLL(self) -> str: @@ -936,7 +990,7 @@ def _set_DynaDLL(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of DLL containing user-written dynamics model, which computes the terminal currents for Dynamics-mode simulations, overriding the default model. Set to "none" to negate previous setting. This DLL has a simpler interface than the UserModel DLL and is only used for Dynamics mode. - DSS property name: `DynaDLL`, DSS property index: 47. + Name: `DynaDLL` """ def _get_DynaData(self) -> str: @@ -949,7 +1003,7 @@ def _set_DynaData(self, value: AnyStr, flags: enums.SetterFlags = 0): """ String (in quotes or parentheses if necessary) that gets passed to the user-written dynamics model Edit function for defining the data required for that model. - DSS property name: `DynaData`, DSS property index: 48. + Name: `DynaData` """ def _get_UserModel(self) -> str: @@ -962,7 +1016,7 @@ def _set_UserModel(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of DLL containing user-written model, which computes the terminal currents for both power flow and dynamics, overriding the default model. Set to "none" to negate previous setting. - DSS property name: `UserModel`, DSS property index: 49. + Name: `UserModel` """ def _get_UserData(self) -> str: @@ -975,7 +1029,7 @@ def _set_UserData(self, value: AnyStr, flags: enums.SetterFlags = 0): """ String (in quotes or parentheses) that gets passed to user-written model for defining the data required for that model. - DSS property name: `UserData`, DSS property index: 50. + Name: `UserData` """ def _get_DebugTrace(self) -> bool: @@ -986,9 +1040,10 @@ def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: bool """ - {Yes | No } Default is no. Turn this on to capture the progress of the Storage model for each iteration. Creates a separate file for each Storage element named "Storage_name.csv". + Turn this on to capture the progress of the Storage model for each iteration. Creates a separate file for each Storage element named "Storage_name.csv". - DSS property name: `DebugTrace`, DSS property index: 51. + Name: `DebugTrace` + Default: False """ def _get_kVDC(self) -> float: @@ -1001,7 +1056,9 @@ def _set_kVDC(self, value: float, flags: enums.SetterFlags = 0): """ Indicates the rated voltage (kV) at the input of the inverter while the storage is discharging. The value is normally greater or equal to the kV base of the Storage device. It is used for dynamics simulation ONLY. - DSS property name: `kVDC`, DSS property index: 52. + Name: `kVDC` + Units: kV + Default: 8.0 """ def _get_Kp(self) -> float: @@ -1014,7 +1071,8 @@ def _set_Kp(self, value: float, flags: enums.SetterFlags = 0): """ It is the proportional gain for the PI controller within the inverter. Use it to modify the controller response in dynamics simulation mode. - DSS property name: `Kp`, DSS property index: 53. + Name: `Kp` + Default: 0.01 """ def _get_PITol(self) -> float: @@ -1027,7 +1085,8 @@ def _set_PITol(self, value: float, flags: enums.SetterFlags = 0): """ It is the tolerance (%) for the closed loop controller of the inverter. For dynamics simulation mode. - DSS property name: `PITol`, DSS property index: 54. + Name: `PITol` + Default: 0.0 """ def _get_SafeVoltage(self) -> float: @@ -1040,7 +1099,8 @@ def _set_SafeVoltage(self, value: float, flags: enums.SetterFlags = 0): """ Indicates the voltage level (%) respect to the base voltage level for which the Inverter will operate. If this threshold is violated, the Inverter will enter safe mode (OFF). For dynamic simulation. By default is 80%. - DSS property name: `SafeVoltage`, DSS property index: 55. + Name: `SafeVoltage` + Default: 80.0 """ def _get_SafeMode(self) -> bool: @@ -1053,7 +1113,9 @@ def _set_SafeMode(self, value: bool, flags: enums.SetterFlags = 0): """ (Read only) Indicates whether the inverter entered (Yes) or not (No) into Safe Mode. - DSS property name: `SafeMode`, DSS property index: 56. + **Read-only** + + Name: `SafeMode` """ def _get_DynamicEq_str(self) -> str: @@ -1066,7 +1128,7 @@ def _set_DynamicEq_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. If not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 57. + Name: `DynamicEq` """ def _get_DynamicEq(self) -> DynamicExp: @@ -1083,7 +1145,7 @@ def _set_DynamicEq(self, value: Union[AnyStr, DynamicExp], flags: enums.SetterFl """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. If not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 57. + Name: `DynamicEq` """ def _get_DynOut(self) -> List[str]: @@ -1102,7 +1164,7 @@ def _set_DynOut(self, value: List[AnyStr], flags: enums.SetterFlags = 0): The output variables need to be defined in the same order. - DSS property name: `DynOut`, DSS property index: 58. + Name: `DynOut` """ def _get_ControlMode(self) -> enums.InverterControlMode: @@ -1116,11 +1178,12 @@ def _set_ControlMode(self, value: Union[AnyStr, int, enums.InverterControlMode], ControlMode = property(_get_ControlMode, _set_ControlMode) # type: enums.InverterControlMode """ - Defines the control mode for the inverter. It can be one of {GFM | GFL*}. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. + Defines the control mode for the inverter. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. GFM control mode disables any control action set by the InvControl device. - DSS property name: `ControlMode`, DSS property index: 59. + Name: `ControlMode` + Default: GFL """ def _get_ControlMode_str(self) -> str: @@ -1131,11 +1194,12 @@ def _set_ControlMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ControlMode_str = property(_get_ControlMode_str, _set_ControlMode_str) # type: str """ - Defines the control mode for the inverter. It can be one of {GFM | GFL*}. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. + Defines the control mode for the inverter. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. GFM control mode disables any control action set by the InvControl device. - DSS property name: `ControlMode`, DSS property index: 59. + Name: `ControlMode` + Default: GFL """ def _get_AmpLimit(self) -> float: @@ -1149,7 +1213,8 @@ def _set_AmpLimit(self, value: float, flags: enums.SetterFlags = 0): The current limiter per phase for the IBR when operating in GFM mode. This limit is imposed to prevent the IBR to enter into Safe Mode when reaching the IBR power ratings. Once the IBR reaches this value, it remains there without moving into Safe Mode. This value needs to be set lower than the IBR Amps rating. - DSS property name: `AmpLimit`, DSS property index: 60. + Name: `AmpLimit` + Units: A """ def _get_AmpLimitGain(self) -> float: @@ -1162,7 +1227,8 @@ def _set_AmpLimitGain(self, value: float, flags: enums.SetterFlags = 0): """ Use it for fine tunning the current limiter when active, by default is 0.8, it has to be a value between 0.1 and 1. This value allows users to fine tune the IBRs current limiter to match with the user requirements. - DSS property name: `AmpLimitGain`, DSS property index: 61. + Name: `AmpLimitGain` + Default: 0.8 """ def _get_Spectrum_str(self) -> str: @@ -1173,9 +1239,9 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str """ - Name of harmonic voltage or current spectrum for this Storage element. Current injection is assumed for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this Storage element. Current injection is assumed for inverter. - DSS property name: `Spectrum`, DSS property index: 62. + Name: `Spectrum` """ def _get_Spectrum(self) -> SpectrumObj: @@ -1190,9 +1256,9 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj """ - Name of harmonic voltage or current spectrum for this Storage element. Current injection is assumed for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this Storage element. Current injection is assumed for inverter. - DSS property name: `Spectrum`, DSS property index: 62. + Name: `Spectrum` """ def _get_BaseFreq(self) -> float: @@ -1205,7 +1271,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 63. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -1216,9 +1283,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 64. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -1227,7 +1295,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 65. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(65, value) @@ -1301,7 +1371,7 @@ class StorageProperties(TypedDict): class StorageBatch(DSSBatch, CircuitElementBatchMixin, PCElementBatchMixin): _cls_name = 'Storage' _obj_cls = Storage - _cls_idx = 29 + _cls_idx = 30 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -1340,7 +1410,8 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of Phases, this Storage element. Power is evenly divided among phases. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Bus1(self) -> List[str]: @@ -1353,7 +1424,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Bus to which the Storage element is connected. May include specific node specification. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kV(self) -> BatchFloat64ArrayProxy: @@ -1370,7 +1441,9 @@ def _set_kV(self, value: Union[float, Float64Array], flags: enums.SetterFlags = If delta or phase-phase connected, specify phase-phase kV. - DSS property name: `kV`, DSS property index: 3. + Name: `kV` + Units: kV + Default: 12.47 """ def _get_Conn(self) -> BatchInt32ArrayProxy: @@ -1387,7 +1460,8 @@ def _set_Conn(self, value: Union[AnyStr, int, enums.Connection, List[AnyStr], Li """ ={wye|LN|delta|LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 4. + Name: `Conn` + Default: Wye """ def _get_Conn_str(self) -> List[str]: @@ -1400,7 +1474,8 @@ def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ ={wye|LN|delta|LL}. Default is wye. - DSS property name: `Conn`, DSS property index: 4. + Name: `Conn` + Default: Wye """ def _get_kW(self) -> BatchFloat64ArrayProxy: @@ -1413,7 +1488,9 @@ def _set_kW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Get/set the requested kW value. Final kW is subjected to the inverter ratings. A positive value denotes power coming OUT of the element, which is the opposite of a Load element. A negative value indicates the Storage element is in Charging state. This value is modified internally depending on the dispatch mode. - DSS property name: `kW`, DSS property index: 5. + Name: `kW` + Units: kW + Default: -0.25 """ def _get_kvar(self) -> BatchFloat64ArrayProxy: @@ -1424,9 +1501,15 @@ def _set_kvar(self, value: Union[float, Float64Array], flags: enums.SetterFlags kvar = property(_get_kvar, _set_kvar) # type: BatchFloat64ArrayProxy """ - Get/set the requested kvar value. Final kvar is subjected to the inverter ratings. Sets inverter to operate in constant kvar mode. + **Set:** write the **requested** kvar value. + **Get:** read the **adjusted** kvar value, subject to limits and modes. + + The final kvar is subjected to the inverter ratings. + Setting a new value updates the inverter to operate in constant kvar mode. - DSS property name: `kvar`, DSS property index: 6. + Name: `kvar` + Units: kvar + Default: 0.0 """ def _get_PF(self) -> BatchFloat64ArrayProxy: @@ -1443,7 +1526,8 @@ def _set_PF(self, value: Union[float, Float64Array], flags: enums.SetterFlags = A positive power factor signifies kw and kvar at the same direction. - DSS property name: `PF`, DSS property index: 7. + Name: `PF` + Default: 1.0 """ def _get_kVA(self) -> BatchFloat64ArrayProxy: @@ -1456,7 +1540,9 @@ def _set_kVA(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Indicates the inverter nameplate capability (in kVA). Used as the base for Dynamics mode and Harmonics mode values. - DSS property name: `kVA`, DSS property index: 8. + Name: `kVA` + Units: kVA + Default: 25.0 """ def _get_pctCutIn(self) -> BatchFloat64ArrayProxy: @@ -1469,7 +1555,8 @@ def _set_pctCutIn(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Cut-in power as a percentage of inverter kVA rating. It is the minimum DC power necessary to turn the inverter ON when it is OFF. Must be greater than or equal to %CutOut. Defaults to 2 for PVSystems and 0 for Storage elements which means that the inverter state will be always ON for this element. - DSS property name: `%CutIn`, DSS property index: 9. + Name: `%CutIn` + Default: 0.0 """ def _get_pctCutOut(self) -> BatchFloat64ArrayProxy: @@ -1482,7 +1569,8 @@ def _set_pctCutOut(self, value: Union[float, Float64Array], flags: enums.SetterF """ Cut-out power as a percentage of inverter kVA rating. It is the minimum DC power necessary to keep the inverter ON. Must be less than or equal to %CutIn. Defaults to 0, which means that, once ON, the inverter state will be always ON for this element. - DSS property name: `%CutOut`, DSS property index: 10. + Name: `%CutOut` + Default: 0.0 """ def _get_EffCurve_str(self) -> List[str]: @@ -1495,7 +1583,7 @@ def _set_EffCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set """ An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter. Power at the AC side of the inverter is discounted by the multiplier obtained from this curve. - DSS property name: `EffCurve`, DSS property index: 11. + Name: `EffCurve` """ def _get_EffCurve(self) -> List[XYcurve]: @@ -1508,7 +1596,7 @@ def _set_EffCurve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve """ An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter. Power at the AC side of the inverter is discounted by the multiplier obtained from this curve. - DSS property name: `EffCurve`, DSS property index: 11. + Name: `EffCurve` """ def _get_VarFollowInverter(self) -> List[bool]: @@ -1516,14 +1604,15 @@ def _get_VarFollowInverter(self) -> List[bool]: self._get_batch_int32_prop(12) ] - def _set_VarFollowInverter(self, value: bool, flags: enums.SetterFlags = 0): + def _set_VarFollowInverter(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(12, value, flags) VarFollowInverter = property(_get_VarFollowInverter, _set_VarFollowInverter) # type: List[bool] """ - Boolean variable (Yes|No) or (True|False). Defaults to False, which indicates that the reactive power generation/absorption does not respect the inverter status.When set to True, the reactive power generation/absorption will cease when the inverter status is off, due to DC kW dropping below %CutOut. The reactive power generation/absorption will begin again when the DC kW is above %CutIn. When set to False, the Storage will generate/absorb reactive power regardless of the status of the inverter. + A false value indicates that the reactive power generation/absorption does not respect the inverter status. When set to True, the reactive power generation/absorption will cease when the inverter status is off, due to DC kW dropping below %CutOut. The reactive power generation/absorption will begin again when the DC kW is above %CutIn. When set to False, the Storage will generate/absorb reactive power regardless of the status of the inverter. - DSS property name: `VarFollowInverter`, DSS property index: 12. + Name: `VarFollowInverter` + Default: False """ def _get_kvarMax(self) -> BatchFloat64ArrayProxy: @@ -1536,7 +1625,8 @@ def _set_kvarMax(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Indicates the maximum reactive power GENERATION (un-signed numerical variable in kvar) for the inverter. Defaults to kVA rating of the inverter. - DSS property name: `kvarMax`, DSS property index: 13. + Name: `kvarMax` + Units: kvar """ def _get_kvarMaxAbs(self) -> BatchFloat64ArrayProxy: @@ -1549,7 +1639,8 @@ def _set_kvarMaxAbs(self, value: Union[float, Float64Array], flags: enums.Setter """ Indicates the maximum reactive power ABSORPTION (un-signed numerical variable in kvar) for the inverter. Defaults to kvarMax. - DSS property name: `kvarMaxAbs`, DSS property index: 14. + Name: `kvarMaxAbs` + Units: kvar """ def _get_WattPriority(self) -> List[bool]: @@ -1557,14 +1648,15 @@ def _get_WattPriority(self) -> List[bool]: self._get_batch_int32_prop(15) ] - def _set_WattPriority(self, value: bool, flags: enums.SetterFlags = 0): + def _set_WattPriority(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(15, value, flags) WattPriority = property(_get_WattPriority, _set_WattPriority) # type: List[bool] """ - {Yes/No*/True/False} Set inverter to watt priority instead of the default var priority. + Set inverter to watt priority instead of the default var priority. - DSS property name: `WattPriority`, DSS property index: 15. + Name: `WattPriority` + Default: False """ def _get_PFPriority(self) -> List[bool]: @@ -1572,14 +1664,15 @@ def _get_PFPriority(self) -> List[bool]: self._get_batch_int32_prop(16) ] - def _set_PFPriority(self, value: bool, flags: enums.SetterFlags = 0): + def _set_PFPriority(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(16, value, flags) PFPriority = property(_get_PFPriority, _set_PFPriority) # type: List[bool] """ If set to true, priority is given to power factor and WattPriority is neglected. It works only if operating in either constant PF or constant kvar modes. Defaults to False. - DSS property name: `PFPriority`, DSS property index: 16. + Name: `PFPriority` + Default: False """ def _get_pctPMinNoVars(self) -> BatchFloat64ArrayProxy: @@ -1592,7 +1685,8 @@ def _set_pctPMinNoVars(self, value: Union[float, Float64Array], flags: enums.Set """ Minimum active power as percentage of kWrated under which there is no vars production/absorption. Defaults to 0 (disabled). - DSS property name: `%PMinNoVars`, DSS property index: 17. + Name: `%PMinNoVars` + Default: 0.0 """ def _get_pctPMinkvarMax(self) -> BatchFloat64ArrayProxy: @@ -1605,7 +1699,8 @@ def _set_pctPMinkvarMax(self, value: Union[float, Float64Array], flags: enums.Se """ Minimum active power as percentage of kWrated that allows the inverter to produce/absorb reactive power up to its maximum reactive power, which can be either kvarMax or kvarMaxAbs, depending on the current operation quadrant. Defaults to 0 (disabled). - DSS property name: `%PMinkvarMax`, DSS property index: 18. + Name: `%PMinkvarMax` + Default: 0.0 """ def _get_kWRated(self) -> BatchFloat64ArrayProxy: @@ -1618,7 +1713,9 @@ def _set_kWRated(self, value: Union[float, Float64Array], flags: enums.SetterFla """ kW rating of power output. Base for Loadshapes when DispMode=Follow. Sets kVA property if it has not been specified yet. Defaults to 25. - DSS property name: `kWRated`, DSS property index: 19. + Name: `kWRated` + Units: kW + Default: 25.0 """ def _get_pctkWRated(self) -> BatchFloat64ArrayProxy: @@ -1631,7 +1728,8 @@ def _set_pctkWRated(self, value: Union[float, Float64Array], flags: enums.Setter """ Upper limit on active power as a percentage of kWrated. Defaults to 100 (disabled). - DSS property name: `%kWRated`, DSS property index: 20. + Name: `%kWRated` + Default: 100.0 """ def _get_kWhRated(self) -> BatchFloat64ArrayProxy: @@ -1642,9 +1740,11 @@ def _set_kWhRated(self, value: Union[float, Float64Array], flags: enums.SetterFl kWhRated = property(_get_kWhRated, _set_kWhRated) # type: BatchFloat64ArrayProxy """ - Rated Storage capacity in kWh. Default is 50. + Rated Storage capacity in kWh. - DSS property name: `kWhRated`, DSS property index: 21. + Name: `kWhRated` + Units: kWh + Default: 50.0 """ def _get_kWhStored(self) -> BatchFloat64ArrayProxy: @@ -1657,7 +1757,8 @@ def _set_kWhStored(self, value: Union[float, Float64Array], flags: enums.SetterF """ Present amount of energy stored, kWh. Default is same as kWhrated. - DSS property name: `kWhStored`, DSS property index: 22. + Name: `kWhStored` + Units: kWh """ def _get_pctStored(self) -> BatchFloat64ArrayProxy: @@ -1668,9 +1769,10 @@ def _set_pctStored(self, value: Union[float, Float64Array], flags: enums.SetterF pctStored = property(_get_pctStored, _set_pctStored) # type: BatchFloat64ArrayProxy """ - Present amount of energy stored, % of rated kWh. Default is 100. + Present amount of energy stored, % of rated kWh. - DSS property name: `%Stored`, DSS property index: 23. + Name: `%Stored` + Default: 100.0 """ def _get_pctReserve(self) -> BatchFloat64ArrayProxy: @@ -1681,10 +1783,11 @@ def _set_pctReserve(self, value: Union[float, Float64Array], flags: enums.Setter pctReserve = property(_get_pctReserve, _set_pctReserve) # type: BatchFloat64ArrayProxy """ - Percentage of rated kWh Storage capacity to be held in reserve for normal operation. Default = 20. + Percentage of rated kWh Storage capacity to be held in reserve for normal operation. This is treated as the minimum energy discharge level unless there is an emergency. For emergency operation set this property lower. Cannot be less than zero. - DSS property name: `%Reserve`, DSS property index: 24. + Name: `%Reserve` + Default: 20.0 """ def _get_State(self) -> BatchInt32ArrayProxy: @@ -1701,7 +1804,8 @@ def _set_State(self, value: Union[AnyStr, int, enums.StorageState, List[AnyStr], """ {IDLING | CHARGING | DISCHARGING} Get/Set present operational state. In DISCHARGING mode, the Storage element acts as a generator and the kW property is positive. The element continues discharging at the scheduled output power level until the Storage reaches the reserve value. Then the state reverts to IDLING. In the CHARGING state, the Storage element behaves like a Load and the kW property is negative. The element continues to charge until the max Storage kWh is reached and then switches to IDLING state. In IDLING state, the element draws the idling losses plus the associated inverter losses. - DSS property name: `State`, DSS property index: 25. + Name: `State` + Default: Idling """ def _get_State_str(self) -> List[str]: @@ -1714,7 +1818,8 @@ def _set_State_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ {IDLING | CHARGING | DISCHARGING} Get/Set present operational state. In DISCHARGING mode, the Storage element acts as a generator and the kW property is positive. The element continues discharging at the scheduled output power level until the Storage reaches the reserve value. Then the state reverts to IDLING. In the CHARGING state, the Storage element behaves like a Load and the kW property is negative. The element continues to charge until the max Storage kWh is reached and then switches to IDLING state. In IDLING state, the element draws the idling losses plus the associated inverter losses. - DSS property name: `State`, DSS property index: 25. + Name: `State` + Default: Idling """ def _get_pctDischarge(self) -> BatchFloat64ArrayProxy: @@ -1725,9 +1830,10 @@ def _set_pctDischarge(self, value: Union[float, Float64Array], flags: enums.Sett pctDischarge = property(_get_pctDischarge, _set_pctDischarge) # type: BatchFloat64ArrayProxy """ - Discharge rate (output power) in percentage of rated kW. Default = 100. + Discharge rate (output power) in percentage of rated kW. - DSS property name: `%Discharge`, DSS property index: 26. + Name: `%Discharge` + Default: 100.0 """ def _get_pctCharge(self) -> BatchFloat64ArrayProxy: @@ -1738,9 +1844,10 @@ def _set_pctCharge(self, value: Union[float, Float64Array], flags: enums.SetterF pctCharge = property(_get_pctCharge, _set_pctCharge) # type: BatchFloat64ArrayProxy """ - Charging rate (input power) in percentage of rated kW. Default = 100. + Charging rate (input power) in percentage of rated kW. - DSS property name: `%Charge`, DSS property index: 27. + Name: `%Charge` + Default: 100.0 """ def _get_pctEffCharge(self) -> BatchFloat64ArrayProxy: @@ -1751,9 +1858,10 @@ def _set_pctEffCharge(self, value: Union[float, Float64Array], flags: enums.Sett pctEffCharge = property(_get_pctEffCharge, _set_pctEffCharge) # type: BatchFloat64ArrayProxy """ - Percentage efficiency for CHARGING the Storage element. Default = 90. + Percentage efficiency for CHARGING the Storage element. - DSS property name: `%EffCharge`, DSS property index: 28. + Name: `%EffCharge` + Default: 90.0 """ def _get_pctEffDischarge(self) -> BatchFloat64ArrayProxy: @@ -1764,9 +1872,10 @@ def _set_pctEffDischarge(self, value: Union[float, Float64Array], flags: enums.S pctEffDischarge = property(_get_pctEffDischarge, _set_pctEffDischarge) # type: BatchFloat64ArrayProxy """ - Percentage efficiency for DISCHARGING the Storage element. Default = 90. + Percentage efficiency for DISCHARGING the Storage element. - DSS property name: `%EffDischarge`, DSS property index: 29. + Name: `%EffDischarge` + Default: 90.0 """ def _get_pctIdlingkW(self) -> BatchFloat64ArrayProxy: @@ -1777,9 +1886,10 @@ def _set_pctIdlingkW(self, value: Union[float, Float64Array], flags: enums.Sette pctIdlingkW = property(_get_pctIdlingkW, _set_pctIdlingkW) # type: BatchFloat64ArrayProxy """ - Percentage of rated kW consumed by idling losses. Default = 1. + Percentage of rated kW consumed by idling losses. - DSS property name: `%IdlingkW`, DSS property index: 30. + Name: `%IdlingkW` + Default: 1.0 """ def _get_pctR(self) -> BatchFloat64ArrayProxy: @@ -1790,9 +1900,10 @@ def _set_pctR(self, value: Union[float, Float64Array], flags: enums.SetterFlags pctR = property(_get_pctR, _set_pctR) # type: BatchFloat64ArrayProxy """ - Equivalent percentage internal resistance, ohms. Default is 0. Placed in series with internal voltage source for harmonics and dynamics modes. Use a combination of %IdlingkW, %EffCharge and %EffDischarge to account for losses in power flow modes. + Equivalent percentage internal resistance, ohms. Placed in series with internal voltage source for harmonics and dynamics modes. Use a combination of %IdlingkW, %EffCharge and %EffDischarge to account for losses in power flow modes. - DSS property name: `%R`, DSS property index: 32. + Name: `%R` + Default: 0.0 """ def _get_pctX(self) -> BatchFloat64ArrayProxy: @@ -1803,9 +1914,10 @@ def _set_pctX(self, value: Union[float, Float64Array], flags: enums.SetterFlags pctX = property(_get_pctX, _set_pctX) # type: BatchFloat64ArrayProxy """ - Equivalent percentage internal reactance, ohms. Default is 50%. Placed in series with internal voltage source for harmonics and dynamics modes. (Limits fault current to 2 pu. + Equivalent percentage internal reactance, ohms. Placed in series with internal voltage source for harmonics and dynamics modes. (Limits fault current to 2 pu. - DSS property name: `%X`, DSS property index: 33. + Name: `%X` + Default: 50.0 """ def _get_Model(self) -> BatchInt32ArrayProxy: @@ -1822,7 +1934,8 @@ def _set_Model(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0 2:Storage element is modeled as a CONSTANT IMPEDANCE. 3:Compute load injection from User-written Model. - DSS property name: `Model`, DSS property index: 34. + Name: `Model` + Default: 1 """ def _get_VMinpu(self) -> BatchFloat64ArrayProxy: @@ -1835,7 +1948,8 @@ def _set_VMinpu(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Default = 0.90. Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model. - DSS property name: `VMinpu`, DSS property index: 35. + Name: `VMinpu` + Default: 0.9 """ def _get_VMaxpu(self) -> BatchFloat64ArrayProxy: @@ -1848,7 +1962,8 @@ def _set_VMaxpu(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Default = 1.10. Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model. - DSS property name: `VMaxpu`, DSS property index: 36. + Name: `VMaxpu` + Default: 1.1 """ def _get_Balanced(self) -> List[bool]: @@ -1856,14 +1971,15 @@ def _get_Balanced(self) -> List[bool]: self._get_batch_int32_prop(37) ] - def _set_Balanced(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Balanced(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(37, value, flags) Balanced = property(_get_Balanced, _set_Balanced) # type: List[bool] """ - {Yes | No*} Default is No. Force balanced current only for 3-phase Storage. Forces zero- and negative-sequence to zero. + Force balanced current only for 3-phase Storage. Forces zero- and negative-sequence to zero. - DSS property name: `Balanced`, DSS property index: 37. + Name: `Balanced` + Default: False """ def _get_LimitCurrent(self) -> List[bool]: @@ -1871,14 +1987,15 @@ def _get_LimitCurrent(self) -> List[bool]: self._get_batch_int32_prop(38) ] - def _set_LimitCurrent(self, value: bool, flags: enums.SetterFlags = 0): + def _set_LimitCurrent(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(38, value, flags) LimitCurrent = property(_get_LimitCurrent, _set_LimitCurrent) # type: List[bool] """ Limits current magnitude to Vminpu value for both 1-phase and 3-phase Storage similar to Generator Model 7. For 3-phase, limits the positive-sequence current but not the negative-sequence. - DSS property name: `LimitCurrent`, DSS property index: 38. + Name: `LimitCurrent` + Default: False """ def _get_Yearly_str(self) -> List[str]: @@ -1891,7 +2008,7 @@ def _set_Yearly_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ 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 Storage element uses this loadshape to trigger State changes. - DSS property name: `Yearly`, DSS property index: 39. + Name: `Yearly` """ def _get_Yearly(self) -> List[LoadShape]: @@ -1904,7 +2021,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadSha """ 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 Storage element uses this loadshape to trigger State changes. - DSS property name: `Yearly`, DSS property index: 39. + Name: `Yearly` """ def _get_Daily_str(self) -> List[str]: @@ -1917,7 +2034,7 @@ def _set_Daily_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ 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 Storage element uses this loadshape to trigger State changes. - DSS property name: `Daily`, DSS property index: 40. + Name: `Daily` """ def _get_Daily(self) -> List[LoadShape]: @@ -1930,7 +2047,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShap """ 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 Storage element uses this loadshape to trigger State changes. - DSS property name: `Daily`, DSS property index: 40. + Name: `Daily` """ def _get_Duty_str(self) -> List[str]: @@ -1947,7 +2064,7 @@ def _set_Duty_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF 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. - DSS property name: `Duty`, DSS property index: 41. + Name: `Duty` """ def _get_Duty(self) -> List[LoadShape]: @@ -1964,7 +2081,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape 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. - DSS property name: `Duty`, DSS property index: 41. + Name: `Duty` """ def _get_DispMode(self) -> BatchInt32ArrayProxy: @@ -1989,7 +2106,8 @@ def _set_DispMode(self, value: Union[AnyStr, int, enums.StorageDispatchMode, Lis For the other two dispatch modes, the Storage element state is controlled by either the global default Loadlevel value or the price level. - DSS property name: `DispMode`, DSS property index: 42. + Name: `DispMode` + Default: Default """ def _get_DispMode_str(self) -> List[str]: @@ -2010,7 +2128,8 @@ def _set_DispMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): For the other two dispatch modes, the Storage element state is controlled by either the global default Loadlevel value or the price level. - DSS property name: `DispMode`, DSS property index: 42. + Name: `DispMode` + Default: Default """ def _get_DischargeTrigger(self) -> BatchFloat64ArrayProxy: @@ -2022,10 +2141,11 @@ def _set_DischargeTrigger(self, value: Union[float, Float64Array], flags: enums. DischargeTrigger = property(_get_DischargeTrigger, _set_DischargeTrigger) # type: BatchFloat64ArrayProxy """ Dispatch trigger value for discharging the Storage. - If = 0.0 the Storage element state is changed by the State command or by a StorageController object. - If <> 0 the Storage element state is set to DISCHARGING when this trigger level is EXCEEDED by either the specified Loadshape curve value or the price signal or global Loadlevel value, depending on dispatch mode. See State property. + If = 0 the Storage element state is changed by the State command or by a StorageController object. + If ≠ 0 the Storage element state is set to DISCHARGING when this trigger level is EXCEEDED by either the specified Loadshape curve value or the price signal or global Loadlevel value, depending on dispatch mode. See State property. - DSS property name: `DischargeTrigger`, DSS property index: 43. + Name: `DischargeTrigger` + Default: 0.0 """ def _get_ChargeTrigger(self) -> BatchFloat64ArrayProxy: @@ -2038,11 +2158,12 @@ def _set_ChargeTrigger(self, value: Union[float, Float64Array], flags: enums.Set """ Dispatch trigger value for charging the Storage. - If = 0.0 the Storage element state is changed by the State command or StorageController object. + If = 0 the Storage element state is changed by the State command or StorageController object. - If <> 0 the Storage element state is set to CHARGING when this trigger level is GREATER than either the specified Loadshape curve value or the price signal or global Loadlevel value, depending on dispatch mode. See State property. + If ≠ 0 the Storage element state is set to CHARGING when this trigger level is GREATER than either the specified Loadshape curve value or the price signal or global Loadlevel value, depending on dispatch mode. See State property. - DSS property name: `ChargeTrigger`, DSS property index: 44. + Name: `ChargeTrigger` + Default: 0.0 """ def _get_TimeChargeTrig(self) -> BatchFloat64ArrayProxy: @@ -2053,9 +2174,11 @@ def _set_TimeChargeTrig(self, value: Union[float, Float64Array], flags: enums.Se TimeChargeTrig = property(_get_TimeChargeTrig, _set_TimeChargeTrig) # type: BatchFloat64ArrayProxy """ - Time of day in fractional hours (0230 = 2.5) at which Storage element will automatically go into charge state. Default is 2.0. Enter a negative time value to disable this feature. + Time of day in fractional hours (0230 = 2.5) at which Storage element will automatically go into charge state. Enter a negative time value to disable this feature. - DSS property name: `TimeChargeTrig`, DSS property index: 45. + Name: `TimeChargeTrig` + Units: hour (0-24) + Default: 2.0 """ def _get_Class(self) -> BatchInt32ArrayProxy: @@ -2068,7 +2191,8 @@ def _set_Class(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0 """ An arbitrary integer number representing the class of Storage element so that Storage values may be segregated by class. - DSS property name: `Class`, DSS property index: 46. + Name: `Class` + Default: 1 """ def _get_DynaDLL(self) -> List[str]: @@ -2081,7 +2205,7 @@ def _set_DynaDLL(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Name of DLL containing user-written dynamics model, which computes the terminal currents for Dynamics-mode simulations, overriding the default model. Set to "none" to negate previous setting. This DLL has a simpler interface than the UserModel DLL and is only used for Dynamics mode. - DSS property name: `DynaDLL`, DSS property index: 47. + Name: `DynaDLL` """ def _get_DynaData(self) -> List[str]: @@ -2094,7 +2218,7 @@ def _set_DynaData(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ String (in quotes or parentheses if necessary) that gets passed to the user-written dynamics model Edit function for defining the data required for that model. - DSS property name: `DynaData`, DSS property index: 48. + Name: `DynaData` """ def _get_UserModel(self) -> List[str]: @@ -2107,7 +2231,7 @@ def _set_UserModel(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ Name of DLL containing user-written model, which computes the terminal currents for both power flow and dynamics, overriding the default model. Set to "none" to negate previous setting. - DSS property name: `UserModel`, DSS property index: 49. + Name: `UserModel` """ def _get_UserData(self) -> List[str]: @@ -2120,7 +2244,7 @@ def _set_UserData(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ String (in quotes or parentheses) that gets passed to user-written model for defining the data required for that model. - DSS property name: `UserData`, DSS property index: 50. + Name: `UserData` """ def _get_DebugTrace(self) -> List[bool]: @@ -2128,14 +2252,15 @@ def _get_DebugTrace(self) -> List[bool]: self._get_batch_int32_prop(51) ] - def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): + def _set_DebugTrace(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(51, value, flags) DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: List[bool] """ - {Yes | No } Default is no. Turn this on to capture the progress of the Storage model for each iteration. Creates a separate file for each Storage element named "Storage_name.csv". + Turn this on to capture the progress of the Storage model for each iteration. Creates a separate file for each Storage element named "Storage_name.csv". - DSS property name: `DebugTrace`, DSS property index: 51. + Name: `DebugTrace` + Default: False """ def _get_kVDC(self) -> BatchFloat64ArrayProxy: @@ -2148,7 +2273,9 @@ def _set_kVDC(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Indicates the rated voltage (kV) at the input of the inverter while the storage is discharging. The value is normally greater or equal to the kV base of the Storage device. It is used for dynamics simulation ONLY. - DSS property name: `kVDC`, DSS property index: 52. + Name: `kVDC` + Units: kV + Default: 8.0 """ def _get_Kp(self) -> BatchFloat64ArrayProxy: @@ -2161,7 +2288,8 @@ def _set_Kp(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ It is the proportional gain for the PI controller within the inverter. Use it to modify the controller response in dynamics simulation mode. - DSS property name: `Kp`, DSS property index: 53. + Name: `Kp` + Default: 0.01 """ def _get_PITol(self) -> BatchFloat64ArrayProxy: @@ -2174,7 +2302,8 @@ def _set_PITol(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ It is the tolerance (%) for the closed loop controller of the inverter. For dynamics simulation mode. - DSS property name: `PITol`, DSS property index: 54. + Name: `PITol` + Default: 0.0 """ def _get_SafeVoltage(self) -> BatchFloat64ArrayProxy: @@ -2187,7 +2316,8 @@ def _set_SafeVoltage(self, value: Union[float, Float64Array], flags: enums.Sette """ Indicates the voltage level (%) respect to the base voltage level for which the Inverter will operate. If this threshold is violated, the Inverter will enter safe mode (OFF). For dynamic simulation. By default is 80%. - DSS property name: `SafeVoltage`, DSS property index: 55. + Name: `SafeVoltage` + Default: 80.0 """ def _get_SafeMode(self) -> List[bool]: @@ -2195,14 +2325,16 @@ def _get_SafeMode(self) -> List[bool]: self._get_batch_int32_prop(56) ] - def _set_SafeMode(self, value: bool, flags: enums.SetterFlags = 0): + def _set_SafeMode(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(56, value, flags) SafeMode = property(_get_SafeMode, _set_SafeMode) # type: List[bool] """ (Read only) Indicates whether the inverter entered (Yes) or not (No) into Safe Mode. - DSS property name: `SafeMode`, DSS property index: 56. + **Read-only** + + Name: `SafeMode` """ def _get_DynamicEq_str(self) -> List[str]: @@ -2215,7 +2347,7 @@ def _set_DynamicEq_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Se """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. If not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 57. + Name: `DynamicEq` """ def _get_DynamicEq(self) -> List[DynamicExp]: @@ -2228,7 +2360,7 @@ def _set_DynamicEq(self, value: Union[AnyStr, DynamicExp, List[AnyStr], List[Dyn """ The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. If not defined, the generator dynamics will follow the built-in dynamic equation. - DSS property name: `DynamicEq`, DSS property index: 57. + Name: `DynamicEq` """ def _get_DynOut(self) -> List[List[str]]: @@ -2249,7 +2381,7 @@ def _set_DynOut(self, value: List[AnyStr], flags: enums.SetterFlags = 0): The output variables need to be defined in the same order. - DSS property name: `DynOut`, DSS property index: 58. + Name: `DynOut` """ def _get_ControlMode(self) -> BatchInt32ArrayProxy: @@ -2264,11 +2396,12 @@ def _set_ControlMode(self, value: Union[AnyStr, int, enums.InverterControlMode, ControlMode = property(_get_ControlMode, _set_ControlMode) # type: BatchInt32ArrayProxy """ - Defines the control mode for the inverter. It can be one of {GFM | GFL*}. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. + Defines the control mode for the inverter. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. GFM control mode disables any control action set by the InvControl device. - DSS property name: `ControlMode`, DSS property index: 59. + Name: `ControlMode` + Default: GFL """ def _get_ControlMode_str(self) -> List[str]: @@ -2279,11 +2412,12 @@ def _set_ControlMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ControlMode_str = property(_get_ControlMode_str, _set_ControlMode_str) # type: List[str] """ - Defines the control mode for the inverter. It can be one of {GFM | GFL*}. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. + Defines the control mode for the inverter. By default it is GFL (Grid Following Inverter). Use GFM (Grid Forming Inverter) for energizing islanded microgrids, but, if the device is connected to the grid, it is highly recommended to use GFL. GFM control mode disables any control action set by the InvControl device. - DSS property name: `ControlMode`, DSS property index: 59. + Name: `ControlMode` + Default: GFL """ def _get_AmpLimit(self) -> BatchFloat64ArrayProxy: @@ -2297,7 +2431,8 @@ def _set_AmpLimit(self, value: Union[float, Float64Array], flags: enums.SetterFl The current limiter per phase for the IBR when operating in GFM mode. This limit is imposed to prevent the IBR to enter into Safe Mode when reaching the IBR power ratings. Once the IBR reaches this value, it remains there without moving into Safe Mode. This value needs to be set lower than the IBR Amps rating. - DSS property name: `AmpLimit`, DSS property index: 60. + Name: `AmpLimit` + Units: A """ def _get_AmpLimitGain(self) -> BatchFloat64ArrayProxy: @@ -2310,7 +2445,8 @@ def _set_AmpLimitGain(self, value: Union[float, Float64Array], flags: enums.Sett """ Use it for fine tunning the current limiter when active, by default is 0.8, it has to be a value between 0.1 and 1. This value allows users to fine tune the IBRs current limiter to match with the user requirements. - DSS property name: `AmpLimitGain`, DSS property index: 61. + Name: `AmpLimitGain` + Default: 0.8 """ def _get_Spectrum_str(self) -> List[str]: @@ -2321,9 +2457,9 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] """ - Name of harmonic voltage or current spectrum for this Storage element. Current injection is assumed for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this Storage element. Current injection is assumed for inverter. - DSS property name: `Spectrum`, DSS property index: 62. + Name: `Spectrum` """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -2334,9 +2470,9 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] """ - Name of harmonic voltage or current spectrum for this Storage element. Current injection is assumed for inverter. Default value is "default", which is defined when the DSS starts. + Name of harmonic voltage or current spectrum for this Storage element. Current injection is assumed for inverter. - DSS property name: `Spectrum`, DSS property index: 62. + Name: `Spectrum` """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -2349,7 +2485,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 63. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -2357,14 +2494,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(64) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(64, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 64. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -2373,7 +2511,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 65. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(65, value, flags) diff --git a/altdss/StorageController.py b/altdss/StorageController.py index 76ad899..cb7ac43 100644 --- a/altdss/StorageController.py +++ b/altdss/StorageController.py @@ -15,7 +15,7 @@ class StorageController(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'StorageController' - _cls_idx = 30 + _cls_idx = 31 _cls_int_idx = { 2, 3, @@ -130,7 +130,7 @@ def _set_Element_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; Must be specified.In "Local" control mode, is the name of the load that will be managed by the storage device, which should be installed at the same bus. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Element(self) -> DSSObj: @@ -147,7 +147,7 @@ def _set_Element(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlags = """ Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; Must be specified.In "Local" control mode, is the name of the load that will be managed by the storage device, which should be installed at the same bus. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Terminal(self) -> int: @@ -160,7 +160,8 @@ def _set_Terminal(self, value: int, flags: enums.SetterFlags = 0): """ Number of the terminal of the circuit element to which the StorageController control is connected. 1 or 2, typically. Default is 1. Make sure to select the proper direction on the power for the respective dispatch mode. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_MonPhase(self) -> Union[enums.MonitoredPhase, int]: @@ -180,7 +181,8 @@ def _set_MonPhase(self, value: Union[AnyStr, int, enums.MonitoredPhase], flags: """ Number of the phase being monitored or one of {AVG | MAX | MIN} for all phases. Default=MAX. Must be less than the number of phases. Used in PeakShave, Follow, Support and I-PeakShave discharging modes and in PeakShaveLow, I-PeakShaveLow charging modes. For modes based on active power measurements, the value used by the control is the monitored one multiplied by the number of phases of the monitored element. - DSS property name: `MonPhase`, DSS property index: 3. + Name: `MonPhase` + Default: max """ def _get_MonPhase_str(self) -> str: @@ -193,7 +195,8 @@ def _set_MonPhase_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Number of the phase being monitored or one of {AVG | MAX | MIN} for all phases. Default=MAX. Must be less than the number of phases. Used in PeakShave, Follow, Support and I-PeakShave discharging modes and in PeakShaveLow, I-PeakShaveLow charging modes. For modes based on active power measurements, the value used by the control is the monitored one multiplied by the number of phases of the monitored element. - DSS property name: `MonPhase`, DSS property index: 3. + Name: `MonPhase` + Default: max """ def _get_kWTarget(self) -> float: @@ -206,7 +209,9 @@ def _set_kWTarget(self, value: float, flags: enums.SetterFlags = 0): """ kW/kamps target for Discharging. The Storage element fleet is dispatched to try to hold the power/current in band at least until the Storage is depleted. The selection of power or current depends on the Discharge mode (PeakShave->kW, I-PeakShave->kamps). - DSS property name: `kWTarget`, DSS property index: 4. + Name: `kWTarget` + Units: kW + Default: 8000.0 """ def _get_kWTargetLow(self) -> float: @@ -219,7 +224,9 @@ def _set_kWTargetLow(self, value: float, flags: enums.SetterFlags = 0): """ kW/kamps target for Charging. The Storage element fleet is dispatched to try to hold the power/current in band at least until the Storage is fully charged. The selection of power or current depends on the charge mode (PeakShavelow->kW, I-PeakShavelow->kamps). - DSS property name: `kWTargetLow`, DSS property index: 5. + Name: `kWTargetLow` + Units: kW + Default: 4000.0 """ def _get_pctkWBand(self) -> float: @@ -232,7 +239,8 @@ def _set_pctkWBand(self, value: float, flags: enums.SetterFlags = 0): """ Bandwidth (% of Target kW/kamps) of the dead band around the kW/kamps target value. Default is 2% (+/-1%).No dispatch changes are attempted if the power in the monitored terminal stays within this band. - DSS property name: `%kWBand`, DSS property index: 6. + Name: `%kWBand` + Default: 2.0 """ def _get_kWBand(self) -> float: @@ -245,7 +253,8 @@ def _set_kWBand(self, value: float, flags: enums.SetterFlags = 0): """ Alternative way of specifying the bandwidth. (kW/kamps) of the dead band around the kW/kamps target value. Default is 2% of kWTarget (+/-1%).No dispatch changes are attempted if the power in the monitored terminal stays within this band. - DSS property name: `kWBand`, DSS property index: 7. + Name: `kWBand` + Units: kW """ def _get_pctkWBandLow(self) -> float: @@ -258,7 +267,8 @@ def _set_pctkWBandLow(self, value: float, flags: enums.SetterFlags = 0): """ Bandwidth (% of kWTargetLow) of the dead band around the kW/kamps low target value. Default is 2% (+/-1%).No charging is attempted if the power in the monitored terminal stays within this band. - DSS property name: `%kWBandLow`, DSS property index: 8. + Name: `%kWBandLow` + Default: 2.0 """ def _get_kWBandLow(self) -> float: @@ -271,7 +281,8 @@ def _set_kWBandLow(self, value: float, flags: enums.SetterFlags = 0): """ Alternative way of specifying the bandwidth. (kW/kamps) of the dead band around the kW/kamps low target value. Default is 2% of kWTargetLow (+/-1%).No charging is attempted if the power in the monitored terminal stays within this band. - DSS property name: `kWBandLow`, DSS property index: 9. + Name: `kWBandLow` + Units: kW """ def _get_ElementList(self) -> List[str]: @@ -286,7 +297,7 @@ def _set_ElementList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Array list of Storage elements to be controlled. If not specified, all Storage elements in the circuit not presently dispatched by another controller are assumed dispatched by this controller. - DSS property name: `ElementList`, DSS property index: 10. + Name: `ElementList` """ def _get_Weights(self) -> Float64Array: @@ -299,7 +310,7 @@ def _set_Weights(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Array of proportional weights corresponding to each Storage element in the ElementList. The needed kW or kvar to get back to center band is dispatched to each Storage element according to these weights. Default is to set all weights to 1.0. - DSS property name: `Weights`, DSS property index: 11. + Name: `Weights` """ def _get_ModeDischarge(self) -> enums.StorageControllerDischargeMode: @@ -313,7 +324,7 @@ def _set_ModeDischarge(self, value: Union[AnyStr, int, enums.StorageControllerDi ModeDischarge = property(_get_ModeDischarge, _set_ModeDischarge) # type: enums.StorageControllerDischargeMode """ - {PeakShave* | Follow | Support | Loadshape | Time | Schedule | I-PeakShave} Mode of operation for the DISCHARGE FUNCTION of this controller. + Mode of operation for the DISCHARGE FUNCTION of this controller. In PeakShave mode (Default), the control attempts to discharge Storage to keep power in the monitored element below the kWTarget. @@ -329,7 +340,8 @@ def _set_ModeDischarge(self, value: Union[AnyStr, int, enums.StorageControllerDi In I-PeakShave mode, the control attempts to discharge Storage to keep current in the monitored element below the target given in k-amps (thousands of amps), when this control mode is active, the property kWTarget will be expressed in k-amps. - DSS property name: `ModeDischarge`, DSS property index: 12. + Name: `ModeDischarge` + Default: PeakShave """ def _get_ModeDischarge_str(self) -> str: @@ -340,7 +352,7 @@ def _set_ModeDischarge_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ModeDischarge_str = property(_get_ModeDischarge_str, _set_ModeDischarge_str) # type: str """ - {PeakShave* | Follow | Support | Loadshape | Time | Schedule | I-PeakShave} Mode of operation for the DISCHARGE FUNCTION of this controller. + Mode of operation for the DISCHARGE FUNCTION of this controller. In PeakShave mode (Default), the control attempts to discharge Storage to keep power in the monitored element below the kWTarget. @@ -356,7 +368,8 @@ def _set_ModeDischarge_str(self, value: AnyStr, flags: enums.SetterFlags = 0): In I-PeakShave mode, the control attempts to discharge Storage to keep current in the monitored element below the target given in k-amps (thousands of amps), when this control mode is active, the property kWTarget will be expressed in k-amps. - DSS property name: `ModeDischarge`, DSS property index: 12. + Name: `ModeDischarge` + Default: PeakShave """ def _get_ModeCharge(self) -> enums.StorageControllerChargeMode: @@ -370,17 +383,18 @@ def _set_ModeCharge(self, value: Union[AnyStr, int, enums.StorageControllerCharg ModeCharge = property(_get_ModeCharge, _set_ModeCharge) # type: enums.StorageControllerChargeMode """ - {Loadshape | Time* | PeakShaveLow | I-PeakShaveLow} Mode of operation for the CHARGE FUNCTION of this controller. + Mode of operation for the CHARGE FUNCTION of this controller. In Loadshape mode, both charging and discharging precisely follows the per unit loadshape. Storage is charged when the loadshape value is negative. In Time mode, the Storage charging FUNCTION is triggered at the specified %RateCharge at the specified charge trigger time in fractional hours. - In PeakShaveLow mode, the charging operation will charge the Storage fleet when the power at a monitored element is below a specified KW target (kWTarget_low). The Storage will charge as much power as necessary to keep the power within the deadband around kWTarget_low. + In PeakShaveLow mode, the charging operation will charge the Storage fleet when the power at a monitored element is below a specified kW target (kWTarget_low). The Storage will charge as much power as necessary to keep the power within the deadband around kWTarget_low. In I-PeakShaveLow mode, the charging operation will charge the Storage fleet when the current (Amps) at a monitored element is below a specified amps target (kWTarget_low). The Storage will charge as much power as necessary to keep the amps within the deadband around kWTarget_low. When this control mode is active, the property kWTarget_low will be expressed in k-amps and all the other parameters will be adjusted to match the amps (current) control criteria. - DSS property name: `ModeCharge`, DSS property index: 13. + Name: `ModeCharge` + Default: Time """ def _get_ModeCharge_str(self) -> str: @@ -391,17 +405,18 @@ def _set_ModeCharge_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ModeCharge_str = property(_get_ModeCharge_str, _set_ModeCharge_str) # type: str """ - {Loadshape | Time* | PeakShaveLow | I-PeakShaveLow} Mode of operation for the CHARGE FUNCTION of this controller. + Mode of operation for the CHARGE FUNCTION of this controller. In Loadshape mode, both charging and discharging precisely follows the per unit loadshape. Storage is charged when the loadshape value is negative. In Time mode, the Storage charging FUNCTION is triggered at the specified %RateCharge at the specified charge trigger time in fractional hours. - In PeakShaveLow mode, the charging operation will charge the Storage fleet when the power at a monitored element is below a specified KW target (kWTarget_low). The Storage will charge as much power as necessary to keep the power within the deadband around kWTarget_low. + In PeakShaveLow mode, the charging operation will charge the Storage fleet when the power at a monitored element is below a specified kW target (kWTarget_low). The Storage will charge as much power as necessary to keep the power within the deadband around kWTarget_low. In I-PeakShaveLow mode, the charging operation will charge the Storage fleet when the current (Amps) at a monitored element is below a specified amps target (kWTarget_low). The Storage will charge as much power as necessary to keep the amps within the deadband around kWTarget_low. When this control mode is active, the property kWTarget_low will be expressed in k-amps and all the other parameters will be adjusted to match the amps (current) control criteria. - DSS property name: `ModeCharge`, DSS property index: 13. + Name: `ModeCharge` + Default: Time """ def _get_TimeDischargeTrigger(self) -> float: @@ -414,7 +429,9 @@ def _set_TimeDischargeTrigger(self, value: float, flags: enums.SetterFlags = 0): """ Default time of day (hr) for initiating Discharging of the fleet. During Follow or Time mode discharging is triggered at a fixed time each day at this hour. If Follow mode, Storage will be discharged to attempt to hold the load at or below the power level at the time of triggering. In Time mode, the discharge is based on the %RatekW property value. Set this to a negative value to ignore. Default is 12.0 for Follow mode; otherwise it is -1 (ignored). - DSS property name: `TimeDischargeTrigger`, DSS property index: 14. + Name: `TimeDischargeTrigger` + Units: hour (0-24) + Default: -1.0 """ def _get_TimeChargeTrigger(self) -> float: @@ -427,7 +444,9 @@ def _set_TimeChargeTrigger(self, value: float, flags: enums.SetterFlags = 0): """ Default time of day (hr) for initiating charging in Time control mode. Set this to a negative value to ignore. Default is 2.0. (0200).When this value is >0 the Storage fleet is set to charging at this time regardless of other control criteria to make sure Storage is topped off for the next discharge cycle. - DSS property name: `TimeChargeTrigger`, DSS property index: 15. + Name: `TimeChargeTrigger` + Units: hour (0-24) + Default: 2.0 """ def _get_pctRatekW(self) -> float: @@ -440,7 +459,8 @@ def _set_pctRatekW(self, value: float, flags: enums.SetterFlags = 0): """ Sets the kW discharge rate in % of rated capacity for each element of the fleet. Applies to TIME control mode, SCHEDULE mode, or anytime discharging is triggered by time. - DSS property name: `%RatekW`, DSS property index: 16. + Name: `%RatekW` + Default: 20.0 """ def _get_pctRateCharge(self) -> float: @@ -453,7 +473,8 @@ def _set_pctRateCharge(self, value: float, flags: enums.SetterFlags = 0): """ Sets the kW charging rate in % of rated capacity for each element of the fleet. Applies to TIME control mode and anytime charging mode is entered due to a time trigger. - DSS property name: `%RateCharge`, DSS property index: 17. + Name: `%RateCharge` + Default: 20.0 """ def _get_pctReserve(self) -> float: @@ -466,7 +487,8 @@ def _set_pctReserve(self, value: float, flags: enums.SetterFlags = 0): """ Use this property to change the % reserve for each Storage element under control of this controller. This might be used, for example, to allow deeper discharges of Storage or in case of emergency operation to use the remainder of the Storage element. - DSS property name: `%Reserve`, DSS property index: 18. + Name: `%Reserve` + Default: 25.0 """ def _get_kWhTotal(self) -> float: @@ -477,9 +499,11 @@ def _set_kWhTotal(self, value: float, flags: enums.SetterFlags = 0): kWhTotal = property(_get_kWhTotal, _set_kWhTotal) # type: float """ - (Read only). Total rated kWh energy Storage capacity of Storage elements controlled by this controller. + Total rated kWh energy Storage capacity of Storage elements controlled by this controller. - DSS property name: `kWhTotal`, DSS property index: 19. + **Read-only** + + Name: `kWhTotal` """ def _get_kWTotal(self) -> float: @@ -490,9 +514,11 @@ def _set_kWTotal(self, value: float, flags: enums.SetterFlags = 0): kWTotal = property(_get_kWTotal, _set_kWTotal) # type: float """ - (Read only). Total rated kW power capacity of Storage elements controlled by this controller. + Total rated kW power capacity of Storage elements controlled by this controller. + + **Read-only** - DSS property name: `kWTotal`, DSS property index: 20. + Name: `kWTotal` """ def _get_kWhActual(self) -> float: @@ -503,9 +529,11 @@ def _set_kWhActual(self, value: float, flags: enums.SetterFlags = 0): kWhActual = property(_get_kWhActual, _set_kWhActual) # type: float """ - (Read only). Actual kWh stored of all controlled Storage elements. + Actual kWh stored of all controlled Storage elements. - DSS property name: `kWhActual`, DSS property index: 21. + **Read-only** + + Name: `kWhActual` """ def _get_kWActual(self) -> float: @@ -516,9 +544,11 @@ def _set_kWActual(self, value: float, flags: enums.SetterFlags = 0): kWActual = property(_get_kWActual, _set_kWActual) # type: float """ - (Read only). Actual kW output of all controlled Storage elements. + Actual kW output of all controlled Storage elements. + + **Read-only** - DSS property name: `kWActual`, DSS property index: 22. + Name: `kWActual` """ def _get_kWNeed(self) -> float: @@ -529,9 +559,12 @@ def _set_kWNeed(self, value: float, flags: enums.SetterFlags = 0): kWNeed = property(_get_kWNeed, _set_kWNeed) # type: float """ - (Read only). KW needed to meet target. + kW needed to meet target. - DSS property name: `kWNeed`, DSS property index: 23. + **Read-only** + + Name: `kWNeed` + Units: kW """ def _get_Yearly_str(self) -> str: @@ -544,7 +577,7 @@ def _set_Yearly_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Dispatch loadshape object, If any, for Yearly solution Mode. - DSS property name: `Yearly`, DSS property index: 24. + Name: `Yearly` """ def _get_Yearly(self) -> LoadShape: @@ -561,7 +594,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags """ Dispatch loadshape object, If any, for Yearly solution Mode. - DSS property name: `Yearly`, DSS property index: 24. + Name: `Yearly` """ def _get_Daily_str(self) -> str: @@ -574,7 +607,7 @@ def _set_Daily_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Dispatch loadshape object, If any, for Daily solution mode. - DSS property name: `Daily`, DSS property index: 25. + Name: `Daily` """ def _get_Daily(self) -> LoadShape: @@ -591,7 +624,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ Dispatch loadshape object, If any, for Daily solution mode. - DSS property name: `Daily`, DSS property index: 25. + Name: `Daily` """ def _get_Duty_str(self) -> str: @@ -604,7 +637,7 @@ def _set_Duty_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Dispatch loadshape object, If any, for Dutycycle solution mode. - DSS property name: `Duty`, DSS property index: 26. + Name: `Duty` """ def _get_Duty(self) -> LoadShape: @@ -621,7 +654,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = """ Dispatch loadshape object, If any, for Dutycycle solution mode. - DSS property name: `Duty`, DSS property index: 26. + Name: `Duty` """ def _get_EventLog(self) -> bool: @@ -632,9 +665,10 @@ def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): EventLog = property(_get_EventLog, _set_EventLog) # type: bool """ - {Yes/True | No/False} Default is No. Log control actions to Eventlog. + Log control actions to Eventlog. - DSS property name: `EventLog`, DSS property index: 27. + Name: `EventLog` + Default: False """ def _get_InhibitTime(self) -> int: @@ -645,9 +679,11 @@ def _set_InhibitTime(self, value: int, flags: enums.SetterFlags = 0): InhibitTime = property(_get_InhibitTime, _set_InhibitTime) # type: int """ - Hours (integer) to inhibit Discharging after going into Charge mode. Default is 5. + Hours (integer) to inhibit Discharging after going into Charge mode. - DSS property name: `InhibitTime`, DSS property index: 28. + Name: `InhibitTime` + Units: hour + Default: 5 """ def _get_TUp(self) -> float: @@ -658,9 +694,11 @@ def _set_TUp(self, value: float, flags: enums.SetterFlags = 0): TUp = property(_get_TUp, _set_TUp) # type: float """ - Duration, hrs, of upramp part for SCHEDULE mode. Default is 0.25. + Duration of upramp part for SCHEDULE mode. - DSS property name: `TUp`, DSS property index: 29. + Name: `TUp` + Units: hour + Default: 0.25 """ def _get_TFlat(self) -> float: @@ -671,9 +709,11 @@ def _set_TFlat(self, value: float, flags: enums.SetterFlags = 0): TFlat = property(_get_TFlat, _set_TFlat) # type: float """ - Duration, hrs, of flat part for SCHEDULE mode. Default is 2.0. + Duration of flat part for SCHEDULE mode. - DSS property name: `TFlat`, DSS property index: 30. + Name: `TFlat` + Units: hour + Default: 2.0 """ def _get_TDn(self) -> float: @@ -684,9 +724,11 @@ def _set_TDn(self, value: float, flags: enums.SetterFlags = 0): TDn = property(_get_TDn, _set_TDn) # type: float """ - Duration, hrs, of downramp part for SCHEDULE mode. Default is 0.25. + Duration of downramp part for SCHEDULE mode. - DSS property name: `TDn`, DSS property index: 31. + Name: `TDn` + Units: hour + Default: 0.25 """ def _get_kWThreshold(self) -> float: @@ -699,7 +741,8 @@ def _set_kWThreshold(self, value: float, flags: enums.SetterFlags = 0): """ Threshold, kW, for Follow mode. kW has to be above this value for the Storage element to be dispatched on. Defaults to 75% of the kWTarget value. Must reset this property after setting kWTarget if you want a different value. - DSS property name: `kWThreshold`, DSS property index: 32. + Name: `kWThreshold` + Units: kW """ def _get_DispFactor(self) -> float: @@ -714,7 +757,8 @@ def _set_DispFactor(self, value: float, flags: enums.SetterFlags = 0): Use this parameter to reduce the amount of power requested by the controller in each control iteration. It can be useful when maximum control iterations are exceeded due to numerical instability such as fleet being set to charging and idling in subsequent control iterations (check the Eventlog). - DSS property name: `DispFactor`, DSS property index: 33. + Name: `DispFactor` + Default: 1.0 """ def _get_ResetLevel(self) -> float: @@ -727,7 +771,8 @@ def _set_ResetLevel(self, value: float, flags: enums.SetterFlags = 0): """ The level of charge required for allowing the storage to discharge again after reaching the reserve storage level. After reaching this level, the storage control will not allow the storage device to discharge, forcing the storage to charge. Once the storage reaches this level, the storage will be able to discharge again. This value is a number between 0.2 and 1 - DSS property name: `ResetLevel`, DSS property index: 34. + Name: `ResetLevel` + Default: 0.8 """ def _get_Seasons(self) -> int: @@ -740,7 +785,7 @@ def _set_Seasons(self, value: int, flags: enums.SetterFlags = 0): """ With this property the user can specify the number of targets to be used by the controller using the list given at "SeasonTargets"/"SeasonTargetsLow", which can be used to dynamically adjust the storage controller during a QSTS simulation. The default value is 1. This property needs to be defined before defining SeasonTargets/SeasonTargetsLow. - DSS property name: `Seasons`, DSS property index: 35. + Name: `Seasons` """ def _get_SeasonTargets(self) -> Float64Array: @@ -753,7 +798,8 @@ def _set_SeasonTargets(self, value: Float64Array, flags: enums.SetterFlags = 0): """ An array of doubles specifying the targets to be used during a QSTS simulation. These targets will take effect only if SeasonRating=true. The number of targets cannot exceed the number of seasons defined at the SeasonSignal.The difference between the targets defined at SeasonTargets and SeasonTargetsLow is that SeasonTargets applies to discharging modes, while SeasonTargetsLow applies to charging modes. - DSS property name: `SeasonTargets`, DSS property index: 36. + Name: `SeasonTargets` + Default: [8000.0] """ def _get_SeasonTargetsLow(self) -> Float64Array: @@ -766,7 +812,8 @@ def _set_SeasonTargetsLow(self, value: Float64Array, flags: enums.SetterFlags = """ An array of doubles specifying the targets to be used during a QSTS simulation. These targets will take effect only if SeasonRating=true. The number of targets cannot exceed the number of seasons defined at the SeasonSignal.The difference between the targets defined at SeasonTargets and SeasonTargetsLow is that SeasonTargets applies to discharging modes, while SeasonTargetsLow applies to charging modes. - DSS property name: `SeasonTargetsLow`, DSS property index: 37. + Name: `SeasonTargetsLow` + Default: [4000.0] """ def _get_BaseFreq(self) -> float: @@ -779,7 +826,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 38. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -790,9 +838,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 39. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -801,7 +850,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 40. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(40, value) @@ -851,7 +902,7 @@ class StorageControllerProperties(TypedDict): class StorageControllerBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'StorageController' _obj_cls = StorageController - _cls_idx = 30 + _cls_idx = 31 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -889,7 +940,7 @@ def _set_Element_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett """ Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; Must be specified.In "Local" control mode, is the name of the load that will be managed by the storage device, which should be installed at the same bus. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Element(self) -> List[DSSObj]: @@ -902,7 +953,7 @@ def _set_Element(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSObj]], """ Full object name of the circuit element, typically a line or transformer, which the control is monitoring. There is no default; Must be specified.In "Local" control mode, is the name of the load that will be managed by the storage device, which should be installed at the same bus. - DSS property name: `Element`, DSS property index: 1. + Name: `Element` """ def _get_Terminal(self) -> BatchInt32ArrayProxy: @@ -915,7 +966,8 @@ def _set_Terminal(self, value: Union[int, Int32Array], flags: enums.SetterFlags """ Number of the terminal of the circuit element to which the StorageController control is connected. 1 or 2, typically. Default is 1. Make sure to select the proper direction on the power for the respective dispatch mode. - DSS property name: `Terminal`, DSS property index: 2. + Name: `Terminal` + Default: 1 """ def _get_MonPhase(self) -> BatchInt32ArrayProxy: @@ -932,7 +984,8 @@ def _set_MonPhase(self, value: Union[AnyStr, int, enums.MonitoredPhase, List[Any """ Number of the phase being monitored or one of {AVG | MAX | MIN} for all phases. Default=MAX. Must be less than the number of phases. Used in PeakShave, Follow, Support and I-PeakShave discharging modes and in PeakShaveLow, I-PeakShaveLow charging modes. For modes based on active power measurements, the value used by the control is the monitored one multiplied by the number of phases of the monitored element. - DSS property name: `MonPhase`, DSS property index: 3. + Name: `MonPhase` + Default: max """ def _get_MonPhase_str(self) -> List[str]: @@ -945,7 +998,8 @@ def _set_MonPhase_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Number of the phase being monitored or one of {AVG | MAX | MIN} for all phases. Default=MAX. Must be less than the number of phases. Used in PeakShave, Follow, Support and I-PeakShave discharging modes and in PeakShaveLow, I-PeakShaveLow charging modes. For modes based on active power measurements, the value used by the control is the monitored one multiplied by the number of phases of the monitored element. - DSS property name: `MonPhase`, DSS property index: 3. + Name: `MonPhase` + Default: max """ def _get_kWTarget(self) -> BatchFloat64ArrayProxy: @@ -958,7 +1012,9 @@ def _set_kWTarget(self, value: Union[float, Float64Array], flags: enums.SetterFl """ kW/kamps target for Discharging. The Storage element fleet is dispatched to try to hold the power/current in band at least until the Storage is depleted. The selection of power or current depends on the Discharge mode (PeakShave->kW, I-PeakShave->kamps). - DSS property name: `kWTarget`, DSS property index: 4. + Name: `kWTarget` + Units: kW + Default: 8000.0 """ def _get_kWTargetLow(self) -> BatchFloat64ArrayProxy: @@ -971,7 +1027,9 @@ def _set_kWTargetLow(self, value: Union[float, Float64Array], flags: enums.Sette """ kW/kamps target for Charging. The Storage element fleet is dispatched to try to hold the power/current in band at least until the Storage is fully charged. The selection of power or current depends on the charge mode (PeakShavelow->kW, I-PeakShavelow->kamps). - DSS property name: `kWTargetLow`, DSS property index: 5. + Name: `kWTargetLow` + Units: kW + Default: 4000.0 """ def _get_pctkWBand(self) -> BatchFloat64ArrayProxy: @@ -984,7 +1042,8 @@ def _set_pctkWBand(self, value: Union[float, Float64Array], flags: enums.SetterF """ Bandwidth (% of Target kW/kamps) of the dead band around the kW/kamps target value. Default is 2% (+/-1%).No dispatch changes are attempted if the power in the monitored terminal stays within this band. - DSS property name: `%kWBand`, DSS property index: 6. + Name: `%kWBand` + Default: 2.0 """ def _get_kWBand(self) -> BatchFloat64ArrayProxy: @@ -997,7 +1056,8 @@ def _set_kWBand(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Alternative way of specifying the bandwidth. (kW/kamps) of the dead band around the kW/kamps target value. Default is 2% of kWTarget (+/-1%).No dispatch changes are attempted if the power in the monitored terminal stays within this band. - DSS property name: `kWBand`, DSS property index: 7. + Name: `kWBand` + Units: kW """ def _get_pctkWBandLow(self) -> BatchFloat64ArrayProxy: @@ -1010,7 +1070,8 @@ def _set_pctkWBandLow(self, value: Union[float, Float64Array], flags: enums.Sett """ Bandwidth (% of kWTargetLow) of the dead band around the kW/kamps low target value. Default is 2% (+/-1%).No charging is attempted if the power in the monitored terminal stays within this band. - DSS property name: `%kWBandLow`, DSS property index: 8. + Name: `%kWBandLow` + Default: 2.0 """ def _get_kWBandLow(self) -> BatchFloat64ArrayProxy: @@ -1023,7 +1084,8 @@ def _set_kWBandLow(self, value: Union[float, Float64Array], flags: enums.SetterF """ Alternative way of specifying the bandwidth. (kW/kamps) of the dead band around the kW/kamps low target value. Default is 2% of kWTargetLow (+/-1%).No charging is attempted if the power in the monitored terminal stays within this band. - DSS property name: `kWBandLow`, DSS property index: 9. + Name: `kWBandLow` + Units: kW """ def _get_ElementList(self) -> List[List[str]]: @@ -1040,7 +1102,7 @@ def _set_ElementList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ Array list of Storage elements to be controlled. If not specified, all Storage elements in the circuit not presently dispatched by another controller are assumed dispatched by this controller. - DSS property name: `ElementList`, DSS property index: 10. + Name: `ElementList` """ def _get_Weights(self) -> List[Float64Array]: @@ -1056,7 +1118,7 @@ def _set_Weights(self, value: Union[Float64Array, List[Float64Array]], flags: en """ Array of proportional weights corresponding to each Storage element in the ElementList. The needed kW or kvar to get back to center band is dispatched to each Storage element according to these weights. Default is to set all weights to 1.0. - DSS property name: `Weights`, DSS property index: 11. + Name: `Weights` """ def _get_ModeDischarge(self) -> BatchInt32ArrayProxy: @@ -1071,7 +1133,7 @@ def _set_ModeDischarge(self, value: Union[AnyStr, int, enums.StorageControllerDi ModeDischarge = property(_get_ModeDischarge, _set_ModeDischarge) # type: BatchInt32ArrayProxy """ - {PeakShave* | Follow | Support | Loadshape | Time | Schedule | I-PeakShave} Mode of operation for the DISCHARGE FUNCTION of this controller. + Mode of operation for the DISCHARGE FUNCTION of this controller. In PeakShave mode (Default), the control attempts to discharge Storage to keep power in the monitored element below the kWTarget. @@ -1087,7 +1149,8 @@ def _set_ModeDischarge(self, value: Union[AnyStr, int, enums.StorageControllerDi In I-PeakShave mode, the control attempts to discharge Storage to keep current in the monitored element below the target given in k-amps (thousands of amps), when this control mode is active, the property kWTarget will be expressed in k-amps. - DSS property name: `ModeDischarge`, DSS property index: 12. + Name: `ModeDischarge` + Default: PeakShave """ def _get_ModeDischarge_str(self) -> List[str]: @@ -1098,7 +1161,7 @@ def _set_ModeDischarge_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ModeDischarge_str = property(_get_ModeDischarge_str, _set_ModeDischarge_str) # type: List[str] """ - {PeakShave* | Follow | Support | Loadshape | Time | Schedule | I-PeakShave} Mode of operation for the DISCHARGE FUNCTION of this controller. + Mode of operation for the DISCHARGE FUNCTION of this controller. In PeakShave mode (Default), the control attempts to discharge Storage to keep power in the monitored element below the kWTarget. @@ -1114,7 +1177,8 @@ def _set_ModeDischarge_str(self, value: AnyStr, flags: enums.SetterFlags = 0): In I-PeakShave mode, the control attempts to discharge Storage to keep current in the monitored element below the target given in k-amps (thousands of amps), when this control mode is active, the property kWTarget will be expressed in k-amps. - DSS property name: `ModeDischarge`, DSS property index: 12. + Name: `ModeDischarge` + Default: PeakShave """ def _get_ModeCharge(self) -> BatchInt32ArrayProxy: @@ -1129,17 +1193,18 @@ def _set_ModeCharge(self, value: Union[AnyStr, int, enums.StorageControllerCharg ModeCharge = property(_get_ModeCharge, _set_ModeCharge) # type: BatchInt32ArrayProxy """ - {Loadshape | Time* | PeakShaveLow | I-PeakShaveLow} Mode of operation for the CHARGE FUNCTION of this controller. + Mode of operation for the CHARGE FUNCTION of this controller. In Loadshape mode, both charging and discharging precisely follows the per unit loadshape. Storage is charged when the loadshape value is negative. In Time mode, the Storage charging FUNCTION is triggered at the specified %RateCharge at the specified charge trigger time in fractional hours. - In PeakShaveLow mode, the charging operation will charge the Storage fleet when the power at a monitored element is below a specified KW target (kWTarget_low). The Storage will charge as much power as necessary to keep the power within the deadband around kWTarget_low. + In PeakShaveLow mode, the charging operation will charge the Storage fleet when the power at a monitored element is below a specified kW target (kWTarget_low). The Storage will charge as much power as necessary to keep the power within the deadband around kWTarget_low. In I-PeakShaveLow mode, the charging operation will charge the Storage fleet when the current (Amps) at a monitored element is below a specified amps target (kWTarget_low). The Storage will charge as much power as necessary to keep the amps within the deadband around kWTarget_low. When this control mode is active, the property kWTarget_low will be expressed in k-amps and all the other parameters will be adjusted to match the amps (current) control criteria. - DSS property name: `ModeCharge`, DSS property index: 13. + Name: `ModeCharge` + Default: Time """ def _get_ModeCharge_str(self) -> List[str]: @@ -1150,17 +1215,18 @@ def _set_ModeCharge_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ModeCharge_str = property(_get_ModeCharge_str, _set_ModeCharge_str) # type: List[str] """ - {Loadshape | Time* | PeakShaveLow | I-PeakShaveLow} Mode of operation for the CHARGE FUNCTION of this controller. + Mode of operation for the CHARGE FUNCTION of this controller. In Loadshape mode, both charging and discharging precisely follows the per unit loadshape. Storage is charged when the loadshape value is negative. In Time mode, the Storage charging FUNCTION is triggered at the specified %RateCharge at the specified charge trigger time in fractional hours. - In PeakShaveLow mode, the charging operation will charge the Storage fleet when the power at a monitored element is below a specified KW target (kWTarget_low). The Storage will charge as much power as necessary to keep the power within the deadband around kWTarget_low. + In PeakShaveLow mode, the charging operation will charge the Storage fleet when the power at a monitored element is below a specified kW target (kWTarget_low). The Storage will charge as much power as necessary to keep the power within the deadband around kWTarget_low. In I-PeakShaveLow mode, the charging operation will charge the Storage fleet when the current (Amps) at a monitored element is below a specified amps target (kWTarget_low). The Storage will charge as much power as necessary to keep the amps within the deadband around kWTarget_low. When this control mode is active, the property kWTarget_low will be expressed in k-amps and all the other parameters will be adjusted to match the amps (current) control criteria. - DSS property name: `ModeCharge`, DSS property index: 13. + Name: `ModeCharge` + Default: Time """ def _get_TimeDischargeTrigger(self) -> BatchFloat64ArrayProxy: @@ -1173,7 +1239,9 @@ def _set_TimeDischargeTrigger(self, value: Union[float, Float64Array], flags: en """ Default time of day (hr) for initiating Discharging of the fleet. During Follow or Time mode discharging is triggered at a fixed time each day at this hour. If Follow mode, Storage will be discharged to attempt to hold the load at or below the power level at the time of triggering. In Time mode, the discharge is based on the %RatekW property value. Set this to a negative value to ignore. Default is 12.0 for Follow mode; otherwise it is -1 (ignored). - DSS property name: `TimeDischargeTrigger`, DSS property index: 14. + Name: `TimeDischargeTrigger` + Units: hour (0-24) + Default: -1.0 """ def _get_TimeChargeTrigger(self) -> BatchFloat64ArrayProxy: @@ -1186,7 +1254,9 @@ def _set_TimeChargeTrigger(self, value: Union[float, Float64Array], flags: enums """ Default time of day (hr) for initiating charging in Time control mode. Set this to a negative value to ignore. Default is 2.0. (0200).When this value is >0 the Storage fleet is set to charging at this time regardless of other control criteria to make sure Storage is topped off for the next discharge cycle. - DSS property name: `TimeChargeTrigger`, DSS property index: 15. + Name: `TimeChargeTrigger` + Units: hour (0-24) + Default: 2.0 """ def _get_pctRatekW(self) -> BatchFloat64ArrayProxy: @@ -1199,7 +1269,8 @@ def _set_pctRatekW(self, value: Union[float, Float64Array], flags: enums.SetterF """ Sets the kW discharge rate in % of rated capacity for each element of the fleet. Applies to TIME control mode, SCHEDULE mode, or anytime discharging is triggered by time. - DSS property name: `%RatekW`, DSS property index: 16. + Name: `%RatekW` + Default: 20.0 """ def _get_pctRateCharge(self) -> BatchFloat64ArrayProxy: @@ -1212,7 +1283,8 @@ def _set_pctRateCharge(self, value: Union[float, Float64Array], flags: enums.Set """ Sets the kW charging rate in % of rated capacity for each element of the fleet. Applies to TIME control mode and anytime charging mode is entered due to a time trigger. - DSS property name: `%RateCharge`, DSS property index: 17. + Name: `%RateCharge` + Default: 20.0 """ def _get_pctReserve(self) -> BatchFloat64ArrayProxy: @@ -1225,7 +1297,8 @@ def _set_pctReserve(self, value: Union[float, Float64Array], flags: enums.Setter """ Use this property to change the % reserve for each Storage element under control of this controller. This might be used, for example, to allow deeper discharges of Storage or in case of emergency operation to use the remainder of the Storage element. - DSS property name: `%Reserve`, DSS property index: 18. + Name: `%Reserve` + Default: 25.0 """ def _get_kWhTotal(self) -> BatchFloat64ArrayProxy: @@ -1236,9 +1309,11 @@ def _set_kWhTotal(self, value: Union[float, Float64Array], flags: enums.SetterFl kWhTotal = property(_get_kWhTotal, _set_kWhTotal) # type: BatchFloat64ArrayProxy """ - (Read only). Total rated kWh energy Storage capacity of Storage elements controlled by this controller. + Total rated kWh energy Storage capacity of Storage elements controlled by this controller. + + **Read-only** - DSS property name: `kWhTotal`, DSS property index: 19. + Name: `kWhTotal` """ def _get_kWTotal(self) -> BatchFloat64ArrayProxy: @@ -1249,9 +1324,11 @@ def _set_kWTotal(self, value: Union[float, Float64Array], flags: enums.SetterFla kWTotal = property(_get_kWTotal, _set_kWTotal) # type: BatchFloat64ArrayProxy """ - (Read only). Total rated kW power capacity of Storage elements controlled by this controller. + Total rated kW power capacity of Storage elements controlled by this controller. - DSS property name: `kWTotal`, DSS property index: 20. + **Read-only** + + Name: `kWTotal` """ def _get_kWhActual(self) -> BatchFloat64ArrayProxy: @@ -1262,9 +1339,11 @@ def _set_kWhActual(self, value: Union[float, Float64Array], flags: enums.SetterF kWhActual = property(_get_kWhActual, _set_kWhActual) # type: BatchFloat64ArrayProxy """ - (Read only). Actual kWh stored of all controlled Storage elements. + Actual kWh stored of all controlled Storage elements. + + **Read-only** - DSS property name: `kWhActual`, DSS property index: 21. + Name: `kWhActual` """ def _get_kWActual(self) -> BatchFloat64ArrayProxy: @@ -1275,9 +1354,11 @@ def _set_kWActual(self, value: Union[float, Float64Array], flags: enums.SetterFl kWActual = property(_get_kWActual, _set_kWActual) # type: BatchFloat64ArrayProxy """ - (Read only). Actual kW output of all controlled Storage elements. + Actual kW output of all controlled Storage elements. - DSS property name: `kWActual`, DSS property index: 22. + **Read-only** + + Name: `kWActual` """ def _get_kWNeed(self) -> BatchFloat64ArrayProxy: @@ -1288,9 +1369,12 @@ def _set_kWNeed(self, value: Union[float, Float64Array], flags: enums.SetterFlag kWNeed = property(_get_kWNeed, _set_kWNeed) # type: BatchFloat64ArrayProxy """ - (Read only). KW needed to meet target. + kW needed to meet target. + + **Read-only** - DSS property name: `kWNeed`, DSS property index: 23. + Name: `kWNeed` + Units: kW """ def _get_Yearly_str(self) -> List[str]: @@ -1303,7 +1387,7 @@ def _set_Yearly_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ Dispatch loadshape object, If any, for Yearly solution Mode. - DSS property name: `Yearly`, DSS property index: 24. + Name: `Yearly` """ def _get_Yearly(self) -> List[LoadShape]: @@ -1316,7 +1400,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadSha """ Dispatch loadshape object, If any, for Yearly solution Mode. - DSS property name: `Yearly`, DSS property index: 24. + Name: `Yearly` """ def _get_Daily_str(self) -> List[str]: @@ -1329,7 +1413,7 @@ def _set_Daily_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter """ Dispatch loadshape object, If any, for Daily solution mode. - DSS property name: `Daily`, DSS property index: 25. + Name: `Daily` """ def _get_Daily(self) -> List[LoadShape]: @@ -1342,7 +1426,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShap """ Dispatch loadshape object, If any, for Daily solution mode. - DSS property name: `Daily`, DSS property index: 25. + Name: `Daily` """ def _get_Duty_str(self) -> List[str]: @@ -1355,7 +1439,7 @@ def _set_Duty_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF """ Dispatch loadshape object, If any, for Dutycycle solution mode. - DSS property name: `Duty`, DSS property index: 26. + Name: `Duty` """ def _get_Duty(self) -> List[LoadShape]: @@ -1368,7 +1452,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape """ Dispatch loadshape object, If any, for Dutycycle solution mode. - DSS property name: `Duty`, DSS property index: 26. + Name: `Duty` """ def _get_EventLog(self) -> List[bool]: @@ -1376,14 +1460,15 @@ def _get_EventLog(self) -> List[bool]: self._get_batch_int32_prop(27) ] - def _set_EventLog(self, value: bool, flags: enums.SetterFlags = 0): + def _set_EventLog(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(27, value, flags) EventLog = property(_get_EventLog, _set_EventLog) # type: List[bool] """ - {Yes/True | No/False} Default is No. Log control actions to Eventlog. + Log control actions to Eventlog. - DSS property name: `EventLog`, DSS property index: 27. + Name: `EventLog` + Default: False """ def _get_InhibitTime(self) -> BatchInt32ArrayProxy: @@ -1394,9 +1479,11 @@ def _set_InhibitTime(self, value: Union[int, Int32Array], flags: enums.SetterFla InhibitTime = property(_get_InhibitTime, _set_InhibitTime) # type: BatchInt32ArrayProxy """ - Hours (integer) to inhibit Discharging after going into Charge mode. Default is 5. + Hours (integer) to inhibit Discharging after going into Charge mode. - DSS property name: `InhibitTime`, DSS property index: 28. + Name: `InhibitTime` + Units: hour + Default: 5 """ def _get_TUp(self) -> BatchFloat64ArrayProxy: @@ -1407,9 +1494,11 @@ def _set_TUp(self, value: Union[float, Float64Array], flags: enums.SetterFlags = TUp = property(_get_TUp, _set_TUp) # type: BatchFloat64ArrayProxy """ - Duration, hrs, of upramp part for SCHEDULE mode. Default is 0.25. + Duration of upramp part for SCHEDULE mode. - DSS property name: `TUp`, DSS property index: 29. + Name: `TUp` + Units: hour + Default: 0.25 """ def _get_TFlat(self) -> BatchFloat64ArrayProxy: @@ -1420,9 +1509,11 @@ def _set_TFlat(self, value: Union[float, Float64Array], flags: enums.SetterFlags TFlat = property(_get_TFlat, _set_TFlat) # type: BatchFloat64ArrayProxy """ - Duration, hrs, of flat part for SCHEDULE mode. Default is 2.0. + Duration of flat part for SCHEDULE mode. - DSS property name: `TFlat`, DSS property index: 30. + Name: `TFlat` + Units: hour + Default: 2.0 """ def _get_TDn(self) -> BatchFloat64ArrayProxy: @@ -1433,9 +1524,11 @@ def _set_TDn(self, value: Union[float, Float64Array], flags: enums.SetterFlags = TDn = property(_get_TDn, _set_TDn) # type: BatchFloat64ArrayProxy """ - Duration, hrs, of downramp part for SCHEDULE mode. Default is 0.25. + Duration of downramp part for SCHEDULE mode. - DSS property name: `TDn`, DSS property index: 31. + Name: `TDn` + Units: hour + Default: 0.25 """ def _get_kWThreshold(self) -> BatchFloat64ArrayProxy: @@ -1448,7 +1541,8 @@ def _set_kWThreshold(self, value: Union[float, Float64Array], flags: enums.Sette """ Threshold, kW, for Follow mode. kW has to be above this value for the Storage element to be dispatched on. Defaults to 75% of the kWTarget value. Must reset this property after setting kWTarget if you want a different value. - DSS property name: `kWThreshold`, DSS property index: 32. + Name: `kWThreshold` + Units: kW """ def _get_DispFactor(self) -> BatchFloat64ArrayProxy: @@ -1463,7 +1557,8 @@ def _set_DispFactor(self, value: Union[float, Float64Array], flags: enums.Setter Use this parameter to reduce the amount of power requested by the controller in each control iteration. It can be useful when maximum control iterations are exceeded due to numerical instability such as fleet being set to charging and idling in subsequent control iterations (check the Eventlog). - DSS property name: `DispFactor`, DSS property index: 33. + Name: `DispFactor` + Default: 1.0 """ def _get_ResetLevel(self) -> BatchFloat64ArrayProxy: @@ -1476,7 +1571,8 @@ def _set_ResetLevel(self, value: Union[float, Float64Array], flags: enums.Setter """ The level of charge required for allowing the storage to discharge again after reaching the reserve storage level. After reaching this level, the storage control will not allow the storage device to discharge, forcing the storage to charge. Once the storage reaches this level, the storage will be able to discharge again. This value is a number between 0.2 and 1 - DSS property name: `ResetLevel`, DSS property index: 34. + Name: `ResetLevel` + Default: 0.8 """ def _get_Seasons(self) -> BatchInt32ArrayProxy: @@ -1489,7 +1585,7 @@ def _set_Seasons(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ With this property the user can specify the number of targets to be used by the controller using the list given at "SeasonTargets"/"SeasonTargetsLow", which can be used to dynamically adjust the storage controller during a QSTS simulation. The default value is 1. This property needs to be defined before defining SeasonTargets/SeasonTargetsLow. - DSS property name: `Seasons`, DSS property index: 35. + Name: `Seasons` """ def _get_SeasonTargets(self) -> List[Float64Array]: @@ -1505,7 +1601,8 @@ def _set_SeasonTargets(self, value: Union[Float64Array, List[Float64Array]], fla """ An array of doubles specifying the targets to be used during a QSTS simulation. These targets will take effect only if SeasonRating=true. The number of targets cannot exceed the number of seasons defined at the SeasonSignal.The difference between the targets defined at SeasonTargets and SeasonTargetsLow is that SeasonTargets applies to discharging modes, while SeasonTargetsLow applies to charging modes. - DSS property name: `SeasonTargets`, DSS property index: 36. + Name: `SeasonTargets` + Default: [8000.0] """ def _get_SeasonTargetsLow(self) -> List[Float64Array]: @@ -1521,7 +1618,8 @@ def _set_SeasonTargetsLow(self, value: Union[Float64Array, List[Float64Array]], """ An array of doubles specifying the targets to be used during a QSTS simulation. These targets will take effect only if SeasonRating=true. The number of targets cannot exceed the number of seasons defined at the SeasonSignal.The difference between the targets defined at SeasonTargets and SeasonTargetsLow is that SeasonTargets applies to discharging modes, while SeasonTargetsLow applies to charging modes. - DSS property name: `SeasonTargetsLow`, DSS property index: 37. + Name: `SeasonTargetsLow` + Default: [4000.0] """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -1534,7 +1632,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 38. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -1542,14 +1641,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(39) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(39, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 39. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1558,7 +1658,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 40. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(40, value, flags) diff --git a/altdss/SwtControl.py b/altdss/SwtControl.py index 0313215..5c0ab5a 100644 --- a/altdss/SwtControl.py +++ b/altdss/SwtControl.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -14,7 +14,7 @@ class SwtControl(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'SwtControl' - _cls_idx = 34 + _cls_idx = 35 _cls_int_idx = { 2, 3, @@ -72,7 +72,7 @@ def _set_SwitchedObj_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of circuit element switch that the SwtControl operates. Specify the full object class and name. - DSS property name: `SwitchedObj`, DSS property index: 1. + Name: `SwitchedObj` """ def _get_SwitchedObj(self) -> DSSObj: @@ -89,7 +89,7 @@ def _set_SwitchedObj(self, value: Union[AnyStr, DSSObj], flags: enums.SetterFlag """ Name of circuit element switch that the SwtControl operates. Specify the full object class and name. - DSS property name: `SwitchedObj`, DSS property index: 1. + Name: `SwitchedObj` """ def _get_SwitchedTerm(self) -> int: @@ -100,9 +100,10 @@ def _set_SwitchedTerm(self, value: int, flags: enums.SetterFlags = 0): SwitchedTerm = property(_get_SwitchedTerm, _set_SwitchedTerm) # type: int """ - Terminal number of the controlled element switch. 1 or 2, typically. Default is 1. + Terminal number of the controlled element switch. 1 or 2, typically. - DSS property name: `SwitchedTerm`, DSS property index: 2. + Name: `SwitchedTerm` + Default: 1 """ def _get_Lock(self) -> bool: @@ -113,9 +114,10 @@ def _set_Lock(self, value: bool, flags: enums.SetterFlags = 0): Lock = property(_get_Lock, _set_Lock) # type: bool """ - {Yes | No} Delayed action. Sends CTRL_LOCK or CTRL_UNLOCK message to control queue. After delay time, controlled switch is locked in its present open / close state or unlocked. Switch will not respond to either manual (Action) or automatic (APIs) control or internal OpenDSS Reset when locked. + Delayed action. Sends CTRL_LOCK or CTRL_UNLOCK message to control queue. After delay time, controlled switch is locked in its present open / close state or unlocked. Switch will not respond to either manual (Action) or automatic (APIs) control or internal OpenDSS Reset when locked. - DSS property name: `Lock`, DSS property index: 4. + Name: `Lock` + Default: False """ def _get_Delay(self) -> float: @@ -126,9 +128,11 @@ def _set_Delay(self, value: float, flags: enums.SetterFlags = 0): Delay = property(_get_Delay, _set_Delay) # type: float """ - Operating time delay (sec) of the switch. Defaults to 120. + Operating time delay of the switch. - DSS property name: `Delay`, DSS property index: 5. + Name: `Delay` + Units: s + Default: 120.0 """ def _get_Normal(self) -> enums.SwtControlState: @@ -142,9 +146,10 @@ def _set_Normal(self, value: Union[AnyStr, int, enums.SwtControlState], flags: e Normal = property(_get_Normal, _set_Normal) # type: enums.SwtControlState """ - {Open | Closed] Normal state of the switch. If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared. + Normal state of the switch. If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared. - DSS property name: `Normal`, DSS property index: 6. + Name: `Normal` + Default: None """ def _get_Normal_str(self) -> str: @@ -155,9 +160,10 @@ def _set_Normal_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Normal_str = property(_get_Normal_str, _set_Normal_str) # type: str """ - {Open | Closed] Normal state of the switch. If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared. + Normal state of the switch. If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared. - DSS property name: `Normal`, DSS property index: 6. + Name: `Normal` + Default: None """ def _get_State(self) -> enums.SwtControlState: @@ -171,9 +177,10 @@ def _set_State(self, value: Union[AnyStr, int, enums.SwtControlState], flags: en State = property(_get_State, _set_State) # type: enums.SwtControlState """ - {Open | Closed] Present state of the switch. Upon setting, immediately forces state of switch. + Present state of the switch. Upon setting, immediately forces state of switch. - DSS property name: `State`, DSS property index: 7. + Name: `State` + Default: None """ def _get_State_str(self) -> str: @@ -184,16 +191,18 @@ def _set_State_str(self, value: AnyStr, flags: enums.SetterFlags = 0): State_str = property(_get_State_str, _set_State_str) # type: str """ - {Open | Closed] Present state of the switch. Upon setting, immediately forces state of switch. + Present state of the switch. Upon setting, immediately forces state of switch. - DSS property name: `State`, DSS property index: 7. + Name: `State` + Default: None """ def Reset(self, value: bool = True, flags: enums.SetterFlags = 0): """ - {Yes | No} If Yes, forces Reset of switch to Normal state and removes Lock independently of any internal reset command for mode change, etc. + If Yes, forces Reset of switch to Normal state and removes Lock independently of any internal reset command for mode change, etc. - DSS property name: `Reset`, DSS property index: 8. + Name: `Reset` + Default: False """ self._lib.Obj_SetInt32(self._ptr, 8, value, flags) @@ -207,7 +216,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 9. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -218,9 +228,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 10. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -229,7 +240,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 11. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(11, value) @@ -249,7 +262,7 @@ class SwtControlProperties(TypedDict): class SwtControlBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'SwtControl' _obj_cls = SwtControl - _cls_idx = 34 + _cls_idx = 35 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -287,7 +300,7 @@ def _set_SwitchedObj_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums. """ Name of circuit element switch that the SwtControl operates. Specify the full object class and name. - DSS property name: `SwitchedObj`, DSS property index: 1. + Name: `SwitchedObj` """ def _get_SwitchedObj(self) -> List[DSSObj]: @@ -300,7 +313,7 @@ def _set_SwitchedObj(self, value: Union[AnyStr, DSSObj, List[AnyStr], List[DSSOb """ Name of circuit element switch that the SwtControl operates. Specify the full object class and name. - DSS property name: `SwitchedObj`, DSS property index: 1. + Name: `SwitchedObj` """ def _get_SwitchedTerm(self) -> BatchInt32ArrayProxy: @@ -311,9 +324,10 @@ def _set_SwitchedTerm(self, value: Union[int, Int32Array], flags: enums.SetterFl SwitchedTerm = property(_get_SwitchedTerm, _set_SwitchedTerm) # type: BatchInt32ArrayProxy """ - Terminal number of the controlled element switch. 1 or 2, typically. Default is 1. + Terminal number of the controlled element switch. 1 or 2, typically. - DSS property name: `SwitchedTerm`, DSS property index: 2. + Name: `SwitchedTerm` + Default: 1 """ def _get_Lock(self) -> List[bool]: @@ -321,14 +335,15 @@ def _get_Lock(self) -> List[bool]: self._get_batch_int32_prop(4) ] - def _set_Lock(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Lock(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(4, value, flags) Lock = property(_get_Lock, _set_Lock) # type: List[bool] """ - {Yes | No} Delayed action. Sends CTRL_LOCK or CTRL_UNLOCK message to control queue. After delay time, controlled switch is locked in its present open / close state or unlocked. Switch will not respond to either manual (Action) or automatic (APIs) control or internal OpenDSS Reset when locked. + Delayed action. Sends CTRL_LOCK or CTRL_UNLOCK message to control queue. After delay time, controlled switch is locked in its present open / close state or unlocked. Switch will not respond to either manual (Action) or automatic (APIs) control or internal OpenDSS Reset when locked. - DSS property name: `Lock`, DSS property index: 4. + Name: `Lock` + Default: False """ def _get_Delay(self) -> BatchFloat64ArrayProxy: @@ -339,9 +354,11 @@ def _set_Delay(self, value: Union[float, Float64Array], flags: enums.SetterFlags Delay = property(_get_Delay, _set_Delay) # type: BatchFloat64ArrayProxy """ - Operating time delay (sec) of the switch. Defaults to 120. + Operating time delay of the switch. - DSS property name: `Delay`, DSS property index: 5. + Name: `Delay` + Units: s + Default: 120.0 """ def _get_Normal(self) -> BatchInt32ArrayProxy: @@ -356,9 +373,10 @@ def _set_Normal(self, value: Union[AnyStr, int, enums.SwtControlState, List[AnyS Normal = property(_get_Normal, _set_Normal) # type: BatchInt32ArrayProxy """ - {Open | Closed] Normal state of the switch. If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared. + Normal state of the switch. If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared. - DSS property name: `Normal`, DSS property index: 6. + Name: `Normal` + Default: None """ def _get_Normal_str(self) -> List[str]: @@ -369,9 +387,10 @@ def _set_Normal_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Normal_str = property(_get_Normal_str, _set_Normal_str) # type: List[str] """ - {Open | Closed] Normal state of the switch. If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared. + Normal state of the switch. If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared. - DSS property name: `Normal`, DSS property index: 6. + Name: `Normal` + Default: None """ def _get_State(self) -> BatchInt32ArrayProxy: @@ -386,9 +405,10 @@ def _set_State(self, value: Union[AnyStr, int, enums.SwtControlState, List[AnySt State = property(_get_State, _set_State) # type: BatchInt32ArrayProxy """ - {Open | Closed] Present state of the switch. Upon setting, immediately forces state of switch. + Present state of the switch. Upon setting, immediately forces state of switch. - DSS property name: `State`, DSS property index: 7. + Name: `State` + Default: None """ def _get_State_str(self) -> List[str]: @@ -399,16 +419,18 @@ def _set_State_str(self, value: AnyStr, flags: enums.SetterFlags = 0): State_str = property(_get_State_str, _set_State_str) # type: List[str] """ - {Open | Closed] Present state of the switch. Upon setting, immediately forces state of switch. + Present state of the switch. Upon setting, immediately forces state of switch. - DSS property name: `State`, DSS property index: 7. + Name: `State` + Default: None """ def Reset(self, value: Union[bool, List[bool]] = True, flags: enums.SetterFlags = 0): """ - {Yes | No} If Yes, forces Reset of switch to Normal state and removes Lock independently of any internal reset command for mode change, etc. + If Yes, forces Reset of switch to Normal state and removes Lock independently of any internal reset command for mode change, etc. - DSS property name: `Reset`, DSS property index: 8. + Name: `Reset` + Default: False """ self._set_batch_int32_array(8, value, flags) @@ -422,7 +444,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 9. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -430,14 +453,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(10) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(10, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 10. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -446,7 +470,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 11. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(11, value, flags) diff --git a/altdss/TCC_Curve.py b/altdss/TCC_Curve.py index ce0f2f9..aa9f02e 100644 --- a/altdss/TCC_Curve.py +++ b/altdss/TCC_Curve.py @@ -53,7 +53,7 @@ def _set_NPts(self, value: int, flags: enums.SetterFlags = 0): """ Number of points to expect in time-current arrays. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_C_Array(self) -> Float64Array: @@ -66,7 +66,7 @@ def _set_C_Array(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Array of current (or voltage) values corresponding to time values (see help on T_Array). - DSS property name: `C_Array`, DSS property index: 2. + Name: `C_Array` """ def _get_T_Array(self) -> Float64Array: @@ -85,7 +85,7 @@ def _set_T_Array(self, value: Float64Array, flags: enums.SetterFlags = 0): The specified file has one value per line. - DSS property name: `T_Array`, DSS property index: 3. + Name: `T_Array` """ def Like(self, value: AnyStr): @@ -94,7 +94,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 4. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(4, value) @@ -143,7 +145,7 @@ def _set_NPts(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0) """ Number of points to expect in time-current arrays. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_C_Array(self) -> List[Float64Array]: @@ -159,7 +161,7 @@ def _set_C_Array(self, value: Union[Float64Array, List[Float64Array]], flags: en """ Array of current (or voltage) values corresponding to time values (see help on T_Array). - DSS property name: `C_Array`, DSS property index: 2. + Name: `C_Array` """ def _get_T_Array(self) -> List[Float64Array]: @@ -181,7 +183,7 @@ def _set_T_Array(self, value: Union[Float64Array, List[Float64Array]], flags: en The specified file has one value per line. - DSS property name: `T_Array`, DSS property index: 3. + Name: `T_Array` """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -190,7 +192,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 4. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(4, value, flags) diff --git a/altdss/TSData.py b/altdss/TSData.py index 3fea0ae..c5bfae9 100644 --- a/altdss/TSData.py +++ b/altdss/TSData.py @@ -87,9 +87,9 @@ def _set_DiaShield(self, value: float, flags: enums.SetterFlags = 0): DiaShield = property(_get_DiaShield, _set_DiaShield) # type: float """ - Diameter over tape shield; same units as radius; no default. + Diameter over tape shield; same units as radius. - DSS property name: `DiaShield`, DSS property index: 1. + Name: `DiaShield` """ def _get_TapeLayer(self) -> float: @@ -100,9 +100,9 @@ def _set_TapeLayer(self, value: float, flags: enums.SetterFlags = 0): TapeLayer = property(_get_TapeLayer, _set_TapeLayer) # type: float """ - Tape shield thickness; same units as radius; no default. + Tape shield thickness; same units as radius. - DSS property name: `TapeLayer`, DSS property index: 2. + Name: `TapeLayer` """ def _get_TapeLap(self) -> float: @@ -113,9 +113,9 @@ def _set_TapeLap(self, value: float, flags: enums.SetterFlags = 0): TapeLap = property(_get_TapeLap, _set_TapeLap) # type: float """ - Tape Lap in percent; default 20.0 + Tape Lap in percent - DSS property name: `TapeLap`, DSS property index: 3. + Name: `TapeLap` """ def _get_EpsR(self) -> float: @@ -126,9 +126,10 @@ def _set_EpsR(self, value: float, flags: enums.SetterFlags = 0): EpsR = property(_get_EpsR, _set_EpsR) # type: float """ - Insulation layer relative permittivity; default is 2.3. + Insulation layer relative permittivity. - DSS property name: `EpsR`, DSS property index: 4. + Name: `EpsR` + Default: 2.3 """ def _get_InsLayer(self) -> float: @@ -139,9 +140,9 @@ def _set_InsLayer(self, value: float, flags: enums.SetterFlags = 0): InsLayer = property(_get_InsLayer, _set_InsLayer) # type: float """ - Insulation layer thickness; same units as radius; no default. With DiaIns, establishes inner radius for capacitance calculation. + Insulation layer thickness; same units as radius. With DiaIns, establishes inner radius for capacitance calculation. - DSS property name: `InsLayer`, DSS property index: 5. + Name: `InsLayer` """ def _get_DiaIns(self) -> float: @@ -152,9 +153,9 @@ def _set_DiaIns(self, value: float, flags: enums.SetterFlags = 0): DiaIns = property(_get_DiaIns, _set_DiaIns) # type: float """ - Diameter over insulation layer; same units as radius; no default. Establishes outer radius for capacitance calculation. + Diameter over insulation layer; same units as radius. Establishes outer radius for capacitance calculation. - DSS property name: `DiaIns`, DSS property index: 6. + Name: `DiaIns` """ def _get_DiaCable(self) -> float: @@ -165,9 +166,9 @@ def _set_DiaCable(self, value: float, flags: enums.SetterFlags = 0): DiaCable = property(_get_DiaCable, _set_DiaCable) # type: float """ - Diameter over cable; same units as radius; no default. + Diameter over cable; same units as radius. - DSS property name: `DiaCable`, DSS property index: 7. + Name: `DiaCable` """ def _get_RDC(self) -> float: @@ -178,9 +179,10 @@ def _set_RDC(self, value: float, flags: enums.SetterFlags = 0): RDC = property(_get_RDC, _set_RDC) # type: float """ - dc Resistance, ohms per unit length (see Runits). Defaults to Rac/1.02 if not specified. + DC resistance, ohms per unit length (see `Runits`). Defaults to $Rac/1.02$ if not specified. - DSS property name: `RDC`, DSS property index: 8. + Name: `RDC` + Units: Ω/[length_unit] """ def _get_RAC(self) -> float: @@ -191,9 +193,9 @@ def _set_RAC(self, value: float, flags: enums.SetterFlags = 0): RAC = property(_get_RAC, _set_RAC) # type: float """ - Resistance at 60 Hz per unit length. Defaults to 1.02*Rdc if not specified. + Resistance at 60 Hz per unit length. Defaults to $1.02 × Rdc$ if not specified. - DSS property name: `RAC`, DSS property index: 9. + Name: `RAC` """ def _get_RUnits(self) -> enums.LengthUnit: @@ -209,7 +211,8 @@ def _set_RUnits(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enums. """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 10. + Name: `RUnits` + Default: none """ def _get_RUnits_str(self) -> str: @@ -222,7 +225,8 @@ def _set_RUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 10. + Name: `RUnits` + Default: none """ def _get_GMRAC(self) -> float: @@ -233,9 +237,9 @@ def _set_GMRAC(self, value: float, flags: enums.SetterFlags = 0): GMRAC = property(_get_GMRAC, _set_GMRAC) # type: float """ - GMR at 60 Hz. Defaults to .7788*radius if not specified. + GMR at 60 Hz. Defaults to $0.7788 × radius$ if not specified. - DSS property name: `GMRAC`, DSS property index: 11. + Name: `GMRAC` """ def _get_GMRUnits(self) -> enums.LengthUnit: @@ -249,9 +253,10 @@ def _set_GMRUnits(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enum GMRUnits = property(_get_GMRUnits, _set_GMRUnits) # type: enums.LengthUnit """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 12. + Name: `GMRUnits` + Default: none """ def _get_GMRUnits_str(self) -> str: @@ -262,9 +267,10 @@ def _set_GMRUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): GMRUnits_str = property(_get_GMRUnits_str, _set_GMRUnits_str) # type: str """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 12. + Name: `GMRUnits` + Default: none """ def _get_Radius(self) -> float: @@ -277,7 +283,7 @@ def _set_Radius(self, value: float, flags: enums.SetterFlags = 0): """ Outside radius of conductor. Defaults to GMR/0.7788 if not specified. - DSS property name: `Radius`, DSS property index: 13. + Name: `Radius` """ def _get_RadUnits(self) -> enums.LengthUnit: @@ -291,9 +297,10 @@ def _set_RadUnits(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enum RadUnits = property(_get_RadUnits, _set_RadUnits) # type: enums.LengthUnit """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 14. + Name: `RadUnits` + Default: none """ def _get_RadUnits_str(self) -> str: @@ -304,9 +311,10 @@ def _set_RadUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): RadUnits_str = property(_get_RadUnits_str, _set_RadUnits_str) # type: str """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 14. + Name: `RadUnits` + Default: none """ def _get_NormAmps(self) -> float: @@ -317,9 +325,9 @@ def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): NormAmps = property(_get_NormAmps, _set_NormAmps) # type: float """ - Normal ampacity, amperes. Defaults to Emergency amps/1.5 if not specified. + Normal ampacity, amperes. Defaults to $EmergAmps / 1.5$ if not specified. - DSS property name: `NormAmps`, DSS property index: 15. + Name: `NormAmps` """ def _get_EmergAmps(self) -> float: @@ -330,9 +338,9 @@ def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: float """ - Emergency ampacity, amperes. Defaults to 1.5 * Normal Amps if not specified. + Emergency ampacity, amperes. Defaults to $1.5 × NormAmps$ if not specified. - DSS property name: `EmergAmps`, DSS property index: 16. + Name: `EmergAmps` """ def _get_Diam(self) -> float: @@ -345,7 +353,7 @@ def _set_Diam(self, value: float, flags: enums.SetterFlags = 0): """ Diameter; Alternative method for entering radius. - DSS property name: `Diam`, DSS property index: 17. + Name: `Diam` """ def _get_Seasons(self) -> int: @@ -358,7 +366,7 @@ def _set_Seasons(self, value: int, flags: enums.SetterFlags = 0): """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 18. + Name: `Seasons` """ def _get_Ratings(self) -> Float64Array: @@ -372,7 +380,8 @@ def _set_Ratings(self, value: Float64Array, flags: enums.SetterFlags = 0): An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. - DSS property name: `Ratings`, DSS property index: 19. + Name: `Ratings` + Default: [-1.0] """ def _get_CapRadius(self) -> float: @@ -385,7 +394,7 @@ def _set_CapRadius(self, value: float, flags: enums.SetterFlags = 0): """ Equivalent conductor radius for capacitance calcs. Specify this for bundled conductors. Defaults to same value as radius. Define Diam or Radius property first. - DSS property name: `CapRadius`, DSS property index: 20. + Name: `CapRadius` """ def Like(self, value: AnyStr): @@ -394,7 +403,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 21. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(21, value) @@ -458,9 +469,9 @@ def _set_DiaShield(self, value: Union[float, Float64Array], flags: enums.SetterF DiaShield = property(_get_DiaShield, _set_DiaShield) # type: BatchFloat64ArrayProxy """ - Diameter over tape shield; same units as radius; no default. + Diameter over tape shield; same units as radius. - DSS property name: `DiaShield`, DSS property index: 1. + Name: `DiaShield` """ def _get_TapeLayer(self) -> BatchFloat64ArrayProxy: @@ -471,9 +482,9 @@ def _set_TapeLayer(self, value: Union[float, Float64Array], flags: enums.SetterF TapeLayer = property(_get_TapeLayer, _set_TapeLayer) # type: BatchFloat64ArrayProxy """ - Tape shield thickness; same units as radius; no default. + Tape shield thickness; same units as radius. - DSS property name: `TapeLayer`, DSS property index: 2. + Name: `TapeLayer` """ def _get_TapeLap(self) -> BatchFloat64ArrayProxy: @@ -484,9 +495,9 @@ def _set_TapeLap(self, value: Union[float, Float64Array], flags: enums.SetterFla TapeLap = property(_get_TapeLap, _set_TapeLap) # type: BatchFloat64ArrayProxy """ - Tape Lap in percent; default 20.0 + Tape Lap in percent - DSS property name: `TapeLap`, DSS property index: 3. + Name: `TapeLap` """ def _get_EpsR(self) -> BatchFloat64ArrayProxy: @@ -497,9 +508,10 @@ def _set_EpsR(self, value: Union[float, Float64Array], flags: enums.SetterFlags EpsR = property(_get_EpsR, _set_EpsR) # type: BatchFloat64ArrayProxy """ - Insulation layer relative permittivity; default is 2.3. + Insulation layer relative permittivity. - DSS property name: `EpsR`, DSS property index: 4. + Name: `EpsR` + Default: 2.3 """ def _get_InsLayer(self) -> BatchFloat64ArrayProxy: @@ -510,9 +522,9 @@ def _set_InsLayer(self, value: Union[float, Float64Array], flags: enums.SetterFl InsLayer = property(_get_InsLayer, _set_InsLayer) # type: BatchFloat64ArrayProxy """ - Insulation layer thickness; same units as radius; no default. With DiaIns, establishes inner radius for capacitance calculation. + Insulation layer thickness; same units as radius. With DiaIns, establishes inner radius for capacitance calculation. - DSS property name: `InsLayer`, DSS property index: 5. + Name: `InsLayer` """ def _get_DiaIns(self) -> BatchFloat64ArrayProxy: @@ -523,9 +535,9 @@ def _set_DiaIns(self, value: Union[float, Float64Array], flags: enums.SetterFlag DiaIns = property(_get_DiaIns, _set_DiaIns) # type: BatchFloat64ArrayProxy """ - Diameter over insulation layer; same units as radius; no default. Establishes outer radius for capacitance calculation. + Diameter over insulation layer; same units as radius. Establishes outer radius for capacitance calculation. - DSS property name: `DiaIns`, DSS property index: 6. + Name: `DiaIns` """ def _get_DiaCable(self) -> BatchFloat64ArrayProxy: @@ -536,9 +548,9 @@ def _set_DiaCable(self, value: Union[float, Float64Array], flags: enums.SetterFl DiaCable = property(_get_DiaCable, _set_DiaCable) # type: BatchFloat64ArrayProxy """ - Diameter over cable; same units as radius; no default. + Diameter over cable; same units as radius. - DSS property name: `DiaCable`, DSS property index: 7. + Name: `DiaCable` """ def _get_RDC(self) -> BatchFloat64ArrayProxy: @@ -549,9 +561,10 @@ def _set_RDC(self, value: Union[float, Float64Array], flags: enums.SetterFlags = RDC = property(_get_RDC, _set_RDC) # type: BatchFloat64ArrayProxy """ - dc Resistance, ohms per unit length (see Runits). Defaults to Rac/1.02 if not specified. + DC resistance, ohms per unit length (see `Runits`). Defaults to $Rac/1.02$ if not specified. - DSS property name: `RDC`, DSS property index: 8. + Name: `RDC` + Units: Ω/[length_unit] """ def _get_RAC(self) -> BatchFloat64ArrayProxy: @@ -562,9 +575,9 @@ def _set_RAC(self, value: Union[float, Float64Array], flags: enums.SetterFlags = RAC = property(_get_RAC, _set_RAC) # type: BatchFloat64ArrayProxy """ - Resistance at 60 Hz per unit length. Defaults to 1.02*Rdc if not specified. + Resistance at 60 Hz per unit length. Defaults to $1.02 × Rdc$ if not specified. - DSS property name: `RAC`, DSS property index: 9. + Name: `RAC` """ def _get_RUnits(self) -> BatchInt32ArrayProxy: @@ -581,7 +594,8 @@ def _set_RUnits(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 10. + Name: `RUnits` + Default: none """ def _get_RUnits_str(self) -> List[str]: @@ -594,7 +608,8 @@ def _set_RUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 10. + Name: `RUnits` + Default: none """ def _get_GMRAC(self) -> BatchFloat64ArrayProxy: @@ -605,9 +620,9 @@ def _set_GMRAC(self, value: Union[float, Float64Array], flags: enums.SetterFlags GMRAC = property(_get_GMRAC, _set_GMRAC) # type: BatchFloat64ArrayProxy """ - GMR at 60 Hz. Defaults to .7788*radius if not specified. + GMR at 60 Hz. Defaults to $0.7788 × radius$ if not specified. - DSS property name: `GMRAC`, DSS property index: 11. + Name: `GMRAC` """ def _get_GMRUnits(self) -> BatchInt32ArrayProxy: @@ -622,9 +637,10 @@ def _set_GMRUnits(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr] GMRUnits = property(_get_GMRUnits, _set_GMRUnits) # type: BatchInt32ArrayProxy """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 12. + Name: `GMRUnits` + Default: none """ def _get_GMRUnits_str(self) -> List[str]: @@ -635,9 +651,10 @@ def _set_GMRUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): GMRUnits_str = property(_get_GMRUnits_str, _set_GMRUnits_str) # type: List[str] """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 12. + Name: `GMRUnits` + Default: none """ def _get_Radius(self) -> BatchFloat64ArrayProxy: @@ -650,7 +667,7 @@ def _set_Radius(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Outside radius of conductor. Defaults to GMR/0.7788 if not specified. - DSS property name: `Radius`, DSS property index: 13. + Name: `Radius` """ def _get_RadUnits(self) -> BatchInt32ArrayProxy: @@ -665,9 +682,10 @@ def _set_RadUnits(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr] RadUnits = property(_get_RadUnits, _set_RadUnits) # type: BatchInt32ArrayProxy """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 14. + Name: `RadUnits` + Default: none """ def _get_RadUnits_str(self) -> List[str]: @@ -678,9 +696,10 @@ def _set_RadUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): RadUnits_str = property(_get_RadUnits_str, _set_RadUnits_str) # type: List[str] """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 14. + Name: `RadUnits` + Default: none """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: @@ -691,9 +710,9 @@ def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFl NormAmps = property(_get_NormAmps, _set_NormAmps) # type: BatchFloat64ArrayProxy """ - Normal ampacity, amperes. Defaults to Emergency amps/1.5 if not specified. + Normal ampacity, amperes. Defaults to $EmergAmps / 1.5$ if not specified. - DSS property name: `NormAmps`, DSS property index: 15. + Name: `NormAmps` """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: @@ -704,9 +723,9 @@ def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterF EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: BatchFloat64ArrayProxy """ - Emergency ampacity, amperes. Defaults to 1.5 * Normal Amps if not specified. + Emergency ampacity, amperes. Defaults to $1.5 × NormAmps$ if not specified. - DSS property name: `EmergAmps`, DSS property index: 16. + Name: `EmergAmps` """ def _get_Diam(self) -> BatchFloat64ArrayProxy: @@ -719,7 +738,7 @@ def _set_Diam(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Diameter; Alternative method for entering radius. - DSS property name: `Diam`, DSS property index: 17. + Name: `Diam` """ def _get_Seasons(self) -> BatchInt32ArrayProxy: @@ -732,7 +751,7 @@ def _set_Seasons(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 18. + Name: `Seasons` """ def _get_Ratings(self) -> List[Float64Array]: @@ -749,7 +768,8 @@ def _set_Ratings(self, value: Union[Float64Array, List[Float64Array]], flags: en An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. - DSS property name: `Ratings`, DSS property index: 19. + Name: `Ratings` + Default: [-1.0] """ def _get_CapRadius(self) -> BatchFloat64ArrayProxy: @@ -762,7 +782,7 @@ def _set_CapRadius(self, value: Union[float, Float64Array], flags: enums.SetterF """ Equivalent conductor radius for capacitance calcs. Specify this for bundled conductors. Defaults to same value as radius. Define Diam or Radius property first. - DSS property name: `CapRadius`, DSS property index: 20. + Name: `CapRadius` """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -771,7 +791,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 21. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(21, value, flags) diff --git a/altdss/TShape.py b/altdss/TShape.py index 440cb1d..7beaad4 100644 --- a/altdss/TShape.py +++ b/altdss/TShape.py @@ -68,7 +68,7 @@ def _set_NPts(self, value: int, flags: enums.SetterFlags = 0): """ Max number of points to expect in temperature shape vectors. This gets reset to the number of Temperature values found if less than specified. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_Interval(self) -> float: @@ -83,7 +83,8 @@ def _set_Interval(self, value: float, flags: enums.SetterFlags = 0): See also "sinterval" and "minterval". - DSS property name: `Interval`, DSS property index: 2. + Name: `Interval` + Default: 1.0 """ def _get_Temp(self) -> Float64Array: @@ -101,7 +102,7 @@ def _set_Temp(self, value: Float64Array, flags: enums.SetterFlags = 0): Note: this property will reset Npts if the number of values in the files are fewer. - DSS property name: `Temp`, DSS property index: 3. + Name: `Temp` """ def _get_Hour(self) -> Float64Array: @@ -117,7 +118,7 @@ def _set_Hour(self, value: Float64Array, flags: enums.SetterFlags = 0): hour = (dblfile=filename) !for packed file of doubles hour = (sngfile=filename) !for packed file of singles - DSS property name: `Hour`, DSS property index: 4. + Name: `Hour` """ def _get_Mean(self) -> float: @@ -130,7 +131,7 @@ def _set_Mean(self, value: float, flags: enums.SetterFlags = 0): """ Mean of the temperature curve values. This is computed on demand the first time a value is needed. However, you may set it to another value independently. Used for Monte Carlo load simulations. - DSS property name: `Mean`, DSS property index: 5. + Name: `Mean` """ def _get_StdDev(self) -> float: @@ -145,7 +146,7 @@ def _set_StdDev(self, value: float, flags: enums.SetterFlags = 0): Used for Monte Carlo load simulations. - DSS property name: `StdDev`, DSS property index: 6. + Name: `StdDev` """ def _get_CSVFile(self) -> str: @@ -158,7 +159,7 @@ def _set_CSVFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of temperature curve data to a csv file containing (hour, Temp) points, or simply (Temp) values for fixed time interval data, one per line. NOTE: This action may reset the number of points to a lower value. - DSS property name: `CSVFile`, DSS property index: 7. + Name: `CSVFile` """ def _get_SngFile(self) -> str: @@ -171,7 +172,7 @@ def _set_SngFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of temperature curve data to a binary file of singles containing (hour, Temp) points, or simply (Temp) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `SngFile`, DSS property index: 8. + Name: `SngFile` """ def _get_DblFile(self) -> str: @@ -184,7 +185,7 @@ def _set_DblFile(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Switch input of temperature curve data to a binary file of doubles containing (hour, Temp) points, or simply (Temp) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `DblFile`, DSS property index: 9. + Name: `DblFile` """ def _get_SInterval(self) -> float: @@ -197,7 +198,7 @@ def _set_SInterval(self, value: float, flags: enums.SetterFlags = 0): """ Specify fixed interval in SECONDS. Alternate way to specify Interval property. - DSS property name: `SInterval`, DSS property index: 10. + Name: `SInterval` """ def _get_MInterval(self) -> float: @@ -210,14 +211,14 @@ def _set_MInterval(self, value: float, flags: enums.SetterFlags = 0): """ Specify fixed interval in MINUTES. Alternate way to specify Interval property. - DSS property name: `MInterval`, DSS property index: 11. + Name: `MInterval` """ def Action(self, value: Union[AnyStr, int, enums.TShapeAction], flags: enums.SetterFlags = 0): """ {DblSave | SngSave} After defining temperature curve data... Setting action=DblSave or SngSave will cause the present "Temp" values to be written to either a packed file of double or single. The filename is the Tshape name. - DSS property name: `Action`, DSS property index: 12. + Name: `Action` """ if isinstance(value, int): self._lib.Obj_SetInt32(self._ptr, 12, value, flags) @@ -239,7 +240,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 13. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(13, value) @@ -297,7 +300,7 @@ def _set_NPts(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0) """ Max number of points to expect in temperature shape vectors. This gets reset to the number of Temperature values found if less than specified. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_Interval(self) -> BatchFloat64ArrayProxy: @@ -312,7 +315,8 @@ def _set_Interval(self, value: Union[float, Float64Array], flags: enums.SetterFl See also "sinterval" and "minterval". - DSS property name: `Interval`, DSS property index: 2. + Name: `Interval` + Default: 1.0 """ def _get_Temp(self) -> List[Float64Array]: @@ -333,7 +337,7 @@ def _set_Temp(self, value: Union[Float64Array, List[Float64Array]], flags: enums Note: this property will reset Npts if the number of values in the files are fewer. - DSS property name: `Temp`, DSS property index: 3. + Name: `Temp` """ def _get_Hour(self) -> List[Float64Array]: @@ -352,7 +356,7 @@ def _set_Hour(self, value: Union[Float64Array, List[Float64Array]], flags: enums hour = (dblfile=filename) !for packed file of doubles hour = (sngfile=filename) !for packed file of singles - DSS property name: `Hour`, DSS property index: 4. + Name: `Hour` """ def _get_Mean(self) -> BatchFloat64ArrayProxy: @@ -365,7 +369,7 @@ def _set_Mean(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Mean of the temperature curve values. This is computed on demand the first time a value is needed. However, you may set it to another value independently. Used for Monte Carlo load simulations. - DSS property name: `Mean`, DSS property index: 5. + Name: `Mean` """ def _get_StdDev(self) -> BatchFloat64ArrayProxy: @@ -380,7 +384,7 @@ def _set_StdDev(self, value: Union[float, Float64Array], flags: enums.SetterFlag Used for Monte Carlo load simulations. - DSS property name: `StdDev`, DSS property index: 6. + Name: `StdDev` """ def _get_CSVFile(self) -> List[str]: @@ -393,7 +397,7 @@ def _set_CSVFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of temperature curve data to a csv file containing (hour, Temp) points, or simply (Temp) values for fixed time interval data, one per line. NOTE: This action may reset the number of points to a lower value. - DSS property name: `CSVFile`, DSS property index: 7. + Name: `CSVFile` """ def _get_SngFile(self) -> List[str]: @@ -406,7 +410,7 @@ def _set_SngFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of temperature curve data to a binary file of singles containing (hour, Temp) points, or simply (Temp) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `SngFile`, DSS property index: 8. + Name: `SngFile` """ def _get_DblFile(self) -> List[str]: @@ -419,7 +423,7 @@ def _set_DblFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Switch input of temperature curve data to a binary file of doubles containing (hour, Temp) points, or simply (Temp) values for fixed time interval data, packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `DblFile`, DSS property index: 9. + Name: `DblFile` """ def _get_SInterval(self) -> BatchFloat64ArrayProxy: @@ -432,7 +436,7 @@ def _set_SInterval(self, value: Union[float, Float64Array], flags: enums.SetterF """ Specify fixed interval in SECONDS. Alternate way to specify Interval property. - DSS property name: `SInterval`, DSS property index: 10. + Name: `SInterval` """ def _get_MInterval(self) -> BatchFloat64ArrayProxy: @@ -445,14 +449,14 @@ def _set_MInterval(self, value: Union[float, Float64Array], flags: enums.SetterF """ Specify fixed interval in MINUTES. Alternate way to specify Interval property. - DSS property name: `MInterval`, DSS property index: 11. + Name: `MInterval` """ def Action(self, value: Union[AnyStr, int, enums.TShapeAction], flags: enums.SetterFlags = 0): """ {DblSave | SngSave} After defining temperature curve data... Setting action=DblSave or SngSave will cause the present "Temp" values to be written to either a packed file of double or single. The filename is the Tshape name. - DSS property name: `Action`, DSS property index: 12. + Name: `Action` """ if isinstance(value, (bytes, str)) or (isinstance(value, LIST_LIKE) and len(value) > 0 and isinstance(value[0], (bytes, str))): self._set_batch_string(12, value, flags) @@ -473,7 +477,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 13. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(13, value, flags) diff --git a/altdss/Topology.py b/altdss/Topology.py index fc62997..60b4d7d 100644 --- a/altdss/Topology.py +++ b/altdss/Topology.py @@ -25,7 +25,7 @@ def ActiveBranch(self) -> int: Original COM help: https://opendss.epri.com/ActiveBranch.html ''' - return self._check_for_error(self._lib.Topology_Get_ActiveBranch()) + return self._lib.Topology_Get_ActiveBranch() @property def ActiveLevel(self) -> int: @@ -34,7 +34,7 @@ def ActiveLevel(self) -> int: Original COM help: https://opendss.epri.com/ActiveLevel.html ''' - return self._check_for_error(self._lib.Topology_Get_ActiveLevel()) + return self._lib.Topology_Get_ActiveLevel() @property def AllIsolatedBranches(self) -> List[str]: @@ -43,7 +43,7 @@ def AllIsolatedBranches(self) -> List[str]: Original COM help: https://opendss.epri.com/AllIsolatedBranches.html ''' - return self._check_for_error(self._get_string_array(self._lib.Topology_Get_AllIsolatedBranches)) + return self._lib.Topology_Get_AllIsolatedBranches() @property def AllIsolatedLoads(self) -> List[str]: @@ -52,7 +52,7 @@ def AllIsolatedLoads(self) -> List[str]: Original COM help: https://opendss.epri.com/AllIsolatedLoads.html ''' - return self._check_for_error(self._get_string_array(self._lib.Topology_Get_AllIsolatedLoads)) + return self._lib.Topology_Get_AllIsolatedLoads() @property def AllLoopedPairs(self) -> List[str]: @@ -61,7 +61,7 @@ def AllLoopedPairs(self) -> List[str]: Original COM help: https://opendss.epri.com/AllLoopedPairs.html ''' - return self._check_for_error(self._get_string_array(self._lib.Topology_Get_AllLoopedPairs)) + return self._lib.Topology_Get_AllLoopedPairs() @property def BackwardBranch(self) -> int: @@ -70,7 +70,7 @@ def BackwardBranch(self) -> int: Original COM help: https://opendss.epri.com/BackwardBranch.html ''' - return self._check_for_error(self._lib.Topology_Get_BackwardBranch()) + return self._lib.Topology_Get_BackwardBranch() @property def BranchName(self) -> str: @@ -79,14 +79,11 @@ def BranchName(self) -> str: Original COM help: https://opendss.epri.com/BranchName.html ''' - return self._get_string(self._check_for_error(self._lib.Topology_Get_BranchName())) + return self._lib.Topology_Get_BranchName() @BranchName.setter def BranchName(self, Value: AnyStr): - if type(Value) is not bytes: - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.Topology_Set_BranchName(Value)) + self._lib.Topology_Set_BranchName(Value) @property def BusName(self) -> str: @@ -95,14 +92,11 @@ def BusName(self) -> str: Original COM help: https://opendss.epri.com/BusName.html ''' - return self._get_string(self._check_for_error(self._lib.Topology_Get_BusName())) + return self._lib.Topology_Get_BusName() @BusName.setter def BusName(self, Value: AnyStr): - if type(Value) is not bytes: - Value = Value.encode(self._api_util.codec) - - self._check_for_error(self._lib.Topology_Set_BusName(Value)) + self._lib.Topology_Set_BusName(Value) @property def First(self) -> int: @@ -111,7 +105,7 @@ def First(self) -> int: Original COM help: https://opendss.epri.com/First19.html ''' - return self._check_for_error(self._lib.Topology_Get_First()) + return self._lib.Topology_Get_First() @property def FirstLoad(self) -> int: @@ -120,7 +114,7 @@ def FirstLoad(self) -> int: Original COM help: https://opendss.epri.com/FirstLoad.html ''' - return self._check_for_error(self._lib.Topology_Get_FirstLoad()) + return self._lib.Topology_Get_FirstLoad() @property def ForwardBranch(self) -> int: @@ -129,7 +123,7 @@ def ForwardBranch(self) -> int: Original COM help: https://opendss.epri.com/ForwardBranch.html ''' - return self._check_for_error(self._lib.Topology_Get_ForwardBranch()) + return self._lib.Topology_Get_ForwardBranch() @property def LoopedBranch(self) -> int: @@ -138,7 +132,7 @@ def LoopedBranch(self) -> int: Original COM help: https://opendss.epri.com/LoopedBranch.html ''' - return self._check_for_error(self._lib.Topology_Get_LoopedBranch()) + return self._lib.Topology_Get_LoopedBranch() @property def Next(self) -> int: @@ -147,7 +141,7 @@ def Next(self) -> int: Original COM help: https://opendss.epri.com/Next18.html ''' - return self._check_for_error(self._lib.Topology_Get_Next()) + return self._lib.Topology_Get_Next() @property def NextLoad(self) -> int: @@ -156,7 +150,7 @@ def NextLoad(self) -> int: Original COM help: https://opendss.epri.com/NextLoad.html ''' - return self._check_for_error(self._lib.Topology_Get_NextLoad()) + return self._lib.Topology_Get_NextLoad() @property def NumIsolatedBranches(self) -> int: @@ -165,7 +159,7 @@ def NumIsolatedBranches(self) -> int: Original COM help: https://opendss.epri.com/NumIsolatedBranches.html ''' - return self._check_for_error(self._lib.Topology_Get_NumIsolatedBranches()) + return self._lib.Topology_Get_NumIsolatedBranches() @property def NumIsolatedLoads(self) -> int: @@ -174,7 +168,7 @@ def NumIsolatedLoads(self) -> int: Original COM help: https://opendss.epri.com/NumIsolatedLoads.html ''' - return self._check_for_error(self._lib.Topology_Get_NumIsolatedLoads()) + return self._lib.Topology_Get_NumIsolatedLoads() @property def NumLoops(self) -> int: @@ -183,7 +177,7 @@ def NumLoops(self) -> int: Original COM help: https://opendss.epri.com/NumLoops.html ''' - return self._check_for_error(self._lib.Topology_Get_NumLoops()) + return self._lib.Topology_Get_NumLoops() @property def ParallelBranch(self) -> int: @@ -192,5 +186,5 @@ def ParallelBranch(self) -> int: Original COM help: https://opendss.epri.com/ParallelBranch.html ''' - return self._check_for_error(self._lib.Topology_Get_ParallelBranch()) + return self._lib.Topology_Get_ParallelBranch() diff --git a/altdss/Transformer.py b/altdss/Transformer.py index deb8627..1fe2a97 100644 --- a/altdss/Transformer.py +++ b/altdss/Transformer.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -28,7 +28,8 @@ class Transformer(DSSObj, CircuitElementMixin, PDElementMixin, TransformerObjMix 44, 46, 48, - 56, + 50, + 59, } _cls_float_idx = { 6, @@ -57,12 +58,12 @@ class Transformer(DSSObj, CircuitElementMixin, PDElementMixin, TransformerObjMix 42, 43, 47, - 50, - 51, - 52, 53, 54, 55, + 56, + 57, + 58, } _cls_prop_idx = { 'phases': 1, @@ -119,14 +120,17 @@ class Transformer(DSSObj, CircuitElementMixin, PDElementMixin, TransformerObjMix 'rdcohms': 47, 'seasons': 48, 'ratings': 49, - 'normamps': 50, - 'emergamps': 51, - 'faultrate': 52, - 'pctperm': 53, - 'repair': 54, - 'basefreq': 55, - 'enabled': 56, - 'like': 57, + 'bhpoints': 50, + 'bhcurrent': 51, + 'bhflux': 52, + 'normamps': 53, + 'emergamps': 54, + 'faultrate': 55, + 'pctperm': 56, + 'repair': 57, + 'basefreq': 58, + 'enabled': 59, + 'like': 60, } def __init__(self, api_util, ptr): @@ -160,9 +164,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of phases this transformer. Default is 3. + Number of phases this transformer. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Windings(self) -> int: @@ -173,9 +178,9 @@ def _set_Windings(self, value: int, flags: enums.SetterFlags = 0): Windings = property(_get_Windings, _set_Windings) # type: int """ - Number of windings, this transformers. (Also is the number of terminals) Default is 2. This property triggers memory allocation for the Transformer and will cause other properties to revert to default values. + Number of windings, this transformers. (Also is the number of terminals) This property triggers memory allocation for the Transformer and will cause other properties to revert to default values. - DSS property name: `Windings`, DSS property index: 2. + Name: `Windings` """ def _get_pctR(self) -> Float64Array: @@ -188,7 +193,8 @@ def _set_pctR(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Percent resistance this winding. (half of total for a 2-winding). - DSS property name: `%R`, DSS property index: 9. + Name: `%R` + Default: [0.2, 0.2] """ def _get_RNeut(self) -> Float64Array: @@ -199,9 +205,11 @@ def _set_RNeut(self, value: Float64Array, flags: enums.SetterFlags = 0): RNeut = property(_get_RNeut, _set_RNeut) # type: Float64Array """ - Default = -1. Neutral resistance of wye (star)-connected winding in actual ohms. If entered as a negative value, the neutral is assumed to be open, or floating. To solidly ground the neutral, connect the neutral conductor to Node 0 in the Bus property spec for this winding. For example: Bus=MyBusName.1.2.3.0, which is generally the default connection. + Neutral resistance of wye (star)-connected winding in actual ohms. If entered as a negative value, the neutral is assumed to be open, or floating. To solidly ground the neutral, connect the neutral conductor to Node 0 in the Bus property spec for this winding. For example: Bus=MyBusName.1.2.3.0, which is generally the default connection. - DSS property name: `RNeut`, DSS property index: 10. + Name: `RNeut` + Units: Ω + Default: [-1.0, -1.0] """ def _get_XNeut(self) -> Float64Array: @@ -212,9 +220,11 @@ def _set_XNeut(self, value: Float64Array, flags: enums.SetterFlags = 0): XNeut = property(_get_XNeut, _set_XNeut) # type: Float64Array """ - Neutral reactance of wye(star)-connected winding in actual ohms. May be + or -. + Neutral reactance of wye(star)-connected winding in actual ohms. May be positive or negative. - DSS property name: `XNeut`, DSS property index: 11. + Name: `XNeut` + Units: Ω + Default: [0.0, 0.0] """ def _get_Buses(self) -> List[str]: @@ -231,7 +241,7 @@ def _set_Buses(self, value: List[AnyStr], flags: enums.SetterFlags = 0): New Transformer.T1 buses="Hibus, lowbus" - DSS property name: `Buses`, DSS property index: 12. + Name: `Buses` """ def _get_Conns(self) -> List[enums.Connection]: @@ -249,13 +259,14 @@ def _set_Conns(self, value: Union[List[Union[int, enums.Connection]], List[AnySt New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye) - DSS property name: `Conns`, DSS property index: 13. + Name: `Conns` + Default: ['Wye', 'Wye'] """ def _get_Conns_str(self) -> List[str]: return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 13) - def _set_Conns_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + def _set_Conns_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): self._set_Conns(value, flags) Conns_str = property(_get_Conns_str, _set_Conns_str) # type: List[str] @@ -264,7 +275,8 @@ def _set_Conns_str(self, value: AnyStr, flags: enums.SetterFlags = 0): New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye) - DSS property name: `Conns`, DSS property index: 13. + Name: `Conns` + Default: ['Wye', 'Wye'] """ def _get_kVs(self) -> Float64Array: @@ -283,7 +295,9 @@ def _set_kVs(self, value: Float64Array, flags: enums.SetterFlags = 0): See kV= property for voltage rules. - DSS property name: `kVs`, DSS property index: 14. + Name: `kVs` + Units: kV + Default: [12.47, 12.47] """ def _get_kVAs(self) -> Float64Array: @@ -296,7 +310,8 @@ def _set_kVAs(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Use this to specify the kVA ratings of all windings at once using an array. - DSS property name: `kVAs`, DSS property index: 15. + Name: `kVAs` + Default: [1000.0, 1000.0] """ def _get_Taps(self) -> Float64Array: @@ -309,7 +324,8 @@ def _set_Taps(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Use this to specify the p.u. tap of all windings at once using an array. - DSS property name: `Taps`, DSS property index: 16. + Name: `Taps` + Default: [1.0, 1.0] """ def _get_XHL(self) -> float: @@ -322,7 +338,7 @@ def _set_XHL(self, value: float, flags: enums.SetterFlags = 0): """ Use this to specify the percent reactance, H-L (winding 1 to winding 2). Use for 2- or 3-winding transformers. On the kVA base of winding 1. See also X12. - DSS property name: `XHL`, DSS property index: 17. + Name: `XHL` """ def _get_XHT(self) -> float: @@ -335,7 +351,7 @@ def _set_XHT(self, value: float, flags: enums.SetterFlags = 0): """ Use this to specify the percent reactance, H-T (winding 1 to winding 3). Use for 3-winding transformers only. On the kVA base of winding 1. See also X13. - DSS property name: `XHT`, DSS property index: 18. + Name: `XHT` """ def _get_XLT(self) -> float: @@ -348,7 +364,7 @@ def _set_XLT(self, value: float, flags: enums.SetterFlags = 0): """ Use this to specify the percent reactance, L-T (winding 2 to winding 3). Use for 3-winding transformers only. On the kVA base of winding 1. See also X23. - DSS property name: `XLT`, DSS property index: 19. + Name: `XLT` """ def _get_XSCArray(self) -> Float64Array: @@ -365,7 +381,7 @@ def _set_XSCArray(self, value: Float64Array, flags: enums.SetterFlags = 0): There will be n(n-1)/2 values, where n=number of windings. - DSS property name: `XSCArray`, DSS property index: 20. + Name: `XSCArray` """ def _get_Thermal(self) -> float: @@ -376,9 +392,13 @@ def _set_Thermal(self, value: float, flags: enums.SetterFlags = 0): Thermal = property(_get_Thermal, _set_Thermal) # type: float """ - Thermal time constant of the transformer in hours. Typically about 2. + Thermal time constant of the transformer. Typically about 2. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `Thermal`, DSS property index: 21. + Name: `Thermal` + Units: hour + Default: 2.0 """ def _get_n(self) -> float: @@ -391,7 +411,10 @@ def _set_n(self, value: float, flags: enums.SetterFlags = 0): """ n Exponent for thermal properties in IEEE C57. Typically 0.8. - DSS property name: `n`, DSS property index: 22. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `n` + Default: 0.8 """ def _get_m(self) -> float: @@ -404,7 +427,10 @@ def _set_m(self, value: float, flags: enums.SetterFlags = 0): """ m Exponent for thermal properties in IEEE C57. Typically 0.9 - 1.0 - DSS property name: `m`, DSS property index: 23. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `m` + Default: 0.8 """ def _get_FLRise(self) -> float: @@ -415,9 +441,13 @@ def _set_FLRise(self, value: float, flags: enums.SetterFlags = 0): FLRise = property(_get_FLRise, _set_FLRise) # type: float """ - Temperature rise, deg C, for full load. Default is 65. + Temperature rise for full load. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `FLRise`, DSS property index: 24. + Name: `FLRise` + Units: °C + Default: 65.0 """ def _get_HSRise(self) -> float: @@ -428,9 +458,13 @@ def _set_HSRise(self, value: float, flags: enums.SetterFlags = 0): HSRise = property(_get_HSRise, _set_HSRise) # type: float """ - Hot spot temperature rise, deg C. Default is 15. + Hot spot temperature rise. - DSS property name: `HSRise`, DSS property index: 25. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `HSRise` + Units: °C + Default: 15.0 """ def _get_pctLoadLoss(self) -> float: @@ -443,7 +477,8 @@ def _set_pctLoadLoss(self, value: float, flags: enums.SetterFlags = 0): """ Percent load loss at full load. The %R of the High and Low windings (1 and 2) are adjusted to agree at rated kVA loading. - DSS property name: `%LoadLoss`, DSS property index: 26. + Name: `%LoadLoss` + Default: 0.4 """ def _get_pctNoLoadLoss(self) -> float: @@ -454,9 +489,10 @@ def _set_pctNoLoadLoss(self, value: float, flags: enums.SetterFlags = 0): pctNoLoadLoss = property(_get_pctNoLoadLoss, _set_pctNoLoadLoss) # type: float """ - Percent no load losses at rated excitatation voltage. Default is 0. Converts to a resistance in parallel with the magnetizing impedance in each winding. + Percent no load losses at rated excitation voltage. Default is 0. Converts to a resistance in parallel with the magnetizing impedance in each winding. - DSS property name: `%NoLoadLoss`, DSS property index: 27. + Name: `%NoLoadLoss` + Default: 0.0 """ def _get_NormHkVA(self) -> float: @@ -469,7 +505,8 @@ def _set_NormHkVA(self, value: float, flags: enums.SetterFlags = 0): """ Normal maximum kVA rating of H winding (winding 1). Usually 100% - 110% of maximum nameplate rating, depending on load shape. Defaults to 110% of kVA rating of Winding 1. - DSS property name: `NormHkVA`, DSS property index: 28. + Name: `NormHkVA` + Units: kVA """ def _get_EmergHkVA(self) -> float: @@ -482,7 +519,8 @@ def _set_EmergHkVA(self, value: float, flags: enums.SetterFlags = 0): """ Emergency (contingency) kVA rating of H winding (winding 1). Usually 140% - 150% of maximum nameplate rating, depending on load shape. Defaults to 150% of kVA rating of Winding 1. - DSS property name: `EmergHkVA`, DSS property index: 29. + Name: `EmergHkVA` + Units: kVA """ def _get_Sub(self) -> bool: @@ -493,9 +531,10 @@ def _set_Sub(self, value: bool, flags: enums.SetterFlags = 0): Sub = property(_get_Sub, _set_Sub) # type: bool """ - ={Yes|No} Designates whether this transformer is to be considered a substation.Default is No. + Designates whether this transformer is to be considered a substation.Default is No. - DSS property name: `Sub`, DSS property index: 30. + Name: `Sub` + Default: False """ def _get_MaxTap(self) -> Float64Array: @@ -506,9 +545,10 @@ def _set_MaxTap(self, value: Float64Array, flags: enums.SetterFlags = 0): MaxTap = property(_get_MaxTap, _set_MaxTap) # type: Float64Array """ - Max per unit tap for the active winding. Default is 1.10 + Max per unit tap for the active winding. - DSS property name: `MaxTap`, DSS property index: 31. + Name: `MaxTap` + Default: [1.1, 1.1] """ def _get_MinTap(self) -> Float64Array: @@ -519,9 +559,10 @@ def _set_MinTap(self, value: Float64Array, flags: enums.SetterFlags = 0): MinTap = property(_get_MinTap, _set_MinTap) # type: Float64Array """ - Min per unit tap for the active winding. Default is 0.90 + Min per unit tap for the active winding. - DSS property name: `MinTap`, DSS property index: 32. + Name: `MinTap` + Default: [0.9, 0.9] """ def _get_NumTaps(self) -> Int32Array: @@ -534,7 +575,8 @@ def _set_NumTaps(self, value: Int32Array, flags: enums.SetterFlags = 0): """ Total number of taps between min and max tap. Default is 32 (16 raise and 16 lower taps about the neutral position). The neutral position is not counted. - DSS property name: `NumTaps`, DSS property index: 33. + Name: `NumTaps` + Default: [32, 32] """ def _get_SubName(self) -> str: @@ -547,7 +589,7 @@ def _set_SubName(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Substation Name. Optional. Default is null. If specified, printed on plots - DSS property name: `SubName`, DSS property index: 34. + Name: `SubName` """ def _get_pctIMag(self) -> float: @@ -558,9 +600,10 @@ def _set_pctIMag(self, value: float, flags: enums.SetterFlags = 0): pctIMag = property(_get_pctIMag, _set_pctIMag) # type: float """ - Percent magnetizing current. Default=0.0. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". + Percent magnetizing current. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". - DSS property name: `%IMag`, DSS property index: 35. + Name: `%IMag` + Default: 0.0 """ def _get_ppm_Antifloat(self) -> float: @@ -573,7 +616,8 @@ def _set_ppm_Antifloat(self, value: float, flags: enums.SetterFlags = 0): """ Default=1 ppm. Parts per million of transformer winding VA rating connected to ground to protect against accidentally floating a winding without a reference. If positive then the effect is adding a very large reactance to ground. If negative, then a capacitor. - DSS property name: `ppm_Antifloat`, DSS property index: 36. + Name: `ppm_Antifloat` + Default: 1.0 """ def _get_pctRs(self) -> Float64Array: @@ -588,7 +632,8 @@ def _set_pctRs(self, value: Float64Array, flags: enums.SetterFlags = 0): New Transformer.T1 buses="Hibus, lowbus" ~ %Rs=(0.2 0.3) - DSS property name: `%Rs`, DSS property index: 37. + Name: `%Rs` + Default: [0.2, 0.2] """ def _get_Bank(self) -> str: @@ -601,7 +646,7 @@ def _set_Bank(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of the bank this transformer is part of, for CIM, MultiSpeak, and other interfaces. - DSS property name: `Bank`, DSS property index: 38. + Name: `Bank` """ def _get_XfmrCode_str(self) -> str: @@ -614,7 +659,7 @@ def _set_XfmrCode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of a library entry for transformer properties. The named XfmrCode must already be defined. - DSS property name: `XfmrCode`, DSS property index: 39. + Name: `XfmrCode` """ def _get_XfmrCode(self) -> XfmrCodeObj: @@ -631,7 +676,7 @@ def _set_XfmrCode(self, value: Union[AnyStr, XfmrCodeObj], flags: enums.SetterFl """ Name of a library entry for transformer properties. The named XfmrCode must already be defined. - DSS property name: `XfmrCode`, DSS property index: 39. + Name: `XfmrCode` """ def _get_XRConst(self) -> bool: @@ -642,9 +687,10 @@ def _set_XRConst(self, value: bool, flags: enums.SetterFlags = 0): XRConst = property(_get_XRConst, _set_XRConst) # type: bool """ - ={Yes|No} Default is NO. Signifies whether or not the X/R is assumed contant for harmonic studies. + Signifies whether or not the X/R is assumed constant for harmonic studies. - DSS property name: `XRConst`, DSS property index: 40. + Name: `XRConst` + Default: False """ def _get_X12(self) -> float: @@ -657,7 +703,8 @@ def _set_X12(self, value: float, flags: enums.SetterFlags = 0): """ Alternative to XHL for specifying the percent reactance from winding 1 to winding 2. Use for 2- or 3-winding transformers. Percent on the kVA base of winding 1. - DSS property name: `X12`, DSS property index: 41. + Name: `X12` + Default: 7.000000000000001 """ def _get_X13(self) -> float: @@ -670,7 +717,8 @@ def _set_X13(self, value: float, flags: enums.SetterFlags = 0): """ Alternative to XHT for specifying the percent reactance from winding 1 to winding 3. Use for 3-winding transformers only. Percent on the kVA base of winding 1. - DSS property name: `X13`, DSS property index: 42. + Name: `X13` + Default: 35.0 """ def _get_X23(self) -> float: @@ -683,7 +731,8 @@ def _set_X23(self, value: float, flags: enums.SetterFlags = 0): """ Alternative to XLT for specifying the percent reactance from winding 2 to winding 3.Use for 3-winding transformers only. Percent on the kVA base of winding 1. - DSS property name: `X23`, DSS property index: 43. + Name: `X23` + Default: 30.0 """ def _get_LeadLag(self) -> enums.PhaseSequence: @@ -699,7 +748,8 @@ def _set_LeadLag(self, value: Union[AnyStr, int, enums.PhaseSequence], flags: en """ {Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro" - DSS property name: `LeadLag`, DSS property index: 44. + Name: `LeadLag` + Default: Lag """ def _get_LeadLag_str(self) -> str: @@ -712,7 +762,8 @@ def _set_LeadLag_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ {Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro" - DSS property name: `LeadLag`, DSS property index: 44. + Name: `LeadLag` + Default: Lag """ def _get_Core(self) -> enums.CoreType: @@ -726,9 +777,10 @@ def _set_Core(self, value: Union[AnyStr, int, enums.CoreType], flags: enums.Sett Core = property(_get_Core, _set_Core) # type: enums.CoreType """ - {Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. Used for GIC analysis + Core Type. Used for GIC analysis - DSS property name: `Core`, DSS property index: 46. + Name: `Core` + Default: shell """ def _get_Core_str(self) -> str: @@ -739,9 +791,10 @@ def _set_Core_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Core_str = property(_get_Core_str, _set_Core_str) # type: str """ - {Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. Used for GIC analysis + Core Type. Used for GIC analysis - DSS property name: `Core`, DSS property index: 46. + Name: `Core` + Default: shell """ def _get_RDCOhms(self) -> Float64Array: @@ -754,7 +807,8 @@ def _set_RDCOhms(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Winding dc resistance in OHMS. Useful for GIC analysis. From transformer test report. Defaults to 85% of %R property - DSS property name: `RDCOhms`, DSS property index: 47. + Name: `RDCOhms` + Default: [0.0881171766666667, 0.0881171766666667] """ def _get_Seasons(self) -> int: @@ -765,9 +819,9 @@ def _set_Seasons(self, value: int, flags: enums.SetterFlags = 0): Seasons = property(_get_Seasons, _set_Seasons) # type: int """ - Defines the number of ratings to be defined for the transfomer, to be used only when defining seasonal ratings using the "Ratings" property. + Defines the number of ratings to be defined for the transformer, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 48. + Name: `Seasons` """ def _get_Ratings(self) -> Float64Array: @@ -779,100 +833,156 @@ def _set_Ratings(self, value: Float64Array, flags: enums.SetterFlags = 0): Ratings = property(_get_Ratings, _set_Ratings) # type: Float64Array """ An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert - multiple ratings to change during a QSTS simulation to evaluate different ratings in transformers. Is given in kVA + multiple ratings to change during a QSTS simulation to evaluate different ratings in transformers. It is given in kVA + + Name: `Ratings` + Default: [1100.0] + """ + + def _get_BHPoints(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 50) + + def _set_BHPoints(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 50, value, flags) + + BHPoints = property(_get_BHPoints, _set_BHPoints) # type: int + """ + Number of points in BH curve expected from `BHCurrent` and `BHFlux` arrays. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHPoints` + Default: 0 + """ + + def _get_BHCurrent(self) -> Float64Array: + return self._get_float64_array(self._lib.Obj_GetFloat64Array, self._ptr, 51) + + def _set_BHCurrent(self, value: Float64Array, flags: enums.SetterFlags = 0): + self._set_float64_array_o(51, value, flags) + + BHCurrent = property(_get_BHCurrent, _set_BHCurrent) # type: Float64Array + """ + Array of current values in per-unit. The array is expected to have the number of entries defined by `BHPoints`. Together with `BHFlux`, they form the BH curve of the transformer. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `Ratings`, DSS property index: 49. + Name: `BHCurrent` + """ + + def _get_BHFlux(self) -> Float64Array: + return self._get_float64_array(self._lib.Obj_GetFloat64Array, self._ptr, 52) + + def _set_BHFlux(self, value: Float64Array, flags: enums.SetterFlags = 0): + self._set_float64_array_o(52, value, flags) + + BHFlux = property(_get_BHFlux, _set_BHFlux) # type: Float64Array + """ + Array of flux values in per-unit. The array is expected to have the number of entries defined by `BHPoints`. Together with `BHCurrent`, they form the BH curve of the transformer. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHFlux` """ def _get_NormAmps(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 50) + return self._lib.Obj_GetFloat64(self._ptr, 53) def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 50, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 53, value, flags) NormAmps = property(_get_NormAmps, _set_NormAmps) # type: float """ - Normal rated current. + Normal rated current. Use `NormHkVA` to specify the normal rating for the transformer. - DSS property name: `NormAmps`, DSS property index: 50. + **Read-only** + + Name: `NormAmps` """ def _get_EmergAmps(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 51) + return self._lib.Obj_GetFloat64(self._ptr, 54) def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 51, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 54, value, flags) EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: float """ - Maximum or emerg current. + Maximum or emergency current. Use `EmergHkVA` to specify the normal rating for the transformer. - DSS property name: `EmergAmps`, DSS property index: 51. + **Read-only** + + Name: `EmergAmps` """ def _get_FaultRate(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 52) + return self._lib.Obj_GetFloat64(self._ptr, 55) def _set_FaultRate(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 52, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 55, value, flags) FaultRate = property(_get_FaultRate, _set_FaultRate) # type: float """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 52. + Name: `FaultRate` + Default: 0.007 """ def _get_pctPerm(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 53) + return self._lib.Obj_GetFloat64(self._ptr, 56) def _set_pctPerm(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 53, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 56, value, flags) pctPerm = property(_get_pctPerm, _set_pctPerm) # type: float """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 53. + Name: `pctPerm` + Default: 0.0 """ def _get_Repair(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 54) + return self._lib.Obj_GetFloat64(self._ptr, 57) def _set_Repair(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 54, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 57, value, flags) Repair = property(_get_Repair, _set_Repair) # type: float """ Hours to repair. - DSS property name: `Repair`, DSS property index: 54. + Name: `Repair` + Default: 0.0 """ def _get_BaseFreq(self) -> float: - return self._lib.Obj_GetFloat64(self._ptr, 55) + return self._lib.Obj_GetFloat64(self._ptr, 58) def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): - self._lib.Obj_SetFloat64(self._ptr, 55, value, flags) + self._lib.Obj_SetFloat64(self._ptr, 58, value, flags) BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: float """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 55. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: - return self._lib.Obj_GetInt32(self._ptr, 56) != 0 + return self._lib.Obj_GetInt32(self._ptr, 59) != 0 def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): - self._lib.Obj_SetInt32(self._ptr, 56, value, flags) + self._lib.Obj_SetInt32(self._ptr, 59, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 56. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -881,9 +991,11 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 57. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_string_o(57, value) + self._set_string_o(60, value) class TransformerProperties(TypedDict): @@ -929,6 +1041,9 @@ class TransformerProperties(TypedDict): RDCOhms: Float64Array Seasons: int Ratings: Float64Array + BHPoints: int + BHCurrent: Float64Array + BHFlux: Float64Array NormAmps: float EmergAmps: float FaultRate: float @@ -978,9 +1093,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of phases this transformer. Default is 3. + Number of phases this transformer. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Windings(self) -> BatchInt32ArrayProxy: @@ -991,9 +1107,9 @@ def _set_Windings(self, value: Union[int, Int32Array], flags: enums.SetterFlags Windings = property(_get_Windings, _set_Windings) # type: BatchInt32ArrayProxy """ - Number of windings, this transformers. (Also is the number of terminals) Default is 2. This property triggers memory allocation for the Transformer and will cause other properties to revert to default values. + Number of windings, this transformers. (Also is the number of terminals) This property triggers memory allocation for the Transformer and will cause other properties to revert to default values. - DSS property name: `Windings`, DSS property index: 2. + Name: `Windings` """ def _get_pctR(self) -> List[Float64Array]: @@ -1009,7 +1125,8 @@ def _set_pctR(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Percent resistance this winding. (half of total for a 2-winding). - DSS property name: `%R`, DSS property index: 9. + Name: `%R` + Default: [0.2, 0.2] """ def _get_RNeut(self) -> List[Float64Array]: @@ -1023,9 +1140,11 @@ def _set_RNeut(self, value: Union[Float64Array, List[Float64Array]], flags: enum RNeut = property(_get_RNeut, _set_RNeut) # type: List[Float64Array] """ - Default = -1. Neutral resistance of wye (star)-connected winding in actual ohms. If entered as a negative value, the neutral is assumed to be open, or floating. To solidly ground the neutral, connect the neutral conductor to Node 0 in the Bus property spec for this winding. For example: Bus=MyBusName.1.2.3.0, which is generally the default connection. + Neutral resistance of wye (star)-connected winding in actual ohms. If entered as a negative value, the neutral is assumed to be open, or floating. To solidly ground the neutral, connect the neutral conductor to Node 0 in the Bus property spec for this winding. For example: Bus=MyBusName.1.2.3.0, which is generally the default connection. - DSS property name: `RNeut`, DSS property index: 10. + Name: `RNeut` + Units: Ω + Default: [-1.0, -1.0] """ def _get_XNeut(self) -> List[Float64Array]: @@ -1039,9 +1158,11 @@ def _set_XNeut(self, value: Union[Float64Array, List[Float64Array]], flags: enum XNeut = property(_get_XNeut, _set_XNeut) # type: List[Float64Array] """ - Neutral reactance of wye(star)-connected winding in actual ohms. May be + or -. + Neutral reactance of wye(star)-connected winding in actual ohms. May be positive or negative. - DSS property name: `XNeut`, DSS property index: 11. + Name: `XNeut` + Units: Ω + Default: [0.0, 0.0] """ def _get_Buses(self) -> List[List[str]]: @@ -1060,7 +1181,7 @@ def _set_Buses(self, value: List[AnyStr], flags: enums.SetterFlags = 0): New Transformer.T1 buses="Hibus, lowbus" - DSS property name: `Buses`, DSS property index: 12. + Name: `Buses` """ def _get_Conns(self) -> List[Int32Array]: @@ -1086,7 +1207,8 @@ def _set_Conns(self, value: Union[List[Union[int, enums.Connection]], List[AnySt New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye) - DSS property name: `Conns`, DSS property index: 13. + Name: `Conns` + Default: ['Wye', 'Wye'] """ def _get_Conns_str(self) -> List[List[str]]: @@ -1101,7 +1223,8 @@ def _set_Conns_str(self, value: AnyStr, flags: enums.SetterFlags = 0): New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye) - DSS property name: `Conns`, DSS property index: 13. + Name: `Conns` + Default: ['Wye', 'Wye'] """ def _get_kVs(self) -> List[Float64Array]: @@ -1123,7 +1246,9 @@ def _set_kVs(self, value: Union[Float64Array, List[Float64Array]], flags: enums. See kV= property for voltage rules. - DSS property name: `kVs`, DSS property index: 14. + Name: `kVs` + Units: kV + Default: [12.47, 12.47] """ def _get_kVAs(self) -> List[Float64Array]: @@ -1139,7 +1264,8 @@ def _set_kVAs(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Use this to specify the kVA ratings of all windings at once using an array. - DSS property name: `kVAs`, DSS property index: 15. + Name: `kVAs` + Default: [1000.0, 1000.0] """ def _get_Taps(self) -> List[Float64Array]: @@ -1155,7 +1281,8 @@ def _set_Taps(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Use this to specify the p.u. tap of all windings at once using an array. - DSS property name: `Taps`, DSS property index: 16. + Name: `Taps` + Default: [1.0, 1.0] """ def _get_XHL(self) -> BatchFloat64ArrayProxy: @@ -1168,7 +1295,7 @@ def _set_XHL(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Use this to specify the percent reactance, H-L (winding 1 to winding 2). Use for 2- or 3-winding transformers. On the kVA base of winding 1. See also X12. - DSS property name: `XHL`, DSS property index: 17. + Name: `XHL` """ def _get_XHT(self) -> BatchFloat64ArrayProxy: @@ -1181,7 +1308,7 @@ def _set_XHT(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Use this to specify the percent reactance, H-T (winding 1 to winding 3). Use for 3-winding transformers only. On the kVA base of winding 1. See also X13. - DSS property name: `XHT`, DSS property index: 18. + Name: `XHT` """ def _get_XLT(self) -> BatchFloat64ArrayProxy: @@ -1194,7 +1321,7 @@ def _set_XLT(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Use this to specify the percent reactance, L-T (winding 2 to winding 3). Use for 3-winding transformers only. On the kVA base of winding 1. See also X23. - DSS property name: `XLT`, DSS property index: 19. + Name: `XLT` """ def _get_XSCArray(self) -> List[Float64Array]: @@ -1214,7 +1341,7 @@ def _set_XSCArray(self, value: Union[Float64Array, List[Float64Array]], flags: e There will be n(n-1)/2 values, where n=number of windings. - DSS property name: `XSCArray`, DSS property index: 20. + Name: `XSCArray` """ def _get_Thermal(self) -> BatchFloat64ArrayProxy: @@ -1225,9 +1352,13 @@ def _set_Thermal(self, value: Union[float, Float64Array], flags: enums.SetterFla Thermal = property(_get_Thermal, _set_Thermal) # type: BatchFloat64ArrayProxy """ - Thermal time constant of the transformer in hours. Typically about 2. + Thermal time constant of the transformer. Typically about 2. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `Thermal`, DSS property index: 21. + Name: `Thermal` + Units: hour + Default: 2.0 """ def _get_n(self) -> BatchFloat64ArrayProxy: @@ -1240,7 +1371,10 @@ def _set_n(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ n Exponent for thermal properties in IEEE C57. Typically 0.8. - DSS property name: `n`, DSS property index: 22. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `n` + Default: 0.8 """ def _get_m(self) -> BatchFloat64ArrayProxy: @@ -1253,7 +1387,10 @@ def _set_m(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ m Exponent for thermal properties in IEEE C57. Typically 0.9 - 1.0 - DSS property name: `m`, DSS property index: 23. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `m` + Default: 0.8 """ def _get_FLRise(self) -> BatchFloat64ArrayProxy: @@ -1264,9 +1401,13 @@ def _set_FLRise(self, value: Union[float, Float64Array], flags: enums.SetterFlag FLRise = property(_get_FLRise, _set_FLRise) # type: BatchFloat64ArrayProxy """ - Temperature rise, deg C, for full load. Default is 65. + Temperature rise for full load. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `FLRise`, DSS property index: 24. + Name: `FLRise` + Units: °C + Default: 65.0 """ def _get_HSRise(self) -> BatchFloat64ArrayProxy: @@ -1277,9 +1418,13 @@ def _set_HSRise(self, value: Union[float, Float64Array], flags: enums.SetterFlag HSRise = property(_get_HSRise, _set_HSRise) # type: BatchFloat64ArrayProxy """ - Hot spot temperature rise, deg C. Default is 15. + Hot spot temperature rise. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `HSRise`, DSS property index: 25. + Name: `HSRise` + Units: °C + Default: 15.0 """ def _get_pctLoadLoss(self) -> BatchFloat64ArrayProxy: @@ -1292,7 +1437,8 @@ def _set_pctLoadLoss(self, value: Union[float, Float64Array], flags: enums.Sette """ Percent load loss at full load. The %R of the High and Low windings (1 and 2) are adjusted to agree at rated kVA loading. - DSS property name: `%LoadLoss`, DSS property index: 26. + Name: `%LoadLoss` + Default: 0.4 """ def _get_pctNoLoadLoss(self) -> BatchFloat64ArrayProxy: @@ -1303,9 +1449,10 @@ def _set_pctNoLoadLoss(self, value: Union[float, Float64Array], flags: enums.Set pctNoLoadLoss = property(_get_pctNoLoadLoss, _set_pctNoLoadLoss) # type: BatchFloat64ArrayProxy """ - Percent no load losses at rated excitatation voltage. Default is 0. Converts to a resistance in parallel with the magnetizing impedance in each winding. + Percent no load losses at rated excitation voltage. Default is 0. Converts to a resistance in parallel with the magnetizing impedance in each winding. - DSS property name: `%NoLoadLoss`, DSS property index: 27. + Name: `%NoLoadLoss` + Default: 0.0 """ def _get_NormHkVA(self) -> BatchFloat64ArrayProxy: @@ -1318,7 +1465,8 @@ def _set_NormHkVA(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Normal maximum kVA rating of H winding (winding 1). Usually 100% - 110% of maximum nameplate rating, depending on load shape. Defaults to 110% of kVA rating of Winding 1. - DSS property name: `NormHkVA`, DSS property index: 28. + Name: `NormHkVA` + Units: kVA """ def _get_EmergHkVA(self) -> BatchFloat64ArrayProxy: @@ -1331,7 +1479,8 @@ def _set_EmergHkVA(self, value: Union[float, Float64Array], flags: enums.SetterF """ Emergency (contingency) kVA rating of H winding (winding 1). Usually 140% - 150% of maximum nameplate rating, depending on load shape. Defaults to 150% of kVA rating of Winding 1. - DSS property name: `EmergHkVA`, DSS property index: 29. + Name: `EmergHkVA` + Units: kVA """ def _get_Sub(self) -> List[bool]: @@ -1339,14 +1488,15 @@ def _get_Sub(self) -> List[bool]: self._get_batch_int32_prop(30) ] - def _set_Sub(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Sub(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(30, value, flags) Sub = property(_get_Sub, _set_Sub) # type: List[bool] """ - ={Yes|No} Designates whether this transformer is to be considered a substation.Default is No. + Designates whether this transformer is to be considered a substation.Default is No. - DSS property name: `Sub`, DSS property index: 30. + Name: `Sub` + Default: False """ def _get_MaxTap(self) -> List[Float64Array]: @@ -1360,9 +1510,10 @@ def _set_MaxTap(self, value: Union[Float64Array, List[Float64Array]], flags: enu MaxTap = property(_get_MaxTap, _set_MaxTap) # type: List[Float64Array] """ - Max per unit tap for the active winding. Default is 1.10 + Max per unit tap for the active winding. - DSS property name: `MaxTap`, DSS property index: 31. + Name: `MaxTap` + Default: [1.1, 1.1] """ def _get_MinTap(self) -> List[Float64Array]: @@ -1376,9 +1527,10 @@ def _set_MinTap(self, value: Union[Float64Array, List[Float64Array]], flags: enu MinTap = property(_get_MinTap, _set_MinTap) # type: List[Float64Array] """ - Min per unit tap for the active winding. Default is 0.90 + Min per unit tap for the active winding. - DSS property name: `MinTap`, DSS property index: 32. + Name: `MinTap` + Default: [0.9, 0.9] """ def _get_NumTaps(self) -> List[Int32Array]: @@ -1394,7 +1546,8 @@ def _set_NumTaps(self, value: Union[Int32Array, List[Int32Array]], flags: enums. """ Total number of taps between min and max tap. Default is 32 (16 raise and 16 lower taps about the neutral position). The neutral position is not counted. - DSS property name: `NumTaps`, DSS property index: 33. + Name: `NumTaps` + Default: [32, 32] """ def _get_SubName(self) -> List[str]: @@ -1407,7 +1560,7 @@ def _set_SubName(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ Substation Name. Optional. Default is null. If specified, printed on plots - DSS property name: `SubName`, DSS property index: 34. + Name: `SubName` """ def _get_pctIMag(self) -> BatchFloat64ArrayProxy: @@ -1418,9 +1571,10 @@ def _set_pctIMag(self, value: Union[float, Float64Array], flags: enums.SetterFla pctIMag = property(_get_pctIMag, _set_pctIMag) # type: BatchFloat64ArrayProxy """ - Percent magnetizing current. Default=0.0. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". + Percent magnetizing current. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". - DSS property name: `%IMag`, DSS property index: 35. + Name: `%IMag` + Default: 0.0 """ def _get_ppm_Antifloat(self) -> BatchFloat64ArrayProxy: @@ -1433,7 +1587,8 @@ def _set_ppm_Antifloat(self, value: Union[float, Float64Array], flags: enums.Set """ Default=1 ppm. Parts per million of transformer winding VA rating connected to ground to protect against accidentally floating a winding without a reference. If positive then the effect is adding a very large reactance to ground. If negative, then a capacitor. - DSS property name: `ppm_Antifloat`, DSS property index: 36. + Name: `ppm_Antifloat` + Default: 1.0 """ def _get_pctRs(self) -> List[Float64Array]: @@ -1451,7 +1606,8 @@ def _set_pctRs(self, value: Union[Float64Array, List[Float64Array]], flags: enum New Transformer.T1 buses="Hibus, lowbus" ~ %Rs=(0.2 0.3) - DSS property name: `%Rs`, DSS property index: 37. + Name: `%Rs` + Default: [0.2, 0.2] """ def _get_Bank(self) -> List[str]: @@ -1464,7 +1620,7 @@ def _set_Bank(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Name of the bank this transformer is part of, for CIM, MultiSpeak, and other interfaces. - DSS property name: `Bank`, DSS property index: 38. + Name: `Bank` """ def _get_XfmrCode_str(self) -> List[str]: @@ -1477,7 +1633,7 @@ def _set_XfmrCode_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set """ Name of a library entry for transformer properties. The named XfmrCode must already be defined. - DSS property name: `XfmrCode`, DSS property index: 39. + Name: `XfmrCode` """ def _get_XfmrCode(self) -> List[XfmrCodeObj]: @@ -1490,7 +1646,7 @@ def _set_XfmrCode(self, value: Union[AnyStr, XfmrCodeObj, List[AnyStr], List[Xfm """ Name of a library entry for transformer properties. The named XfmrCode must already be defined. - DSS property name: `XfmrCode`, DSS property index: 39. + Name: `XfmrCode` """ def _get_XRConst(self) -> List[bool]: @@ -1498,14 +1654,15 @@ def _get_XRConst(self) -> List[bool]: self._get_batch_int32_prop(40) ] - def _set_XRConst(self, value: bool, flags: enums.SetterFlags = 0): + def _set_XRConst(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(40, value, flags) XRConst = property(_get_XRConst, _set_XRConst) # type: List[bool] """ - ={Yes|No} Default is NO. Signifies whether or not the X/R is assumed contant for harmonic studies. + Signifies whether or not the X/R is assumed constant for harmonic studies. - DSS property name: `XRConst`, DSS property index: 40. + Name: `XRConst` + Default: False """ def _get_X12(self) -> BatchFloat64ArrayProxy: @@ -1518,7 +1675,8 @@ def _set_X12(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Alternative to XHL for specifying the percent reactance from winding 1 to winding 2. Use for 2- or 3-winding transformers. Percent on the kVA base of winding 1. - DSS property name: `X12`, DSS property index: 41. + Name: `X12` + Default: 7.000000000000001 """ def _get_X13(self) -> BatchFloat64ArrayProxy: @@ -1531,7 +1689,8 @@ def _set_X13(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Alternative to XHT for specifying the percent reactance from winding 1 to winding 3. Use for 3-winding transformers only. Percent on the kVA base of winding 1. - DSS property name: `X13`, DSS property index: 42. + Name: `X13` + Default: 35.0 """ def _get_X23(self) -> BatchFloat64ArrayProxy: @@ -1544,7 +1703,8 @@ def _set_X23(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Alternative to XLT for specifying the percent reactance from winding 2 to winding 3.Use for 3-winding transformers only. Percent on the kVA base of winding 1. - DSS property name: `X23`, DSS property index: 43. + Name: `X23` + Default: 30.0 """ def _get_LeadLag(self) -> BatchInt32ArrayProxy: @@ -1561,7 +1721,8 @@ def _set_LeadLag(self, value: Union[AnyStr, int, enums.PhaseSequence, List[AnySt """ {Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro" - DSS property name: `LeadLag`, DSS property index: 44. + Name: `LeadLag` + Default: Lag """ def _get_LeadLag_str(self) -> List[str]: @@ -1574,7 +1735,8 @@ def _set_LeadLag_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ {Lead | Lag (default) | ANSI (default) | Euro } Designation in mixed Delta-wye connections the relationship between HV to LV winding. Default is ANSI 30 deg lag, e.g., Dy1 of Yd1 vector group. To get typical European Dy11 connection, specify either "lead" or "Euro" - DSS property name: `LeadLag`, DSS property index: 44. + Name: `LeadLag` + Default: Lag """ def _get_Core(self) -> BatchInt32ArrayProxy: @@ -1589,9 +1751,10 @@ def _set_Core(self, value: Union[AnyStr, int, enums.CoreType, List[AnyStr], List Core = property(_get_Core, _set_Core) # type: BatchInt32ArrayProxy """ - {Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. Used for GIC analysis + Core Type. Used for GIC analysis - DSS property name: `Core`, DSS property index: 46. + Name: `Core` + Default: shell """ def _get_Core_str(self) -> List[str]: @@ -1602,9 +1765,10 @@ def _set_Core_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Core_str = property(_get_Core_str, _set_Core_str) # type: List[str] """ - {Shell*|5-leg|3-Leg|1-phase|core-1-phase|4-leg} Core Type. Used for GIC analysis + Core Type. Used for GIC analysis - DSS property name: `Core`, DSS property index: 46. + Name: `Core` + Default: shell """ def _get_RDCOhms(self) -> List[Float64Array]: @@ -1620,7 +1784,8 @@ def _set_RDCOhms(self, value: Union[Float64Array, List[Float64Array]], flags: en """ Winding dc resistance in OHMS. Useful for GIC analysis. From transformer test report. Defaults to 85% of %R property - DSS property name: `RDCOhms`, DSS property index: 47. + Name: `RDCOhms` + Default: [0.0881171766666667, 0.0881171766666667] """ def _get_Seasons(self) -> BatchInt32ArrayProxy: @@ -1631,9 +1796,9 @@ def _set_Seasons(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Seasons = property(_get_Seasons, _set_Seasons) # type: BatchInt32ArrayProxy """ - Defines the number of ratings to be defined for the transfomer, to be used only when defining seasonal ratings using the "Ratings" property. + Defines the number of ratings to be defined for the transformer, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 48. + Name: `Seasons` """ def _get_Ratings(self) -> List[Float64Array]: @@ -1648,102 +1813,164 @@ def _set_Ratings(self, value: Union[Float64Array, List[Float64Array]], flags: en Ratings = property(_get_Ratings, _set_Ratings) # type: List[Float64Array] """ An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert - multiple ratings to change during a QSTS simulation to evaluate different ratings in transformers. Is given in kVA + multiple ratings to change during a QSTS simulation to evaluate different ratings in transformers. It is given in kVA + + Name: `Ratings` + Default: [1100.0] + """ + + def _get_BHPoints(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 50) + + def _set_BHPoints(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(50, value, flags) + + BHPoints = property(_get_BHPoints, _set_BHPoints) # type: BatchInt32ArrayProxy + """ + Number of points in BH curve expected from `BHCurrent` and `BHFlux` arrays. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHPoints` + Default: 0 + """ + + def _get_BHCurrent(self) -> List[Float64Array]: + return [ + self._get_float64_array(self._lib.Obj_GetFloat64Array, x, 51) + for x in self._unpack() + ] + + def _set_BHCurrent(self, value: Union[Float64Array, List[Float64Array]], flags: enums.SetterFlags = 0): + self._set_batch_float64_array_prop(51, value, flags) + + BHCurrent = property(_get_BHCurrent, _set_BHCurrent) # type: List[Float64Array] + """ + Array of current values in per-unit. The array is expected to have the number of entries defined by `BHPoints`. Together with `BHFlux`, they form the BH curve of the transformer. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHCurrent` + """ - DSS property name: `Ratings`, DSS property index: 49. + def _get_BHFlux(self) -> List[Float64Array]: + return [ + self._get_float64_array(self._lib.Obj_GetFloat64Array, x, 52) + for x in self._unpack() + ] + + def _set_BHFlux(self, value: Union[Float64Array, List[Float64Array]], flags: enums.SetterFlags = 0): + self._set_batch_float64_array_prop(52, value, flags) + + BHFlux = property(_get_BHFlux, _set_BHFlux) # type: List[Float64Array] + """ + Array of flux values in per-unit. The array is expected to have the number of entries defined by `BHPoints`. Together with `BHCurrent`, they form the BH curve of the transformer. Informational only, used for GIC analysis. + + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `BHFlux` """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 50) + return BatchFloat64ArrayProxy(self, 53) def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(50, value, flags) + self._set_batch_float64_array(53, value, flags) NormAmps = property(_get_NormAmps, _set_NormAmps) # type: BatchFloat64ArrayProxy """ - Normal rated current. + Normal rated current. Use `NormHkVA` to specify the normal rating for the transformer. + + **Read-only** - DSS property name: `NormAmps`, DSS property index: 50. + Name: `NormAmps` """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 51) + return BatchFloat64ArrayProxy(self, 54) def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(51, value, flags) + self._set_batch_float64_array(54, value, flags) EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: BatchFloat64ArrayProxy """ - Maximum or emerg current. + Maximum or emergency current. Use `EmergHkVA` to specify the normal rating for the transformer. + + **Read-only** - DSS property name: `EmergAmps`, DSS property index: 51. + Name: `EmergAmps` """ def _get_FaultRate(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 52) + return BatchFloat64ArrayProxy(self, 55) def _set_FaultRate(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(52, value, flags) + self._set_batch_float64_array(55, value, flags) FaultRate = property(_get_FaultRate, _set_FaultRate) # type: BatchFloat64ArrayProxy """ Failure rate per year. - DSS property name: `FaultRate`, DSS property index: 52. + Name: `FaultRate` + Default: 0.007 """ def _get_pctPerm(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 53) + return BatchFloat64ArrayProxy(self, 56) def _set_pctPerm(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(53, value, flags) + self._set_batch_float64_array(56, value, flags) pctPerm = property(_get_pctPerm, _set_pctPerm) # type: BatchFloat64ArrayProxy """ Percent of failures that become permanent. - DSS property name: `pctPerm`, DSS property index: 53. + Name: `pctPerm` + Default: 0.0 """ def _get_Repair(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 54) + return BatchFloat64ArrayProxy(self, 57) def _set_Repair(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(54, value, flags) + self._set_batch_float64_array(57, value, flags) Repair = property(_get_Repair, _set_Repair) # type: BatchFloat64ArrayProxy """ Hours to repair. - DSS property name: `Repair`, DSS property index: 54. + Name: `Repair` + Default: 0.0 """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: - return BatchFloat64ArrayProxy(self, 55) + return BatchFloat64ArrayProxy(self, 58) def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): - self._set_batch_float64_array(55, value, flags) + self._set_batch_float64_array(58, value, flags) BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: BatchFloat64ArrayProxy """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 55. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: return [v != 0 for v in - self._get_batch_int32_prop(56) + self._get_batch_int32_prop(59) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): - self._set_batch_int32_array(56, value, flags) + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(59, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 56. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1752,9 +1979,11 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 57. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ - self._set_batch_string(57, value, flags) + self._set_batch_string(60, value, flags) class TransformerBatchProperties(TypedDict): Phases: Union[int, Int32Array] @@ -1799,6 +2028,9 @@ class TransformerBatchProperties(TypedDict): RDCOhms: Float64Array Seasons: Union[int, Int32Array] Ratings: Float64Array + BHPoints: Union[int, Int32Array] + BHCurrent: Float64Array + BHFlux: Float64Array NormAmps: Union[float, Float64Array] EmergAmps: Union[float, Float64Array] FaultRate: Union[float, Float64Array] diff --git a/altdss/UPFC.py b/altdss/UPFC.py index 0cc4cd6..521ddfe 100644 --- a/altdss/UPFC.py +++ b/altdss/UPFC.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -29,7 +29,7 @@ class UPFC(DSSObj, CircuitElementMixin, PCElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PCElementMixin._extra_slots _cls_name = 'UPFC' - _cls_idx = 36 + _cls_idx = 37 _cls_int_idx = { 6, 9, @@ -107,7 +107,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): bus1=busname.1.3 bus1=busname.1.2.3 - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> str: @@ -122,7 +122,7 @@ def _set_Bus2(self, value: AnyStr, flags: enums.SetterFlags = 0): bus2=busname.1.2 bus2=busname.1.2.3 - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_RefkV(self) -> float: @@ -137,7 +137,8 @@ def _set_RefkV(self, value: float, flags: enums.SetterFlags = 0): "refkv=0.24" - DSS property name: `RefkV`, DSS property index: 3. + Name: `RefkV` + Default: 0.24 """ def _get_PF(self) -> float: @@ -150,7 +151,8 @@ def _set_PF(self, value: float, flags: enums.SetterFlags = 0): """ Power factor target at the input terminal. - DSS property name: `PF`, DSS property index: 4. + Name: `PF` + Default: 1.0 """ def _get_Frequency(self) -> float: @@ -163,7 +165,8 @@ def _set_Frequency(self, value: float, flags: enums.SetterFlags = 0): """ UPFC working frequency. Defaults to system default base frequency. - DSS property name: `Frequency`, DSS property index: 5. + Name: `Frequency` + Units: Hz """ def _get_Phases(self) -> int: @@ -176,7 +179,8 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): """ Number of phases. Defaults to 1 phase (2 terminals, 1 conductor per terminal). - DSS property name: `Phases`, DSS property index: 6. + Name: `Phases` + Default: 1 """ def _get_Xs(self) -> float: @@ -189,7 +193,8 @@ def _set_Xs(self, value: float, flags: enums.SetterFlags = 0): """ Reactance of the series transformer of the UPFC, ohms (default=0.7540 ... 2 mH) - DSS property name: `Xs`, DSS property index: 7. + Name: `Xs` + Default: 0.754 """ def _get_Tol1(self) -> float: @@ -203,7 +208,8 @@ def _set_Tol1(self, value: float, flags: enums.SetterFlags = 0): Tolerance in pu for the series PI controller Tol1=0.02 is the format used to define 2% tolerance (Default=2%) - DSS property name: `Tol1`, DSS property index: 8. + Name: `Tol1` + Default: 0.02 """ def _get_Mode(self) -> enums.UPFCMode: @@ -223,7 +229,8 @@ def _set_Mode(self, value: Union[int, enums.UPFCMode], flags: enums.SetterFlags 4 = It is a control mode where the user can set two different set points to create a secure GAP, these references must be defined in the parameters RefkV and RefkV2. The only restriction when setting these values is that RefkV must be higher than RefkV2. 5 = In this mode the user can define the same GAP using two set points as in control mode 4. The only difference between mode 5 and mode 4 is that in mode 5, the UPFC controller performs dual control actions just as in control mode 3 - DSS property name: `Mode`, DSS property index: 9. + Name: `Mode` + Default: 1 """ def _get_VpqMax(self) -> float: @@ -236,7 +243,8 @@ def _set_VpqMax(self, value: float, flags: enums.SetterFlags = 0): """ Maximum voltage (in volts) delivered by the series voltage source (Default = 24 V) - DSS property name: `VpqMax`, DSS property index: 10. + Name: `VpqMax` + Default: 24.0 """ def _get_LossCurve_str(self) -> str: @@ -249,7 +257,7 @@ def _set_LossCurve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of the XYCurve for describing the losses behavior as a function of the voltage at the input of the UPFC - DSS property name: `LossCurve`, DSS property index: 11. + Name: `LossCurve` """ def _get_LossCurve(self) -> XYcurve: @@ -266,7 +274,7 @@ def _set_LossCurve(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags """ Name of the XYCurve for describing the losses behavior as a function of the voltage at the input of the UPFC - DSS property name: `LossCurve`, DSS property index: 11. + Name: `LossCurve` """ def _get_VHLimit(self) -> float: @@ -279,7 +287,8 @@ def _set_VHLimit(self, value: float, flags: enums.SetterFlags = 0): """ High limit for the voltage at the input of the UPFC, if the voltage is above this value the UPFC turns off. This value is specified in Volts (default 300 V) - DSS property name: `VHLimit`, DSS property index: 12. + Name: `VHLimit` + Default: 300.0 """ def _get_VLLimit(self) -> float: @@ -292,7 +301,8 @@ def _set_VLLimit(self, value: float, flags: enums.SetterFlags = 0): """ low limit for the voltage at the input of the UPFC, if voltage is below this value the UPFC turns off. This value is specified in Volts (default 125 V) - DSS property name: `VLLimit`, DSS property index: 13. + Name: `VLLimit` + Default: 125.0 """ def _get_CLimit(self) -> float: @@ -305,7 +315,8 @@ def _set_CLimit(self, value: float, flags: enums.SetterFlags = 0): """ Current Limit for the UPFC, if the current passing through the UPFC is higher than this value the UPFC turns off. This value is specified in Amps (Default 265 A) - DSS property name: `CLimit`, DSS property index: 14. + Name: `CLimit` + Default: 265.0 """ def _get_refkV2(self) -> float: @@ -320,7 +331,8 @@ def _set_refkV2(self, value: float, flags: enums.SetterFlags = 0): This reference must be lower than refkv, see control modes 4 and 5 for details - DSS property name: `refkV2`, DSS property index: 15. + Name: `refkV2` + Default: 0.0 """ def _get_kvarLimit(self) -> float: @@ -331,9 +343,11 @@ def _set_kvarLimit(self, value: float, flags: enums.SetterFlags = 0): kvarLimit = property(_get_kvarLimit, _set_kvarLimit) # type: float """ - Maximum amount of reactive power (kvar) that can be absorbed by the UPFC (Default = 5) + Maximum amount of reactive power that can be absorbed by the UPFC. - DSS property name: `kvarLimit`, DSS property index: 16. + Name: `kvarLimit` + Units: kvar + Default: 5.0 """ def _get_Element_str(self) -> str: @@ -346,11 +360,11 @@ def _set_Element_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ The name of the PD element monitored when operating with reactive power compensation. Normally, it should be the PD element immediately upstream the UPFC. The element must be defined including the class, e.g. Line.myline. - DSS property name: `Element`, DSS property index: 17. + Name: `Element` """ def _get_Element(self) -> PDElement: - return self._get_obj(17, PDElement) + return self._get_obj(17, None) def _set_Element(self, value: Union[AnyStr, PDElement], flags: enums.SetterFlags = 0): if isinstance(value, DSSObj) or value is None: @@ -363,7 +377,7 @@ def _set_Element(self, value: Union[AnyStr, PDElement], flags: enums.SetterFlags """ The name of the PD element monitored when operating with reactive power compensation. Normally, it should be the PD element immediately upstream the UPFC. The element must be defined including the class, e.g. Line.myline. - DSS property name: `Element`, DSS property index: 17. + Name: `Element` """ def _get_Spectrum_str(self) -> str: @@ -374,9 +388,10 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str """ - Name of harmonic spectrum for this source. Default is "defaultUPFC", which is defined when the DSS starts. + Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 18. + Name: `Spectrum` + Default: default """ def _get_Spectrum(self) -> SpectrumObj: @@ -391,9 +406,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj """ - Name of harmonic spectrum for this source. Default is "defaultUPFC", which is defined when the DSS starts. + Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 18. + Name: `Spectrum` + Default: default """ def _get_BaseFreq(self) -> float: @@ -406,7 +422,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 19. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -417,9 +434,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 20. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -428,7 +446,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 21. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(21, value) @@ -459,7 +479,7 @@ class UPFCProperties(TypedDict): class UPFCBatch(DSSBatch, CircuitElementBatchMixin, PCElementBatchMixin): _cls_name = 'UPFC' _obj_cls = UPFC - _cls_idx = 36 + _cls_idx = 37 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -500,7 +520,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags bus1=busname.1.3 bus1=busname.1.2.3 - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Bus2(self) -> List[str]: @@ -515,7 +535,7 @@ def _set_Bus2(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags bus2=busname.1.2 bus2=busname.1.2.3 - DSS property name: `Bus2`, DSS property index: 2. + Name: `Bus2` """ def _get_RefkV(self) -> BatchFloat64ArrayProxy: @@ -530,7 +550,8 @@ def _set_RefkV(self, value: Union[float, Float64Array], flags: enums.SetterFlags "refkv=0.24" - DSS property name: `RefkV`, DSS property index: 3. + Name: `RefkV` + Default: 0.24 """ def _get_PF(self) -> BatchFloat64ArrayProxy: @@ -543,7 +564,8 @@ def _set_PF(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Power factor target at the input terminal. - DSS property name: `PF`, DSS property index: 4. + Name: `PF` + Default: 1.0 """ def _get_Frequency(self) -> BatchFloat64ArrayProxy: @@ -556,7 +578,8 @@ def _set_Frequency(self, value: Union[float, Float64Array], flags: enums.SetterF """ UPFC working frequency. Defaults to system default base frequency. - DSS property name: `Frequency`, DSS property index: 5. + Name: `Frequency` + Units: Hz """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -569,7 +592,8 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Number of phases. Defaults to 1 phase (2 terminals, 1 conductor per terminal). - DSS property name: `Phases`, DSS property index: 6. + Name: `Phases` + Default: 1 """ def _get_Xs(self) -> BatchFloat64ArrayProxy: @@ -582,7 +606,8 @@ def _set_Xs(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Reactance of the series transformer of the UPFC, ohms (default=0.7540 ... 2 mH) - DSS property name: `Xs`, DSS property index: 7. + Name: `Xs` + Default: 0.754 """ def _get_Tol1(self) -> BatchFloat64ArrayProxy: @@ -596,7 +621,8 @@ def _set_Tol1(self, value: Union[float, Float64Array], flags: enums.SetterFlags Tolerance in pu for the series PI controller Tol1=0.02 is the format used to define 2% tolerance (Default=2%) - DSS property name: `Tol1`, DSS property index: 8. + Name: `Tol1` + Default: 0.02 """ def _get_Mode(self) -> BatchInt32ArrayProxy: @@ -616,7 +642,8 @@ def _set_Mode(self, value: Union[int, enums.UPFCMode, Int32Array], flags: enums. 4 = It is a control mode where the user can set two different set points to create a secure GAP, these references must be defined in the parameters RefkV and RefkV2. The only restriction when setting these values is that RefkV must be higher than RefkV2. 5 = In this mode the user can define the same GAP using two set points as in control mode 4. The only difference between mode 5 and mode 4 is that in mode 5, the UPFC controller performs dual control actions just as in control mode 3 - DSS property name: `Mode`, DSS property index: 9. + Name: `Mode` + Default: 1 """ def _get_VpqMax(self) -> BatchFloat64ArrayProxy: @@ -629,7 +656,8 @@ def _set_VpqMax(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Maximum voltage (in volts) delivered by the series voltage source (Default = 24 V) - DSS property name: `VpqMax`, DSS property index: 10. + Name: `VpqMax` + Default: 24.0 """ def _get_LossCurve_str(self) -> List[str]: @@ -642,7 +670,7 @@ def _set_LossCurve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Se """ Name of the XYCurve for describing the losses behavior as a function of the voltage at the input of the UPFC - DSS property name: `LossCurve`, DSS property index: 11. + Name: `LossCurve` """ def _get_LossCurve(self) -> List[XYcurve]: @@ -655,7 +683,7 @@ def _set_LossCurve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurv """ Name of the XYCurve for describing the losses behavior as a function of the voltage at the input of the UPFC - DSS property name: `LossCurve`, DSS property index: 11. + Name: `LossCurve` """ def _get_VHLimit(self) -> BatchFloat64ArrayProxy: @@ -668,7 +696,8 @@ def _set_VHLimit(self, value: Union[float, Float64Array], flags: enums.SetterFla """ High limit for the voltage at the input of the UPFC, if the voltage is above this value the UPFC turns off. This value is specified in Volts (default 300 V) - DSS property name: `VHLimit`, DSS property index: 12. + Name: `VHLimit` + Default: 300.0 """ def _get_VLLimit(self) -> BatchFloat64ArrayProxy: @@ -681,7 +710,8 @@ def _set_VLLimit(self, value: Union[float, Float64Array], flags: enums.SetterFla """ low limit for the voltage at the input of the UPFC, if voltage is below this value the UPFC turns off. This value is specified in Volts (default 125 V) - DSS property name: `VLLimit`, DSS property index: 13. + Name: `VLLimit` + Default: 125.0 """ def _get_CLimit(self) -> BatchFloat64ArrayProxy: @@ -694,7 +724,8 @@ def _set_CLimit(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Current Limit for the UPFC, if the current passing through the UPFC is higher than this value the UPFC turns off. This value is specified in Amps (Default 265 A) - DSS property name: `CLimit`, DSS property index: 14. + Name: `CLimit` + Default: 265.0 """ def _get_refkV2(self) -> BatchFloat64ArrayProxy: @@ -709,7 +740,8 @@ def _set_refkV2(self, value: Union[float, Float64Array], flags: enums.SetterFlag This reference must be lower than refkv, see control modes 4 and 5 for details - DSS property name: `refkV2`, DSS property index: 15. + Name: `refkV2` + Default: 0.0 """ def _get_kvarLimit(self) -> BatchFloat64ArrayProxy: @@ -720,9 +752,11 @@ def _set_kvarLimit(self, value: Union[float, Float64Array], flags: enums.SetterF kvarLimit = property(_get_kvarLimit, _set_kvarLimit) # type: BatchFloat64ArrayProxy """ - Maximum amount of reactive power (kvar) that can be absorbed by the UPFC (Default = 5) + Maximum amount of reactive power that can be absorbed by the UPFC. - DSS property name: `kvarLimit`, DSS property index: 16. + Name: `kvarLimit` + Units: kvar + Default: 5.0 """ def _get_Element_str(self) -> List[str]: @@ -735,7 +769,7 @@ def _set_Element_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sett """ The name of the PD element monitored when operating with reactive power compensation. Normally, it should be the PD element immediately upstream the UPFC. The element must be defined including the class, e.g. Line.myline. - DSS property name: `Element`, DSS property index: 17. + Name: `Element` """ def _get_Element(self) -> List[PDElement]: @@ -748,7 +782,7 @@ def _set_Element(self, value: Union[AnyStr, PDElement, List[AnyStr], List[PDElem """ The name of the PD element monitored when operating with reactive power compensation. Normally, it should be the PD element immediately upstream the UPFC. The element must be defined including the class, e.g. Line.myline. - DSS property name: `Element`, DSS property index: 17. + Name: `Element` """ def _get_Spectrum_str(self) -> List[str]: @@ -759,9 +793,10 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] """ - Name of harmonic spectrum for this source. Default is "defaultUPFC", which is defined when the DSS starts. + Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 18. + Name: `Spectrum` + Default: default """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -772,9 +807,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] """ - Name of harmonic spectrum for this source. Default is "defaultUPFC", which is defined when the DSS starts. + Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 18. + Name: `Spectrum` + Default: default """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -787,7 +823,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 19. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -795,14 +832,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(20) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(20, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 20. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -811,7 +849,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 21. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(21, value, flags) diff --git a/altdss/UPFCControl.py b/altdss/UPFCControl.py index a03042d..30b8dac 100644 --- a/altdss/UPFCControl.py +++ b/altdss/UPFCControl.py @@ -13,7 +13,7 @@ class UPFCControl(DSSObj, CircuitElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots _cls_name = 'UPFCControl' - _cls_idx = 37 + _cls_idx = 38 _cls_int_idx = { 3, } @@ -60,7 +60,7 @@ def _set_UPFCList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ The list of all the UPFC devices to be controlled by this controller, If left empty, this control will apply for all UPFCs in the model. - DSS property name: `UPFCList`, DSS property index: 1. + Name: `UPFCList` """ def _get_BaseFreq(self) -> float: @@ -73,7 +73,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 2. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -84,9 +85,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 3. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -95,7 +97,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 4. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(4, value) @@ -109,7 +113,7 @@ class UPFCControlProperties(TypedDict): class UPFCControlBatch(DSSBatch, CircuitElementBatchMixin): _cls_name = 'UPFCControl' _obj_cls = UPFCControl - _cls_idx = 37 + _cls_idx = 38 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -151,7 +155,7 @@ def _set_UPFCList(self, value: List[AnyStr], flags: enums.SetterFlags = 0): """ The list of all the UPFC devices to be controlled by this controller, If left empty, this control will apply for all UPFCs in the model. - DSS property name: `UPFCList`, DSS property index: 1. + Name: `UPFCList` """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -164,7 +168,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 2. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -172,14 +177,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(3) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(3, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 3. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -188,7 +194,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 4. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(4, value, flags) diff --git a/altdss/VCCS.py b/altdss/VCCS.py index fa6aa33..4c5d204 100644 --- a/altdss/VCCS.py +++ b/altdss/VCCS.py @@ -86,7 +86,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): bus1=busname bus1=busname.1.2.3 - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Phases(self) -> int: @@ -97,9 +97,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of phases. Defaults to 1. + Number of phases. - DSS property name: `Phases`, DSS property index: 2. + Name: `Phases` + Default: 1 """ def _get_PRated(self) -> float: @@ -110,9 +111,11 @@ def _set_PRated(self, value: float, flags: enums.SetterFlags = 0): PRated = property(_get_PRated, _set_PRated) # type: float """ - Total rated power, in Watts. + Total rated power. - DSS property name: `PRated`, DSS property index: 3. + Name: `PRated` + Units: kW + Default: 250.0 """ def _get_VRated(self) -> float: @@ -123,9 +126,11 @@ def _set_VRated(self, value: float, flags: enums.SetterFlags = 0): VRated = property(_get_VRated, _set_VRated) # type: float """ - Rated line-to-line voltage, in Volts + Rated line-to-line voltage. - DSS property name: `VRated`, DSS property index: 4. + Name: `VRated` + Units: V + Default: 208.0 """ def _get_Ppct(self) -> float: @@ -138,7 +143,8 @@ def _set_Ppct(self, value: float, flags: enums.SetterFlags = 0): """ Steady-state operating output, in percent of rated. - DSS property name: `Ppct`, DSS property index: 5. + Name: `Ppct` + Default: 100.0 """ def _get_BP1_str(self) -> str: @@ -151,7 +157,7 @@ def _set_BP1_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ XYCurve defining the input piece-wise linear block. - DSS property name: `BP1`, DSS property index: 6. + Name: `BP1` """ def _get_BP1(self) -> XYcurve: @@ -168,7 +174,7 @@ def _set_BP1(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags = 0): """ XYCurve defining the input piece-wise linear block. - DSS property name: `BP1`, DSS property index: 6. + Name: `BP1` """ def _get_BP2_str(self) -> str: @@ -181,7 +187,7 @@ def _set_BP2_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ XYCurve defining the output piece-wise linear block. - DSS property name: `BP2`, DSS property index: 7. + Name: `BP2` """ def _get_BP2(self) -> XYcurve: @@ -198,7 +204,7 @@ def _set_BP2(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags = 0): """ XYCurve defining the output piece-wise linear block. - DSS property name: `BP2`, DSS property index: 7. + Name: `BP2` """ def _get_Filter_str(self) -> str: @@ -211,7 +217,7 @@ def _set_Filter_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ XYCurve defining the digital filter coefficients (x numerator, y denominator). - DSS property name: `Filter`, DSS property index: 8. + Name: `Filter` """ def _get_Filter(self) -> XYcurve: @@ -228,7 +234,7 @@ def _set_Filter(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags = """ XYCurve defining the digital filter coefficients (x numerator, y denominator). - DSS property name: `Filter`, DSS property index: 8. + Name: `Filter` """ def _get_FSample(self) -> float: @@ -239,9 +245,11 @@ def _set_FSample(self, value: float, flags: enums.SetterFlags = 0): FSample = property(_get_FSample, _set_FSample) # type: float """ - Sample frequency [Hz} for the digital filter. + Sample frequency for the digital filter. - DSS property name: `FSample`, DSS property index: 9. + Name: `FSample` + Units: Hz + Default: 5000.0 """ def _get_RMSMode(self) -> bool: @@ -252,9 +260,10 @@ def _set_RMSMode(self, value: bool, flags: enums.SetterFlags = 0): RMSMode = property(_get_RMSMode, _set_RMSMode) # type: bool """ - True if only Hz is used to represent a phase-locked loop (PLL), ignoring the BP1, BP2 and time-domain transformations. Default is no. + True if only Hz is used to represent a phase-locked loop (PLL), ignoring the BP1, BP2 and time-domain transformations. - DSS property name: `RMSMode`, DSS property index: 10. + Name: `RMSMode` + Default: False """ def _get_IMaxpu(self) -> float: @@ -265,9 +274,10 @@ def _set_IMaxpu(self, value: float, flags: enums.SetterFlags = 0): IMaxpu = property(_get_IMaxpu, _set_IMaxpu) # type: float """ - Maximum output current in per-unit of rated; defaults to 1.1 + Maximum output current in per-unit of rated. - DSS property name: `IMaxpu`, DSS property index: 11. + Name: `IMaxpu` + Default: 1.1 """ def _get_VRMSTau(self) -> float: @@ -278,9 +288,10 @@ def _set_VRMSTau(self, value: float, flags: enums.SetterFlags = 0): VRMSTau = property(_get_VRMSTau, _set_VRMSTau) # type: float """ - Time constant in sensing Vrms for the PLL; defaults to 0.0015 + Time constant in sensing Vrms for the PLL. - DSS property name: `VRMSTau`, DSS property index: 12. + Name: `VRMSTau` + Default: 0.0015 """ def _get_IRMSTau(self) -> float: @@ -291,9 +302,10 @@ def _set_IRMSTau(self, value: float, flags: enums.SetterFlags = 0): IRMSTau = property(_get_IRMSTau, _set_IRMSTau) # type: float """ - Time constant in producing Irms from the PLL; defaults to 0.0015 + Time constant in producing Irms from the PLL. - DSS property name: `IRMSTau`, DSS property index: 13. + Name: `IRMSTau` + Default: 0.0015 """ def _get_Spectrum_str(self) -> str: @@ -304,9 +316,10 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str """ - Harmonic spectrum assumed for this source. Default is "default". + Harmonic spectrum assumed for this source. - DSS property name: `Spectrum`, DSS property index: 14. + Name: `Spectrum` + Default: default """ def _get_Spectrum(self) -> SpectrumObj: @@ -321,9 +334,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj """ - Harmonic spectrum assumed for this source. Default is "default". + Harmonic spectrum assumed for this source. - DSS property name: `Spectrum`, DSS property index: 14. + Name: `Spectrum` + Default: default """ def _get_BaseFreq(self) -> float: @@ -336,7 +350,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 15. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -347,9 +362,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 16. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -358,7 +374,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 17. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(17, value) @@ -426,7 +444,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags bus1=busname bus1=busname.1.2.3 - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -437,9 +455,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of phases. Defaults to 1. + Number of phases. - DSS property name: `Phases`, DSS property index: 2. + Name: `Phases` + Default: 1 """ def _get_PRated(self) -> BatchFloat64ArrayProxy: @@ -450,9 +469,11 @@ def _set_PRated(self, value: Union[float, Float64Array], flags: enums.SetterFlag PRated = property(_get_PRated, _set_PRated) # type: BatchFloat64ArrayProxy """ - Total rated power, in Watts. + Total rated power. - DSS property name: `PRated`, DSS property index: 3. + Name: `PRated` + Units: kW + Default: 250.0 """ def _get_VRated(self) -> BatchFloat64ArrayProxy: @@ -463,9 +484,11 @@ def _set_VRated(self, value: Union[float, Float64Array], flags: enums.SetterFlag VRated = property(_get_VRated, _set_VRated) # type: BatchFloat64ArrayProxy """ - Rated line-to-line voltage, in Volts + Rated line-to-line voltage. - DSS property name: `VRated`, DSS property index: 4. + Name: `VRated` + Units: V + Default: 208.0 """ def _get_Ppct(self) -> BatchFloat64ArrayProxy: @@ -478,7 +501,8 @@ def _set_Ppct(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Steady-state operating output, in percent of rated. - DSS property name: `Ppct`, DSS property index: 5. + Name: `Ppct` + Default: 100.0 """ def _get_BP1_str(self) -> List[str]: @@ -491,7 +515,7 @@ def _set_BP1_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ XYCurve defining the input piece-wise linear block. - DSS property name: `BP1`, DSS property index: 6. + Name: `BP1` """ def _get_BP1(self) -> List[XYcurve]: @@ -504,7 +528,7 @@ def _set_BP1(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve]], f """ XYCurve defining the input piece-wise linear block. - DSS property name: `BP1`, DSS property index: 6. + Name: `BP1` """ def _get_BP2_str(self) -> List[str]: @@ -517,7 +541,7 @@ def _set_BP2_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl """ XYCurve defining the output piece-wise linear block. - DSS property name: `BP2`, DSS property index: 7. + Name: `BP2` """ def _get_BP2(self) -> List[XYcurve]: @@ -530,7 +554,7 @@ def _set_BP2(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve]], f """ XYCurve defining the output piece-wise linear block. - DSS property name: `BP2`, DSS property index: 7. + Name: `BP2` """ def _get_Filter_str(self) -> List[str]: @@ -543,7 +567,7 @@ def _set_Filter_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette """ XYCurve defining the digital filter coefficients (x numerator, y denominator). - DSS property name: `Filter`, DSS property index: 8. + Name: `Filter` """ def _get_Filter(self) -> List[XYcurve]: @@ -556,7 +580,7 @@ def _set_Filter(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve]] """ XYCurve defining the digital filter coefficients (x numerator, y denominator). - DSS property name: `Filter`, DSS property index: 8. + Name: `Filter` """ def _get_FSample(self) -> BatchFloat64ArrayProxy: @@ -567,9 +591,11 @@ def _set_FSample(self, value: Union[float, Float64Array], flags: enums.SetterFla FSample = property(_get_FSample, _set_FSample) # type: BatchFloat64ArrayProxy """ - Sample frequency [Hz} for the digital filter. + Sample frequency for the digital filter. - DSS property name: `FSample`, DSS property index: 9. + Name: `FSample` + Units: Hz + Default: 5000.0 """ def _get_RMSMode(self) -> List[bool]: @@ -577,14 +603,15 @@ def _get_RMSMode(self) -> List[bool]: self._get_batch_int32_prop(10) ] - def _set_RMSMode(self, value: bool, flags: enums.SetterFlags = 0): + def _set_RMSMode(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(10, value, flags) RMSMode = property(_get_RMSMode, _set_RMSMode) # type: List[bool] """ - True if only Hz is used to represent a phase-locked loop (PLL), ignoring the BP1, BP2 and time-domain transformations. Default is no. + True if only Hz is used to represent a phase-locked loop (PLL), ignoring the BP1, BP2 and time-domain transformations. - DSS property name: `RMSMode`, DSS property index: 10. + Name: `RMSMode` + Default: False """ def _get_IMaxpu(self) -> BatchFloat64ArrayProxy: @@ -595,9 +622,10 @@ def _set_IMaxpu(self, value: Union[float, Float64Array], flags: enums.SetterFlag IMaxpu = property(_get_IMaxpu, _set_IMaxpu) # type: BatchFloat64ArrayProxy """ - Maximum output current in per-unit of rated; defaults to 1.1 + Maximum output current in per-unit of rated. - DSS property name: `IMaxpu`, DSS property index: 11. + Name: `IMaxpu` + Default: 1.1 """ def _get_VRMSTau(self) -> BatchFloat64ArrayProxy: @@ -608,9 +636,10 @@ def _set_VRMSTau(self, value: Union[float, Float64Array], flags: enums.SetterFla VRMSTau = property(_get_VRMSTau, _set_VRMSTau) # type: BatchFloat64ArrayProxy """ - Time constant in sensing Vrms for the PLL; defaults to 0.0015 + Time constant in sensing Vrms for the PLL. - DSS property name: `VRMSTau`, DSS property index: 12. + Name: `VRMSTau` + Default: 0.0015 """ def _get_IRMSTau(self) -> BatchFloat64ArrayProxy: @@ -621,9 +650,10 @@ def _set_IRMSTau(self, value: Union[float, Float64Array], flags: enums.SetterFla IRMSTau = property(_get_IRMSTau, _set_IRMSTau) # type: BatchFloat64ArrayProxy """ - Time constant in producing Irms from the PLL; defaults to 0.0015 + Time constant in producing Irms from the PLL. - DSS property name: `IRMSTau`, DSS property index: 13. + Name: `IRMSTau` + Default: 0.0015 """ def _get_Spectrum_str(self) -> List[str]: @@ -634,9 +664,10 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] """ - Harmonic spectrum assumed for this source. Default is "default". + Harmonic spectrum assumed for this source. - DSS property name: `Spectrum`, DSS property index: 14. + Name: `Spectrum` + Default: default """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -647,9 +678,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] """ - Harmonic spectrum assumed for this source. Default is "default". + Harmonic spectrum assumed for this source. - DSS property name: `Spectrum`, DSS property index: 14. + Name: `Spectrum` + Default: default """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -662,7 +694,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 15. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -670,14 +703,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(16) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(16, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 16. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -686,7 +720,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 17. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(17, value, flags) diff --git a/altdss/VSConverter.py b/altdss/VSConverter.py index a64ace4..0d59e23 100644 --- a/altdss/VSConverter.py +++ b/altdss/VSConverter.py @@ -16,7 +16,7 @@ class VSConverter(DSSObj, CircuitElementMixin, PCElementMixin): __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PCElementMixin._extra_slots _cls_name = 'VSConverter' - _cls_idx = 46 + _cls_idx = 47 _cls_int_idx = { 1, 6, @@ -97,9 +97,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of AC plus DC conductors. Default is 4. AC phases numbered before DC conductors. + Number of AC plus DC conductors. AC phases numbered before DC conductors. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 4 """ def _get_Bus1(self) -> str: @@ -112,7 +113,7 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of converter bus, containing both AC and DC conductors. Bus2 is always ground. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kVAC(self) -> float: @@ -125,7 +126,8 @@ def _set_kVAC(self, value: float, flags: enums.SetterFlags = 0): """ Nominal AC line-neutral voltage in kV. Must be specified > 0. - DSS property name: `kVAC`, DSS property index: 3. + Name: `kVAC` + Default: 1.0 """ def _get_kVDC(self) -> float: @@ -138,7 +140,8 @@ def _set_kVDC(self, value: float, flags: enums.SetterFlags = 0): """ Nominal DC voltage in kV. Must be specified > 0. - DSS property name: `kVDC`, DSS property index: 4. + Name: `kVDC` + Default: 1.0 """ def _get_kW(self) -> float: @@ -151,7 +154,8 @@ def _set_kW(self, value: float, flags: enums.SetterFlags = 0): """ Nominal converter power in kW. Must be specified > 0. - DSS property name: `kW`, DSS property index: 5. + Name: `kW` + Default: 1.0 """ def _get_NDC(self) -> int: @@ -162,9 +166,10 @@ def _set_NDC(self, value: int, flags: enums.SetterFlags = 0): NDC = property(_get_NDC, _set_NDC) # type: int """ - Number of DC conductors. Default is 1. DC conductors numbered after AC phases. + Number of DC conductors. DC conductors numbered after AC phases. - DSS property name: `NDC`, DSS property index: 6. + Name: `NDC` + Default: 1 """ def _get_RAC(self) -> float: @@ -175,10 +180,12 @@ def _set_RAC(self, value: float, flags: enums.SetterFlags = 0): RAC = property(_get_RAC, _set_RAC) # type: float """ - AC resistance (ohms) for the converter transformer, plus any series reactors. Default is 0. + AC resistance for the converter transformer, plus any series reactors. Must be 0 for Vac control mode. - DSS property name: `RAC`, DSS property index: 7. + Name: `RAC` + Units: Ω + Default: 1e-12 """ def _get_XAC(self) -> float: @@ -189,10 +196,12 @@ def _set_XAC(self, value: float, flags: enums.SetterFlags = 0): XAC = property(_get_XAC, _set_XAC) # type: float """ - AC reactance (ohms) for the converter transformer, plus any series reactors. Default is 0. + AC reactance for the converter transformer, plus any series reactors. Must be 0 for Vac control mode. Must be >0 for PacVac, PacQac or VacVdc control mode. - DSS property name: `XAC`, DSS property index: 8. + Name: `XAC` + Units: Ω + Default: 0.0 """ def _get_M0(self) -> float: @@ -203,9 +212,10 @@ def _set_M0(self, value: float, flags: enums.SetterFlags = 0): M0 = property(_get_M0, _set_M0) # type: float """ - Fixed or initial value of the modulation index. Default is 0.5. + Fixed or initial value of the modulation index. - DSS property name: `M0`, DSS property index: 9. + Name: `M0` + Default: 0.5 """ def _get_d0(self) -> float: @@ -216,9 +226,10 @@ def _set_d0(self, value: float, flags: enums.SetterFlags = 0): d0 = property(_get_d0, _set_d0) # type: float """ - Fixed or initial value of the power angle in degrees. Default is 0. + Fixed or initial value of the power angle in degrees. - DSS property name: `d0`, DSS property index: 10. + Name: `d0` + Default: 0.0 """ def _get_MMin(self) -> float: @@ -229,9 +240,10 @@ def _set_MMin(self, value: float, flags: enums.SetterFlags = 0): MMin = property(_get_MMin, _set_MMin) # type: float """ - Minimum value of modulation index. Default is 0.1. + Minimum value of modulation index. - DSS property name: `MMin`, DSS property index: 11. + Name: `MMin` + Default: 0.1 """ def _get_MMax(self) -> float: @@ -242,9 +254,10 @@ def _set_MMax(self, value: float, flags: enums.SetterFlags = 0): MMax = property(_get_MMax, _set_MMax) # type: float """ - Maximum value of modulation index. Default is 0.9. + Maximum value of modulation index. - DSS property name: `MMax`, DSS property index: 12. + Name: `MMax` + Default: 0.9 """ def _get_IACMax(self) -> float: @@ -255,9 +268,10 @@ def _set_IACMax(self, value: float, flags: enums.SetterFlags = 0): IACMax = property(_get_IACMax, _set_IACMax) # type: float """ - Maximum value of AC line current, per-unit of nominal. Default is 2. + Maximum value of AC line current, per-unit of nominal. - DSS property name: `IACMax`, DSS property index: 13. + Name: `IACMax` + Default: 2.0 """ def _get_IDCMax(self) -> float: @@ -268,9 +282,10 @@ def _set_IDCMax(self, value: float, flags: enums.SetterFlags = 0): IDCMax = property(_get_IDCMax, _set_IDCMax) # type: float """ - Maximum value of DC current, per-unit of nominal. Default is 2. + Maximum value of DC current, per-unit of nominal. - DSS property name: `IDCMax`, DSS property index: 14. + Name: `IDCMax` + Default: 2.0 """ def _get_VACRef(self) -> float: @@ -281,10 +296,11 @@ def _set_VACRef(self, value: float, flags: enums.SetterFlags = 0): VACRef = property(_get_VACRef, _set_VACRef) # type: float """ - Reference AC line-to-neutral voltage, RMS Volts. Default is 0. + Reference AC line-to-neutral voltage, RMS Volts. Applies to PacVac and VdcVac control modes, influencing m. - DSS property name: `VACRef`, DSS property index: 15. + Name: `VACRef` + Default: 0.0 """ def _get_PACRef(self) -> float: @@ -295,10 +311,11 @@ def _set_PACRef(self, value: float, flags: enums.SetterFlags = 0): PACRef = property(_get_PACRef, _set_PACRef) # type: float """ - Reference total AC real power, Watts. Default is 0. + Reference total AC real power, Watts. Applies to PacVac and PacQac control modes, influencing d. - DSS property name: `PACRef`, DSS property index: 16. + Name: `PACRef` + Default: 0.0 """ def _get_QACRef(self) -> float: @@ -309,10 +326,11 @@ def _set_QACRef(self, value: float, flags: enums.SetterFlags = 0): QACRef = property(_get_QACRef, _set_QACRef) # type: float """ - Reference total AC reactive power, Vars. Default is 0. + Reference total AC reactive power, Vars. Applies to PacQac and VdcQac control modes, influencing m. - DSS property name: `QACRef`, DSS property index: 17. + Name: `QACRef` + Default: 0.0 """ def _get_VDCRef(self) -> float: @@ -323,10 +341,11 @@ def _set_VDCRef(self, value: float, flags: enums.SetterFlags = 0): VDCRef = property(_get_VDCRef, _set_VDCRef) # type: float """ - Reference DC voltage, Volts. Default is 0. + Reference DC voltage, Volts. Applies to VdcVac control mode, influencing d. - DSS property name: `VDCRef`, DSS property index: 18. + Name: `VDCRef` + Default: 0.0 """ def _get_VSCMode(self) -> enums.VSConverterControlMode: @@ -340,9 +359,10 @@ def _set_VSCMode(self, value: Union[AnyStr, int, enums.VSConverterControlMode], VSCMode = property(_get_VSCMode, _set_VSCMode) # type: enums.VSConverterControlMode """ - Control Mode (Fixed|PacVac|PacQac|VdcVac|VdcQac). Default is Fixed. + Control Mode - DSS property name: `VSCMode`, DSS property index: 19. + Name: `VSCMode` + Default: Fixed """ def _get_VSCMode_str(self) -> str: @@ -353,9 +373,10 @@ def _set_VSCMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): VSCMode_str = property(_get_VSCMode_str, _set_VSCMode_str) # type: str """ - Control Mode (Fixed|PacVac|PacQac|VdcVac|VdcQac). Default is Fixed. + Control Mode - DSS property name: `VSCMode`, DSS property index: 19. + Name: `VSCMode` + Default: Fixed """ def _get_Spectrum_str(self) -> str: @@ -368,7 +389,8 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Name of harmonic spectrum for this device. - DSS property name: `Spectrum`, DSS property index: 20. + Name: `Spectrum` + Default: default """ def _get_Spectrum(self) -> SpectrumObj: @@ -385,7 +407,8 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl """ Name of harmonic spectrum for this device. - DSS property name: `Spectrum`, DSS property index: 20. + Name: `Spectrum` + Default: default """ def _get_BaseFreq(self) -> float: @@ -398,7 +421,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 21. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -409,9 +433,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 22. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -420,7 +445,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 23. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(23, value) @@ -453,7 +480,7 @@ class VSConverterProperties(TypedDict): class VSConverterBatch(DSSBatch, CircuitElementBatchMixin, PCElementBatchMixin): _cls_name = 'VSConverter' _obj_cls = VSConverter - _cls_idx = 46 + _cls_idx = 47 __slots__ = [] def __init__(self, api_util, **kwargs): @@ -490,9 +517,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of AC plus DC conductors. Default is 4. AC phases numbered before DC conductors. + Number of AC plus DC conductors. AC phases numbered before DC conductors. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 4 """ def _get_Bus1(self) -> List[str]: @@ -505,7 +533,7 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags """ Name of converter bus, containing both AC and DC conductors. Bus2 is always ground. - DSS property name: `Bus1`, DSS property index: 2. + Name: `Bus1` """ def _get_kVAC(self) -> BatchFloat64ArrayProxy: @@ -518,7 +546,8 @@ def _set_kVAC(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Nominal AC line-neutral voltage in kV. Must be specified > 0. - DSS property name: `kVAC`, DSS property index: 3. + Name: `kVAC` + Default: 1.0 """ def _get_kVDC(self) -> BatchFloat64ArrayProxy: @@ -531,7 +560,8 @@ def _set_kVDC(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Nominal DC voltage in kV. Must be specified > 0. - DSS property name: `kVDC`, DSS property index: 4. + Name: `kVDC` + Default: 1.0 """ def _get_kW(self) -> BatchFloat64ArrayProxy: @@ -544,7 +574,8 @@ def _set_kW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Nominal converter power in kW. Must be specified > 0. - DSS property name: `kW`, DSS property index: 5. + Name: `kW` + Default: 1.0 """ def _get_NDC(self) -> BatchInt32ArrayProxy: @@ -555,9 +586,10 @@ def _set_NDC(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): NDC = property(_get_NDC, _set_NDC) # type: BatchInt32ArrayProxy """ - Number of DC conductors. Default is 1. DC conductors numbered after AC phases. + Number of DC conductors. DC conductors numbered after AC phases. - DSS property name: `NDC`, DSS property index: 6. + Name: `NDC` + Default: 1 """ def _get_RAC(self) -> BatchFloat64ArrayProxy: @@ -568,10 +600,12 @@ def _set_RAC(self, value: Union[float, Float64Array], flags: enums.SetterFlags = RAC = property(_get_RAC, _set_RAC) # type: BatchFloat64ArrayProxy """ - AC resistance (ohms) for the converter transformer, plus any series reactors. Default is 0. + AC resistance for the converter transformer, plus any series reactors. Must be 0 for Vac control mode. - DSS property name: `RAC`, DSS property index: 7. + Name: `RAC` + Units: Ω + Default: 1e-12 """ def _get_XAC(self) -> BatchFloat64ArrayProxy: @@ -582,10 +616,12 @@ def _set_XAC(self, value: Union[float, Float64Array], flags: enums.SetterFlags = XAC = property(_get_XAC, _set_XAC) # type: BatchFloat64ArrayProxy """ - AC reactance (ohms) for the converter transformer, plus any series reactors. Default is 0. + AC reactance for the converter transformer, plus any series reactors. Must be 0 for Vac control mode. Must be >0 for PacVac, PacQac or VacVdc control mode. - DSS property name: `XAC`, DSS property index: 8. + Name: `XAC` + Units: Ω + Default: 0.0 """ def _get_M0(self) -> BatchFloat64ArrayProxy: @@ -596,9 +632,10 @@ def _set_M0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = M0 = property(_get_M0, _set_M0) # type: BatchFloat64ArrayProxy """ - Fixed or initial value of the modulation index. Default is 0.5. + Fixed or initial value of the modulation index. - DSS property name: `M0`, DSS property index: 9. + Name: `M0` + Default: 0.5 """ def _get_d0(self) -> BatchFloat64ArrayProxy: @@ -609,9 +646,10 @@ def _set_d0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = d0 = property(_get_d0, _set_d0) # type: BatchFloat64ArrayProxy """ - Fixed or initial value of the power angle in degrees. Default is 0. + Fixed or initial value of the power angle in degrees. - DSS property name: `d0`, DSS property index: 10. + Name: `d0` + Default: 0.0 """ def _get_MMin(self) -> BatchFloat64ArrayProxy: @@ -622,9 +660,10 @@ def _set_MMin(self, value: Union[float, Float64Array], flags: enums.SetterFlags MMin = property(_get_MMin, _set_MMin) # type: BatchFloat64ArrayProxy """ - Minimum value of modulation index. Default is 0.1. + Minimum value of modulation index. - DSS property name: `MMin`, DSS property index: 11. + Name: `MMin` + Default: 0.1 """ def _get_MMax(self) -> BatchFloat64ArrayProxy: @@ -635,9 +674,10 @@ def _set_MMax(self, value: Union[float, Float64Array], flags: enums.SetterFlags MMax = property(_get_MMax, _set_MMax) # type: BatchFloat64ArrayProxy """ - Maximum value of modulation index. Default is 0.9. + Maximum value of modulation index. - DSS property name: `MMax`, DSS property index: 12. + Name: `MMax` + Default: 0.9 """ def _get_IACMax(self) -> BatchFloat64ArrayProxy: @@ -648,9 +688,10 @@ def _set_IACMax(self, value: Union[float, Float64Array], flags: enums.SetterFlag IACMax = property(_get_IACMax, _set_IACMax) # type: BatchFloat64ArrayProxy """ - Maximum value of AC line current, per-unit of nominal. Default is 2. + Maximum value of AC line current, per-unit of nominal. - DSS property name: `IACMax`, DSS property index: 13. + Name: `IACMax` + Default: 2.0 """ def _get_IDCMax(self) -> BatchFloat64ArrayProxy: @@ -661,9 +702,10 @@ def _set_IDCMax(self, value: Union[float, Float64Array], flags: enums.SetterFlag IDCMax = property(_get_IDCMax, _set_IDCMax) # type: BatchFloat64ArrayProxy """ - Maximum value of DC current, per-unit of nominal. Default is 2. + Maximum value of DC current, per-unit of nominal. - DSS property name: `IDCMax`, DSS property index: 14. + Name: `IDCMax` + Default: 2.0 """ def _get_VACRef(self) -> BatchFloat64ArrayProxy: @@ -674,10 +716,11 @@ def _set_VACRef(self, value: Union[float, Float64Array], flags: enums.SetterFlag VACRef = property(_get_VACRef, _set_VACRef) # type: BatchFloat64ArrayProxy """ - Reference AC line-to-neutral voltage, RMS Volts. Default is 0. + Reference AC line-to-neutral voltage, RMS Volts. Applies to PacVac and VdcVac control modes, influencing m. - DSS property name: `VACRef`, DSS property index: 15. + Name: `VACRef` + Default: 0.0 """ def _get_PACRef(self) -> BatchFloat64ArrayProxy: @@ -688,10 +731,11 @@ def _set_PACRef(self, value: Union[float, Float64Array], flags: enums.SetterFlag PACRef = property(_get_PACRef, _set_PACRef) # type: BatchFloat64ArrayProxy """ - Reference total AC real power, Watts. Default is 0. + Reference total AC real power, Watts. Applies to PacVac and PacQac control modes, influencing d. - DSS property name: `PACRef`, DSS property index: 16. + Name: `PACRef` + Default: 0.0 """ def _get_QACRef(self) -> BatchFloat64ArrayProxy: @@ -702,10 +746,11 @@ def _set_QACRef(self, value: Union[float, Float64Array], flags: enums.SetterFlag QACRef = property(_get_QACRef, _set_QACRef) # type: BatchFloat64ArrayProxy """ - Reference total AC reactive power, Vars. Default is 0. + Reference total AC reactive power, Vars. Applies to PacQac and VdcQac control modes, influencing m. - DSS property name: `QACRef`, DSS property index: 17. + Name: `QACRef` + Default: 0.0 """ def _get_VDCRef(self) -> BatchFloat64ArrayProxy: @@ -716,10 +761,11 @@ def _set_VDCRef(self, value: Union[float, Float64Array], flags: enums.SetterFlag VDCRef = property(_get_VDCRef, _set_VDCRef) # type: BatchFloat64ArrayProxy """ - Reference DC voltage, Volts. Default is 0. + Reference DC voltage, Volts. Applies to VdcVac control mode, influencing d. - DSS property name: `VDCRef`, DSS property index: 18. + Name: `VDCRef` + Default: 0.0 """ def _get_VSCMode(self) -> BatchInt32ArrayProxy: @@ -734,9 +780,10 @@ def _set_VSCMode(self, value: Union[AnyStr, int, enums.VSConverterControlMode, L VSCMode = property(_get_VSCMode, _set_VSCMode) # type: BatchInt32ArrayProxy """ - Control Mode (Fixed|PacVac|PacQac|VdcVac|VdcQac). Default is Fixed. + Control Mode - DSS property name: `VSCMode`, DSS property index: 19. + Name: `VSCMode` + Default: Fixed """ def _get_VSCMode_str(self) -> List[str]: @@ -747,9 +794,10 @@ def _set_VSCMode_str(self, value: AnyStr, flags: enums.SetterFlags = 0): VSCMode_str = property(_get_VSCMode_str, _set_VSCMode_str) # type: List[str] """ - Control Mode (Fixed|PacVac|PacQac|VdcVac|VdcQac). Default is Fixed. + Control Mode - DSS property name: `VSCMode`, DSS property index: 19. + Name: `VSCMode` + Default: Fixed """ def _get_Spectrum_str(self) -> List[str]: @@ -762,7 +810,8 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set """ Name of harmonic spectrum for this device. - DSS property name: `Spectrum`, DSS property index: 20. + Name: `Spectrum` + Default: default """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -775,7 +824,8 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe """ Name of harmonic spectrum for this device. - DSS property name: `Spectrum`, DSS property index: 20. + Name: `Spectrum` + Default: default """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -788,7 +838,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 21. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -796,14 +847,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(22) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(22, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 22. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -812,7 +864,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 23. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(23, value, flags) diff --git a/altdss/Vsource.py b/altdss/Vsource.py index 9bbc418..b6eb67f 100644 --- a/altdss/Vsource.py +++ b/altdss/Vsource.py @@ -115,9 +115,9 @@ def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): bus1=busname bus1=busname.1.2.3 - The VSOURCE object is a two-terminal voltage source (thevenin equivalent). Bus2 defaults to Bus1 with all phases connected to ground (node 0) unless previously specified. This is a Yg connection. If you want something different, define the Bus2 property explicitly. + The VSOURCE object is a two-terminal voltage source (Thévenin equivalent). Bus2 defaults to Bus1 with all phases connected to ground (node 0) unless previously specified. This is a Yg connection. If you want something different, define the Bus2 property explicitly. - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_BasekV(self) -> float: @@ -128,9 +128,10 @@ def _set_BasekV(self, value: float, flags: enums.SetterFlags = 0): BasekV = property(_get_BasekV, _set_BasekV) # type: float """ - Base Source kV, usually phase-phase (L-L) unless you are making a positive-sequence model or 1-phase modelin which case, it will be phase-neutral (L-N) kV. + Base Source kV, usually phase-phase (L-L) unless you are making a positive-sequence model or 1-phase model in which case, it will be phase-neutral (L-N) kV. - DSS property name: `BasekV`, DSS property index: 2. + Name: `BasekV` + Default: 115.0 """ def _get_pu(self) -> float: @@ -144,7 +145,8 @@ def _set_pu(self, value: float, flags: enums.SetterFlags = 0): Per unit of the base voltage that the source is actually operating at. "pu=1.05" - DSS property name: `pu`, DSS property index: 3. + Name: `pu` + Default: 1.0 """ def _get_Angle(self) -> float: @@ -157,7 +159,8 @@ def _set_Angle(self, value: float, flags: enums.SetterFlags = 0): """ Phase angle in degrees of first phase: e.g.,Angle=10.3 - DSS property name: `Angle`, DSS property index: 4. + Name: `Angle` + Default: 0.0 """ def _get_Frequency(self) -> float: @@ -170,7 +173,8 @@ def _set_Frequency(self, value: float, flags: enums.SetterFlags = 0): """ Source frequency. Defaults to system default base frequency. - DSS property name: `Frequency`, DSS property index: 5. + Name: `Frequency` + Units: Hz """ def _get_Phases(self) -> int: @@ -181,9 +185,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of phases. Defaults to 3. + Number of phases. - DSS property name: `Phases`, DSS property index: 6. + Name: `Phases` + Default: 3 """ def _get_MVASC3(self) -> float: @@ -194,9 +199,11 @@ def _set_MVASC3(self, value: float, flags: enums.SetterFlags = 0): MVASC3 = property(_get_MVASC3, _set_MVASC3) # type: float """ - MVA Short circuit, 3-phase fault. Default = 2000. Z1 is determined by squaring the base kv and dividing by this value. For single-phase source, this value is not used. + MVA Short circuit, 3-phase fault. Z1 is determined by squaring the base kv and dividing by this value. For single-phase source, this value is not used. - DSS property name: `MVASC3`, DSS property index: 7. + Name: `MVASC3` + Units: MVA + Default: 2000.0 """ def _get_MVASC1(self) -> float: @@ -207,9 +214,11 @@ def _set_MVASC1(self, value: float, flags: enums.SetterFlags = 0): MVASC1 = property(_get_MVASC1, _set_MVASC1) # type: float """ - MVA Short Circuit, 1-phase fault. Default = 2100. The "single-phase impedance", Zs, is determined by squaring the base kV and dividing by this value. Then Z0 is determined by Z0 = 3Zs - 2Z1. For 1-phase sources, Zs is used directly. Use X0R0 to define X/R ratio for 1-phase source. + MVA Short Circuit, 1-phase fault. The "single-phase impedance", Zs, is determined by squaring the base kV and dividing by this value. Then Z0 is determined by Z0 = 3Zs - 2Z1. For 1-phase sources, Zs is used directly. Use X0R0 to define X/R ratio for 1-phase source. - DSS property name: `MVASC1`, DSS property index: 8. + Name: `MVASC1` + Units: MVA + Default: 2100.0 """ def _get_X1R1(self) -> float: @@ -220,9 +229,10 @@ def _set_X1R1(self, value: float, flags: enums.SetterFlags = 0): X1R1 = property(_get_X1R1, _set_X1R1) # type: float """ - Positive-sequence X/R ratio. Default = 4. + Positive-sequence X/R ratio. - DSS property name: `X1R1`, DSS property index: 9. + Name: `X1R1` + Default: 4.0 """ def _get_X0R0(self) -> float: @@ -233,9 +243,10 @@ def _set_X0R0(self, value: float, flags: enums.SetterFlags = 0): X0R0 = property(_get_X0R0, _set_X0R0) # type: float """ - Zero-sequence X/R ratio.Default = 3. + Zero-sequence X/R ratio. - DSS property name: `X0R0`, DSS property index: 10. + Name: `X0R0` + Default: 3.0 """ def _get_Isc3(self) -> float: @@ -247,9 +258,10 @@ def _set_Isc3(self, value: float, flags: enums.SetterFlags = 0): Isc3 = property(_get_Isc3, _set_Isc3) # type: float """ Alternate method of defining the source impedance. - 3-phase short circuit current, amps. Default is 10000. + 3-phase short circuit current. - DSS property name: `Isc3`, DSS property index: 11. + Name: `Isc3` + Units: A """ def _get_Isc1(self) -> float: @@ -261,9 +273,10 @@ def _set_Isc1(self, value: float, flags: enums.SetterFlags = 0): Isc1 = property(_get_Isc1, _set_Isc1) # type: float """ Alternate method of defining the source impedance. - single-phase short circuit current, amps. Default is 10500. + single-phase short circuit current. - DSS property name: `Isc1`, DSS property index: 12. + Name: `Isc1` + Units: A """ def _get_R1(self) -> float: @@ -275,9 +288,10 @@ def _set_R1(self, value: float, flags: enums.SetterFlags = 0): R1 = property(_get_R1, _set_R1) # type: float """ Alternate method of defining the source impedance. - Positive-sequence resistance, ohms. Default is 1.65. + Positive-sequence resistance. - DSS property name: `R1`, DSS property index: 13. + Name: `R1` + Units: Ω """ def _get_X1(self) -> float: @@ -289,9 +303,10 @@ def _set_X1(self, value: float, flags: enums.SetterFlags = 0): X1 = property(_get_X1, _set_X1) # type: float """ Alternate method of defining the source impedance. - Positive-sequence reactance, ohms. Default is 6.6. + Positive-sequence reactance. - DSS property name: `X1`, DSS property index: 14. + Name: `X1` + Units: Ω """ def _get_R0(self) -> float: @@ -303,9 +318,10 @@ def _set_R0(self, value: float, flags: enums.SetterFlags = 0): R0 = property(_get_R0, _set_R0) # type: float """ Alternate method of defining the source impedance. - Zero-sequence resistance, ohms. Default is 1.9. + Zero-sequence resistance. - DSS property name: `R0`, DSS property index: 15. + Name: `R0` + Units: Ω """ def _get_X0(self) -> float: @@ -317,9 +333,10 @@ def _set_X0(self, value: float, flags: enums.SetterFlags = 0): X0 = property(_get_X0, _set_X0) # type: float """ Alternate method of defining the source impedance. - Zero-sequence reactance, ohms. Default is 5.7. + Zero-sequence reactance. - DSS property name: `X0`, DSS property index: 16. + Name: `X0` + Units: Ω """ def _get_ScanType(self) -> enums.ScanType: @@ -333,9 +350,10 @@ def _set_ScanType(self, value: Union[AnyStr, int, enums.ScanType], flags: enums. ScanType = property(_get_ScanType, _set_ScanType) # type: enums.ScanType """ - {pos*| zero | none} Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. + Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. - DSS property name: `ScanType`, DSS property index: 17. + Name: `ScanType` + Default: Positive """ def _get_ScanType_str(self) -> str: @@ -346,9 +364,10 @@ def _set_ScanType_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ScanType_str = property(_get_ScanType_str, _set_ScanType_str) # type: str """ - {pos*| zero | none} Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. + Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. - DSS property name: `ScanType`, DSS property index: 17. + Name: `ScanType` + Default: Positive """ def _get_Sequence(self) -> enums.SequenceType: @@ -362,9 +381,10 @@ def _set_Sequence(self, value: Union[AnyStr, int, enums.SequenceType], flags: en Sequence = property(_get_Sequence, _set_Sequence) # type: enums.SequenceType """ - {pos*| neg | zero} Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. Default is positive sequence. + Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. - DSS property name: `Sequence`, DSS property index: 18. + Name: `Sequence` + Default: Positive """ def _get_Sequence_str(self) -> str: @@ -375,9 +395,10 @@ def _set_Sequence_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Sequence_str = property(_get_Sequence_str, _set_Sequence_str) # type: str """ - {pos*| neg | zero} Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. Default is positive sequence. + Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. - DSS property name: `Sequence`, DSS property index: 18. + Name: `Sequence` + Default: Positive """ def _get_Bus2(self) -> str: @@ -394,7 +415,7 @@ def _set_Bus2(self, value: AnyStr, flags: enums.SetterFlags = 0): Default is Bus1.0.0.0 (grounded wye connection) - DSS property name: `Bus2`, DSS property index: 19. + Name: `Bus2` """ def _get_Z2(self) -> complex: @@ -413,7 +434,9 @@ def _set_Z2(self, value: complex, flags: enums.SetterFlags = 0): Note: Z2 defaults to Z1 if it is not specifically defined. If Z2 is not equal to Z1, the impedance matrix is asymmetrical. - DSS property name: `Z2`, DSS property index: 22. + Name: `Z2` + Units: Ω + Default: [1.6037668205527518, 6.415067282211007] """ def _get_puZ1(self) -> complex: @@ -426,7 +449,8 @@ def _set_puZ1(self, value: complex, flags: enums.SetterFlags = 0): """ 2-element array: e.g., [1 2]. An alternate way to specify Z1. See Z1 property. Per-unit positive-sequence impedance on base of Vsource BasekV and BaseMVA. - DSS property name: `puZ1`, DSS property index: 23. + Name: `puZ1` + Default: [0.012126781251816649, 0.048507125007266595] """ def _get_puZ0(self) -> complex: @@ -439,7 +463,8 @@ def _set_puZ0(self, value: complex, flags: enums.SetterFlags = 0): """ 2-element array: e.g., [1 2]. An alternate way to specify Z0. See Z0 property. Per-unit zero-sequence impedance on base of Vsource BasekV and BaseMVA. - DSS property name: `puZ0`, DSS property index: 24. + Name: `puZ0` + Default: [0.013580611191859016, 0.04074183357557704] """ def _get_puZ2(self) -> complex: @@ -452,7 +477,8 @@ def _set_puZ2(self, value: complex, flags: enums.SetterFlags = 0): """ 2-element array: e.g., [1 2]. An alternate way to specify Z2. See Z2 property. Per-unit negative-sequence impedance on base of Vsource BasekV and BaseMVA. - DSS property name: `puZ2`, DSS property index: 25. + Name: `puZ2` + Default: [0.012126781251816649, 0.048507125007266595] """ def _get_BaseMVA(self) -> float: @@ -465,7 +491,8 @@ def _set_BaseMVA(self, value: float, flags: enums.SetterFlags = 0): """ Default value is 100. Base used to convert values specified with puZ1, puZ0, and puZ2 properties to ohms on kV base specified by BasekV property. - DSS property name: `BaseMVA`, DSS property index: 26. + Name: `BaseMVA` + Default: 100.0 """ def _get_Yearly_str(self) -> str: @@ -482,7 +509,7 @@ def _set_Yearly_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Yearly`, DSS property index: 27. + Name: `Yearly` """ def _get_Yearly(self) -> LoadShape: @@ -503,7 +530,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Yearly`, DSS property index: 27. + Name: `Yearly` """ def _get_Daily_str(self) -> str: @@ -520,7 +547,7 @@ def _set_Daily_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Sets Yearly curve if it is not already defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Daily`, DSS property index: 28. + Name: `Daily` """ def _get_Daily(self) -> LoadShape: @@ -541,7 +568,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = Sets Yearly curve if it is not already defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Daily`, DSS property index: 28. + Name: `Daily` """ def _get_Duty_str(self) -> str: @@ -558,7 +585,7 @@ def _set_Duty_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Defaults to Daily load shape when Daily is defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Duty`, DSS property index: 29. + Name: `Duty` """ def _get_Duty(self) -> LoadShape: @@ -579,7 +606,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = Defaults to Daily load shape when Daily is defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Duty`, DSS property index: 29. + Name: `Duty` """ def _get_Model(self) -> enums.VSourceModel: @@ -593,9 +620,10 @@ def _set_Model(self, value: Union[AnyStr, int, enums.VSourceModel], flags: enums Model = property(_get_Model, _set_Model) # type: enums.VSourceModel """ - {Thevenin* | Ideal} Specifies whether the Vsource is to be considered a Thevenin short circuit model or a quasi-ideal voltage source. If Thevenin, the Vsource uses the impedances defined for all calculations. If "Ideal", the model uses a small impedance on the diagonal of the impedance matrix for the fundamental base frequency power flow only. Then switches to actual Thevenin model for other frequencies. + Specifies whether the Vsource is to be considered a Thévenin short circuit model or a quasi-ideal voltage source. If Thévenin, the Vsource uses the impedances defined for all calculations. If "Ideal", the model uses a small impedance on the diagonal of the impedance matrix for the fundamental base frequency power flow only. Then switches to actual Thévenin model for other frequencies. - DSS property name: `Model`, DSS property index: 30. + Name: `Model` + Default: Thevenin """ def _get_Model_str(self) -> str: @@ -606,9 +634,10 @@ def _set_Model_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Model_str = property(_get_Model_str, _set_Model_str) # type: str """ - {Thevenin* | Ideal} Specifies whether the Vsource is to be considered a Thevenin short circuit model or a quasi-ideal voltage source. If Thevenin, the Vsource uses the impedances defined for all calculations. If "Ideal", the model uses a small impedance on the diagonal of the impedance matrix for the fundamental base frequency power flow only. Then switches to actual Thevenin model for other frequencies. + Specifies whether the Vsource is to be considered a Thévenin short circuit model or a quasi-ideal voltage source. If Thévenin, the Vsource uses the impedances defined for all calculations. If "Ideal", the model uses a small impedance on the diagonal of the impedance matrix for the fundamental base frequency power flow only. Then switches to actual Thévenin model for other frequencies. - DSS property name: `Model`, DSS property index: 30. + Name: `Model` + Default: Thevenin """ def _get_puZIdeal(self) -> complex: @@ -621,7 +650,8 @@ def _set_puZIdeal(self, value: complex, flags: enums.SetterFlags = 0): """ 2-element array: e.g., [1 2]. The pu impedance to use for the quasi-ideal voltage source model. Should be a very small impedances. Default is [1e-6, 0.001]. Per-unit impedance on base of Vsource BasekV and BaseMVA. If too small, solution may not work. Be sure to check the voltage values and powers. - DSS property name: `puZIdeal`, DSS property index: 31. + Name: `puZIdeal` + Default: [1e-06, 0.001] """ def _get_Spectrum_str(self) -> str: @@ -632,9 +662,10 @@ def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str """ - Name of harmonic spectrum for this source. Default is "defaultvsource", which is defined when the DSS starts. + Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 32. + Name: `Spectrum` + Default: defaultvsource """ def _get_Spectrum(self) -> SpectrumObj: @@ -649,9 +680,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFl Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj """ - Name of harmonic spectrum for this source. Default is "defaultvsource", which is defined when the DSS starts. + Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 32. + Name: `Spectrum` + Default: defaultvsource """ def _get_BaseFreq(self) -> float: @@ -664,7 +696,8 @@ def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 33. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> bool: @@ -675,9 +708,10 @@ def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): Enabled = property(_get_Enabled, _set_Enabled) # type: bool """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 34. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr): @@ -686,7 +720,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 35. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(35, value) @@ -770,9 +806,9 @@ def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags bus1=busname bus1=busname.1.2.3 - The VSOURCE object is a two-terminal voltage source (thevenin equivalent). Bus2 defaults to Bus1 with all phases connected to ground (node 0) unless previously specified. This is a Yg connection. If you want something different, define the Bus2 property explicitly. + The VSOURCE object is a two-terminal voltage source (Thévenin equivalent). Bus2 defaults to Bus1 with all phases connected to ground (node 0) unless previously specified. This is a Yg connection. If you want something different, define the Bus2 property explicitly. - DSS property name: `Bus1`, DSS property index: 1. + Name: `Bus1` """ def _get_BasekV(self) -> BatchFloat64ArrayProxy: @@ -783,9 +819,10 @@ def _set_BasekV(self, value: Union[float, Float64Array], flags: enums.SetterFlag BasekV = property(_get_BasekV, _set_BasekV) # type: BatchFloat64ArrayProxy """ - Base Source kV, usually phase-phase (L-L) unless you are making a positive-sequence model or 1-phase modelin which case, it will be phase-neutral (L-N) kV. + Base Source kV, usually phase-phase (L-L) unless you are making a positive-sequence model or 1-phase model in which case, it will be phase-neutral (L-N) kV. - DSS property name: `BasekV`, DSS property index: 2. + Name: `BasekV` + Default: 115.0 """ def _get_pu(self) -> BatchFloat64ArrayProxy: @@ -799,7 +836,8 @@ def _set_pu(self, value: Union[float, Float64Array], flags: enums.SetterFlags = Per unit of the base voltage that the source is actually operating at. "pu=1.05" - DSS property name: `pu`, DSS property index: 3. + Name: `pu` + Default: 1.0 """ def _get_Angle(self) -> BatchFloat64ArrayProxy: @@ -812,7 +850,8 @@ def _set_Angle(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Phase angle in degrees of first phase: e.g.,Angle=10.3 - DSS property name: `Angle`, DSS property index: 4. + Name: `Angle` + Default: 0.0 """ def _get_Frequency(self) -> BatchFloat64ArrayProxy: @@ -825,7 +864,8 @@ def _set_Frequency(self, value: Union[float, Float64Array], flags: enums.SetterF """ Source frequency. Defaults to system default base frequency. - DSS property name: `Frequency`, DSS property index: 5. + Name: `Frequency` + Units: Hz """ def _get_Phases(self) -> BatchInt32ArrayProxy: @@ -836,9 +876,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of phases. Defaults to 3. + Number of phases. - DSS property name: `Phases`, DSS property index: 6. + Name: `Phases` + Default: 3 """ def _get_MVASC3(self) -> BatchFloat64ArrayProxy: @@ -849,9 +890,11 @@ def _set_MVASC3(self, value: Union[float, Float64Array], flags: enums.SetterFlag MVASC3 = property(_get_MVASC3, _set_MVASC3) # type: BatchFloat64ArrayProxy """ - MVA Short circuit, 3-phase fault. Default = 2000. Z1 is determined by squaring the base kv and dividing by this value. For single-phase source, this value is not used. + MVA Short circuit, 3-phase fault. Z1 is determined by squaring the base kv and dividing by this value. For single-phase source, this value is not used. - DSS property name: `MVASC3`, DSS property index: 7. + Name: `MVASC3` + Units: MVA + Default: 2000.0 """ def _get_MVASC1(self) -> BatchFloat64ArrayProxy: @@ -862,9 +905,11 @@ def _set_MVASC1(self, value: Union[float, Float64Array], flags: enums.SetterFlag MVASC1 = property(_get_MVASC1, _set_MVASC1) # type: BatchFloat64ArrayProxy """ - MVA Short Circuit, 1-phase fault. Default = 2100. The "single-phase impedance", Zs, is determined by squaring the base kV and dividing by this value. Then Z0 is determined by Z0 = 3Zs - 2Z1. For 1-phase sources, Zs is used directly. Use X0R0 to define X/R ratio for 1-phase source. + MVA Short Circuit, 1-phase fault. The "single-phase impedance", Zs, is determined by squaring the base kV and dividing by this value. Then Z0 is determined by Z0 = 3Zs - 2Z1. For 1-phase sources, Zs is used directly. Use X0R0 to define X/R ratio for 1-phase source. - DSS property name: `MVASC1`, DSS property index: 8. + Name: `MVASC1` + Units: MVA + Default: 2100.0 """ def _get_X1R1(self) -> BatchFloat64ArrayProxy: @@ -875,9 +920,10 @@ def _set_X1R1(self, value: Union[float, Float64Array], flags: enums.SetterFlags X1R1 = property(_get_X1R1, _set_X1R1) # type: BatchFloat64ArrayProxy """ - Positive-sequence X/R ratio. Default = 4. + Positive-sequence X/R ratio. - DSS property name: `X1R1`, DSS property index: 9. + Name: `X1R1` + Default: 4.0 """ def _get_X0R0(self) -> BatchFloat64ArrayProxy: @@ -888,9 +934,10 @@ def _set_X0R0(self, value: Union[float, Float64Array], flags: enums.SetterFlags X0R0 = property(_get_X0R0, _set_X0R0) # type: BatchFloat64ArrayProxy """ - Zero-sequence X/R ratio.Default = 3. + Zero-sequence X/R ratio. - DSS property name: `X0R0`, DSS property index: 10. + Name: `X0R0` + Default: 3.0 """ def _get_Isc3(self) -> BatchFloat64ArrayProxy: @@ -902,9 +949,10 @@ def _set_Isc3(self, value: Union[float, Float64Array], flags: enums.SetterFlags Isc3 = property(_get_Isc3, _set_Isc3) # type: BatchFloat64ArrayProxy """ Alternate method of defining the source impedance. - 3-phase short circuit current, amps. Default is 10000. + 3-phase short circuit current. - DSS property name: `Isc3`, DSS property index: 11. + Name: `Isc3` + Units: A """ def _get_Isc1(self) -> BatchFloat64ArrayProxy: @@ -916,9 +964,10 @@ def _set_Isc1(self, value: Union[float, Float64Array], flags: enums.SetterFlags Isc1 = property(_get_Isc1, _set_Isc1) # type: BatchFloat64ArrayProxy """ Alternate method of defining the source impedance. - single-phase short circuit current, amps. Default is 10500. + single-phase short circuit current. - DSS property name: `Isc1`, DSS property index: 12. + Name: `Isc1` + Units: A """ def _get_R1(self) -> BatchFloat64ArrayProxy: @@ -930,9 +979,10 @@ def _set_R1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = R1 = property(_get_R1, _set_R1) # type: BatchFloat64ArrayProxy """ Alternate method of defining the source impedance. - Positive-sequence resistance, ohms. Default is 1.65. + Positive-sequence resistance. - DSS property name: `R1`, DSS property index: 13. + Name: `R1` + Units: Ω """ def _get_X1(self) -> BatchFloat64ArrayProxy: @@ -944,9 +994,10 @@ def _set_X1(self, value: Union[float, Float64Array], flags: enums.SetterFlags = X1 = property(_get_X1, _set_X1) # type: BatchFloat64ArrayProxy """ Alternate method of defining the source impedance. - Positive-sequence reactance, ohms. Default is 6.6. + Positive-sequence reactance. - DSS property name: `X1`, DSS property index: 14. + Name: `X1` + Units: Ω """ def _get_R0(self) -> BatchFloat64ArrayProxy: @@ -958,9 +1009,10 @@ def _set_R0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = R0 = property(_get_R0, _set_R0) # type: BatchFloat64ArrayProxy """ Alternate method of defining the source impedance. - Zero-sequence resistance, ohms. Default is 1.9. + Zero-sequence resistance. - DSS property name: `R0`, DSS property index: 15. + Name: `R0` + Units: Ω """ def _get_X0(self) -> BatchFloat64ArrayProxy: @@ -972,9 +1024,10 @@ def _set_X0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = X0 = property(_get_X0, _set_X0) # type: BatchFloat64ArrayProxy """ Alternate method of defining the source impedance. - Zero-sequence reactance, ohms. Default is 5.7. + Zero-sequence reactance. - DSS property name: `X0`, DSS property index: 16. + Name: `X0` + Units: Ω """ def _get_ScanType(self) -> BatchInt32ArrayProxy: @@ -989,9 +1042,10 @@ def _set_ScanType(self, value: Union[AnyStr, int, enums.ScanType, List[AnyStr], ScanType = property(_get_ScanType, _set_ScanType) # type: BatchInt32ArrayProxy """ - {pos*| zero | none} Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. + Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. - DSS property name: `ScanType`, DSS property index: 17. + Name: `ScanType` + Default: Positive """ def _get_ScanType_str(self) -> List[str]: @@ -1002,9 +1056,10 @@ def _set_ScanType_str(self, value: AnyStr, flags: enums.SetterFlags = 0): ScanType_str = property(_get_ScanType_str, _set_ScanType_str) # type: List[str] """ - {pos*| zero | none} Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. + Maintain specified sequence for harmonic solution. Default is positive sequence. Otherwise, angle between phases rotates with harmonic. - DSS property name: `ScanType`, DSS property index: 17. + Name: `ScanType` + Default: Positive """ def _get_Sequence(self) -> BatchInt32ArrayProxy: @@ -1019,9 +1074,10 @@ def _set_Sequence(self, value: Union[AnyStr, int, enums.SequenceType, List[AnySt Sequence = property(_get_Sequence, _set_Sequence) # type: BatchInt32ArrayProxy """ - {pos*| neg | zero} Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. Default is positive sequence. + Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. - DSS property name: `Sequence`, DSS property index: 18. + Name: `Sequence` + Default: Positive """ def _get_Sequence_str(self) -> List[str]: @@ -1032,9 +1088,10 @@ def _set_Sequence_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Sequence_str = property(_get_Sequence_str, _set_Sequence_str) # type: List[str] """ - {pos*| neg | zero} Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. Default is positive sequence. + Set the phase angles for the specified symmetrical component sequence for non-harmonic solution modes. - DSS property name: `Sequence`, DSS property index: 18. + Name: `Sequence` + Default: Positive """ def _get_Bus2(self) -> List[str]: @@ -1051,7 +1108,7 @@ def _set_Bus2(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags Default is Bus1.0.0.0 (grounded wye connection) - DSS property name: `Bus2`, DSS property index: 19. + Name: `Bus2` """ def _get_Z2(self) -> List[complex]: @@ -1091,7 +1148,9 @@ def _set_Z2(self, value: Union[complex, List[complex]], flags: enums.SetterFlags Note: Z2 defaults to Z1 if it is not specifically defined. If Z2 is not equal to Z1, the impedance matrix is asymmetrical. - DSS property name: `Z2`, DSS property index: 22. + Name: `Z2` + Units: Ω + Default: [1.6037668205527518, 6.415067282211007] """ def _get_puZ1(self) -> List[complex]: @@ -1125,7 +1184,8 @@ def _set_puZ1(self, value: Union[complex, List[complex]], flags: enums.SetterFla """ 2-element array: e.g., [1 2]. An alternate way to specify Z1. See Z1 property. Per-unit positive-sequence impedance on base of Vsource BasekV and BaseMVA. - DSS property name: `puZ1`, DSS property index: 23. + Name: `puZ1` + Default: [0.012126781251816649, 0.048507125007266595] """ def _get_puZ0(self) -> List[complex]: @@ -1159,7 +1219,8 @@ def _set_puZ0(self, value: Union[complex, List[complex]], flags: enums.SetterFla """ 2-element array: e.g., [1 2]. An alternate way to specify Z0. See Z0 property. Per-unit zero-sequence impedance on base of Vsource BasekV and BaseMVA. - DSS property name: `puZ0`, DSS property index: 24. + Name: `puZ0` + Default: [0.013580611191859016, 0.04074183357557704] """ def _get_puZ2(self) -> List[complex]: @@ -1193,7 +1254,8 @@ def _set_puZ2(self, value: Union[complex, List[complex]], flags: enums.SetterFla """ 2-element array: e.g., [1 2]. An alternate way to specify Z2. See Z2 property. Per-unit negative-sequence impedance on base of Vsource BasekV and BaseMVA. - DSS property name: `puZ2`, DSS property index: 25. + Name: `puZ2` + Default: [0.012126781251816649, 0.048507125007266595] """ def _get_BaseMVA(self) -> BatchFloat64ArrayProxy: @@ -1206,7 +1268,8 @@ def _set_BaseMVA(self, value: Union[float, Float64Array], flags: enums.SetterFla """ Default value is 100. Base used to convert values specified with puZ1, puZ0, and puZ2 properties to ohms on kV base specified by BasekV property. - DSS property name: `BaseMVA`, DSS property index: 26. + Name: `BaseMVA` + Default: 100.0 """ def _get_Yearly_str(self) -> List[str]: @@ -1223,7 +1286,7 @@ def _set_Yearly_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Sette Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Yearly`, DSS property index: 27. + Name: `Yearly` """ def _get_Yearly(self) -> List[LoadShape]: @@ -1240,7 +1303,7 @@ def _set_Yearly(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadSha Is set to the Daily load shape when Daily is defined. The daily load shape is repeated in this case. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Yearly`, DSS property index: 27. + Name: `Yearly` """ def _get_Daily_str(self) -> List[str]: @@ -1257,7 +1320,7 @@ def _set_Daily_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Setter Sets Yearly curve if it is not already defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Daily`, DSS property index: 28. + Name: `Daily` """ def _get_Daily(self) -> List[LoadShape]: @@ -1274,7 +1337,7 @@ def _set_Daily(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShap Sets Yearly curve if it is not already defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Daily`, DSS property index: 28. + Name: `Daily` """ def _get_Duty_str(self) -> List[str]: @@ -1291,7 +1354,7 @@ def _set_Duty_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterF Defaults to Daily load shape when Daily is defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Duty`, DSS property index: 29. + Name: `Duty` """ def _get_Duty(self) -> List[LoadShape]: @@ -1308,7 +1371,7 @@ def _set_Duty(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape Defaults to Daily load shape when Daily is defined. Set to NONE to reset to no loadshape for Yearly mode. The default is no variation. - DSS property name: `Duty`, DSS property index: 29. + Name: `Duty` """ def _get_Model(self) -> BatchInt32ArrayProxy: @@ -1323,9 +1386,10 @@ def _set_Model(self, value: Union[AnyStr, int, enums.VSourceModel, List[AnyStr], Model = property(_get_Model, _set_Model) # type: BatchInt32ArrayProxy """ - {Thevenin* | Ideal} Specifies whether the Vsource is to be considered a Thevenin short circuit model or a quasi-ideal voltage source. If Thevenin, the Vsource uses the impedances defined for all calculations. If "Ideal", the model uses a small impedance on the diagonal of the impedance matrix for the fundamental base frequency power flow only. Then switches to actual Thevenin model for other frequencies. + Specifies whether the Vsource is to be considered a Thévenin short circuit model or a quasi-ideal voltage source. If Thévenin, the Vsource uses the impedances defined for all calculations. If "Ideal", the model uses a small impedance on the diagonal of the impedance matrix for the fundamental base frequency power flow only. Then switches to actual Thévenin model for other frequencies. - DSS property name: `Model`, DSS property index: 30. + Name: `Model` + Default: Thevenin """ def _get_Model_str(self) -> List[str]: @@ -1336,9 +1400,10 @@ def _set_Model_str(self, value: AnyStr, flags: enums.SetterFlags = 0): Model_str = property(_get_Model_str, _set_Model_str) # type: List[str] """ - {Thevenin* | Ideal} Specifies whether the Vsource is to be considered a Thevenin short circuit model or a quasi-ideal voltage source. If Thevenin, the Vsource uses the impedances defined for all calculations. If "Ideal", the model uses a small impedance on the diagonal of the impedance matrix for the fundamental base frequency power flow only. Then switches to actual Thevenin model for other frequencies. + Specifies whether the Vsource is to be considered a Thévenin short circuit model or a quasi-ideal voltage source. If Thévenin, the Vsource uses the impedances defined for all calculations. If "Ideal", the model uses a small impedance on the diagonal of the impedance matrix for the fundamental base frequency power flow only. Then switches to actual Thévenin model for other frequencies. - DSS property name: `Model`, DSS property index: 30. + Name: `Model` + Default: Thevenin """ def _get_puZIdeal(self) -> List[complex]: @@ -1372,7 +1437,8 @@ def _set_puZIdeal(self, value: Union[complex, List[complex]], flags: enums.Sette """ 2-element array: e.g., [1 2]. The pu impedance to use for the quasi-ideal voltage source model. Should be a very small impedances. Default is [1e-6, 0.001]. Per-unit impedance on base of Vsource BasekV and BaseMVA. If too small, solution may not work. Be sure to check the voltage values and powers. - DSS property name: `puZIdeal`, DSS property index: 31. + Name: `puZIdeal` + Default: [1e-06, 0.001] """ def _get_Spectrum_str(self) -> List[str]: @@ -1383,9 +1449,10 @@ def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.Set Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] """ - Name of harmonic spectrum for this source. Default is "defaultvsource", which is defined when the DSS starts. + Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 32. + Name: `Spectrum` + Default: defaultvsource """ def _get_Spectrum(self) -> List[SpectrumObj]: @@ -1396,9 +1463,10 @@ def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[Spe Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] """ - Name of harmonic spectrum for this source. Default is "defaultvsource", which is defined when the DSS starts. + Name of harmonic spectrum for this source. - DSS property name: `Spectrum`, DSS property index: 32. + Name: `Spectrum` + Default: defaultvsource """ def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: @@ -1411,7 +1479,8 @@ def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Base Frequency for ratings. - DSS property name: `BaseFreq`, DSS property index: 33. + Name: `BaseFreq` + Units: Hz """ def _get_Enabled(self) -> List[bool]: @@ -1419,14 +1488,15 @@ def _get_Enabled(self) -> List[bool]: self._get_batch_int32_prop(34) ] - def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): self._set_batch_int32_array(34, value, flags) Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] """ - {Yes|No or True|False} Indicates whether this element is enabled. + Indicates whether this element is enabled. - DSS property name: `Enabled`, DSS property index: 34. + Name: `Enabled` + Default: True """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1435,7 +1505,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 35. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(35, value, flags) diff --git a/altdss/WindGen.py b/altdss/WindGen.py new file mode 100644 index 0000000..8a5bca3 --- /dev/null +++ b/altdss/WindGen.py @@ -0,0 +1,1938 @@ +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors +from __future__ import annotations +from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING +from typing_extensions import TypedDict, Unpack +from .types import Float64Array, Int32Array +from . import enums +from .DSSObj import IDSSObj, DSSObj +from .Batch import DSSBatch +from .ArrayProxy import BatchFloat64ArrayProxy, BatchInt32ArrayProxy +from .common import LIST_LIKE +from .PCElement import PCElementBatchMixin, PCElementMixin +from .CircuitElement import CircuitElementBatchMixin, CircuitElementMixin +from .DynamicExp import DynamicExp +from .LoadShape import LoadShape +from .Spectrum import Spectrum as SpectrumObj +from .XYcurve import XYcurve + +class WindGen(DSSObj, CircuitElementMixin, PCElementMixin): + __slots__ = DSSObj._extra_slots + CircuitElementMixin._extra_slots + PCElementMixin._extra_slots + _cls_name = 'WindGen' + _cls_idx = 28 + _cls_int_idx = { + 1, + 6, + 10, + 12, + 13, + 27, + 28, + 29, + 30, + 32, + 45, + } + _cls_float_idx = { + 3, + 4, + 5, + 11, + 14, + 15, + 16, + 17, + 18, + 21, + 22, + 23, + 24, + 25, + 26, + 31, + 34, + 35, + 36, + 37, + 38, + 40, + 41, + 42, + 44, + } + _cls_prop_idx = { + 'phases': 1, + 'bus1': 2, + 'kv': 3, + 'kw': 4, + 'pf': 5, + 'model': 6, + 'yearly': 7, + 'daily': 8, + 'duty': 9, + 'conn': 10, + 'kvar': 11, + 'cls': 12, + 'class': 12, + 'debugtrace': 13, + 'vminpu': 14, + 'vmaxpu': 15, + 'kva': 16, + 'mva': 17, + 'dutystart': 18, + 'dynamiceq': 19, + 'dynout': 20, + 'rthev': 21, + 'xthev': 22, + 'vss': 23, + 'pss': 24, + 'qss': 25, + 'vwind': 26, + 'qmode': 27, + 'simmechflg': 28, + 'apcflg': 29, + 'qflg': 30, + 'delt0': 31, + 'n_wtg': 32, + 'vv_curve': 33, + 'ag': 34, + 'cp': 35, + 'lamda': 36, + 'p': 37, + 'pd': 38, + 'ploss': 39, + 'rad': 40, + 'vcutin': 41, + 'vcutout': 42, + 'spectrum': 43, + 'basefreq': 44, + 'enabled': 45, + 'like': 46, + } + + def __init__(self, api_util, ptr): + DSSObj.__init__(self, api_util, ptr) + CircuitElementMixin.__init__(self) + PCElementMixin.__init__(self) + + def edit(self, **kwargs: Unpack[WindGenProperties]) -> WindGen: + """ + Edit this WindGen. + + 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. + + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the object. + :return: Returns itself to allow call chaining. + """ + + self._edit(props=kwargs) + return self + + + def _get_Phases(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 1) + + def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 1, value, flags) + + Phases = property(_get_Phases, _set_Phases) # type: int + """ + Number of phases for this WindGen. Power is evenly divided among phases. + + Name: `Phases` + Default: 3 + """ + + def _get_Bus1(self) -> str: + return self._get_prop_string(2) + + def _set_Bus1(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(2, value, flags) + + Bus1 = property(_get_Bus1, _set_Bus1) # type: str + """ + Bus to which the WindGen is connected. May include specific node specification. + + Name: `Bus1` + """ + + def _get_kV(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 3) + + def _set_kV(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 3, value, flags) + + kV = property(_get_kV, _set_kV) # type: float + """ + Nominal rated (1.0 per unit) voltage, kV, for WindGen. For 2- and 3-phase WindGens, specify phase-phase kV. + Otherwise, for phases=1 or phases>3, specify actual kV across each branch of the WindGen. + If wye (star), specify phase-neutral kV. + If delta or phase-phase connected, specify phase-phase kV. + + Name: `kV` + Units: kV + Default: 12.47 + """ + + def _get_kW(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 4) + + def _set_kW(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 4, value, flags) + + kW = property(_get_kW, _set_kW) # type: float + """ + Total base kW for the WindGen. + A positive value denotes power coming OUT of the element, which is the opposite of a load. This value is modified depending on the dispatch mode. + Unaffected by the global load multiplier and growth curves. + If you want there to be more generation, you must add more WindGens or change this value. + + Name: `kW` + Units: kW + Default: 1000.0 + """ + + def _get_PF(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 5) + + def _set_PF(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 5, value, flags) + + PF = property(_get_PF, _set_PF) # type: float + """ + WindGen power factor. Enter negative for leading powerfactor (when kW and kvar have opposite signs.) + A positive power factor for a WindGen signifies that the WindGen produces vars as is typical for a synchronous WindGen. + Induction machines would be generally specified with a negative power factor. + + Name: `PF` + Default: 0.88 + """ + + def _get_Model(self) -> enums.WindGenModel: + return enums.WindGenModel(self._lib.Obj_GetInt32(self._ptr, 6)) + + def _set_Model(self, value: Union[int, enums.WindGenModel], flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 6, value, flags) + + Model = property(_get_Model, _set_Model) # type: enums.WindGenModel + """ + Integer code for the model to use for generation variation with voltage. + Valid values are (**NOTE:** this is under review): + 1:WindGen injects a constant kW at specified power factor. + 2:WindGen is modeled as a constant admittance. + 4:Const kW, Fixed Q (Q never varies) + 5:Const kW, Fixed Q (as a constant reactance) + + Name: `Model` + Default: 1 + """ + + def _get_Yearly_str(self) -> str: + return self._get_prop_string(7) + + def _set_Yearly_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(7, value, flags) + + Yearly_str = property(_get_Yearly_str, _set_Yearly_str) # type: str + """ + Wind speed shape to use for yearly-mode simulations. Must be previously defined as a LoadShape object. + If this is not specified, a constant value is assumed (no variation). + Set to NONE to reset to no LoadShape. + Nominally for 8760 simulations. If there are fewer points in the designated shape than the number of points in the solution, the curve is repeated. + + Name: `Yearly` + """ + + def _get_Yearly(self) -> LoadShape: + return self._get_obj(7, LoadShape) + + def _set_Yearly(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = 0): + if isinstance(value, DSSObj) or value is None: + self._set_obj(7, value, flags) + return + + self._set_string_o(7, value, flags) + + Yearly = property(_get_Yearly, _set_Yearly) # type: LoadShape + """ + Wind speed shape to use for yearly-mode simulations. Must be previously defined as a LoadShape object. + If this is not specified, a constant value is assumed (no variation). + Set to NONE to reset to no LoadShape. + Nominally for 8760 simulations. If there are fewer points in the designated shape than the number of points in the solution, the curve is repeated. + + Name: `Yearly` + """ + + def _get_Daily_str(self) -> str: + return self._get_prop_string(8) + + def _set_Daily_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(8, value, flags) + + Daily_str = property(_get_Daily_str, _set_Daily_str) # type: str + """ + Wind speed shape to use for daily-mode simulations. Must be previously defined as a LoadShape object of 24 hrs, typically. + Set to NONE to reset to no LoadShape. + + Name: `Daily` + """ + + def _get_Daily(self) -> LoadShape: + return self._get_obj(8, LoadShape) + + def _set_Daily(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = 0): + if isinstance(value, DSSObj) or value is None: + self._set_obj(8, value, flags) + return + + self._set_string_o(8, value, flags) + + Daily = property(_get_Daily, _set_Daily) # type: LoadShape + """ + Wind speed shape to use for daily-mode simulations. Must be previously defined as a LoadShape object of 24 hrs, typically. + Set to NONE to reset to no LoadShape. + + Name: `Daily` + """ + + def _get_Duty_str(self) -> str: + return self._get_prop_string(9) + + def _set_Duty_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(9, value, flags) + + Duty_str = property(_get_Duty_str, _set_Duty_str) # type: str + """ + Load shape to use for duty cycle dispatch simulations such as for wind or solar generation. + Must be previously defined as a LoadShape object. + Typically would have time intervals less than 1 hr -- perhaps, in seconds. + Set to NONE to reset to no LoadShape. + 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. + + Name: `Duty` + """ + + def _get_Duty(self) -> LoadShape: + return self._get_obj(9, LoadShape) + + def _set_Duty(self, value: Union[AnyStr, LoadShape], flags: enums.SetterFlags = 0): + if isinstance(value, DSSObj) or value is None: + self._set_obj(9, value, flags) + return + + self._set_string_o(9, value, flags) + + Duty = property(_get_Duty, _set_Duty) # type: LoadShape + """ + Load shape to use for duty cycle dispatch simulations such as for wind or solar generation. + Must be previously defined as a LoadShape object. + Typically would have time intervals less than 1 hr -- perhaps, in seconds. + Set to NONE to reset to no LoadShape. + 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. + + Name: `Duty` + """ + + def _get_Conn(self) -> enums.Connection: + return enums.Connection(self._lib.Obj_GetInt32(self._ptr, 10)) + + def _set_Conn(self, value: Union[AnyStr, int, enums.Connection], flags: enums.SetterFlags = 0): + if not isinstance(value, int): + self._set_string_o(10, value, flags) + return + self._lib.Obj_SetInt32(self._ptr, 10, value, flags) + + Conn = property(_get_Conn, _set_Conn) # type: enums.Connection + """ + ={wye|LN|delta|LL}. Default is wye. + + Name: `Conn` + Default: Wye + """ + + def _get_Conn_str(self) -> str: + return self._get_prop_string(10) + + def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_Conn(value, flags) + + Conn_str = property(_get_Conn_str, _set_Conn_str) # type: str + """ + ={wye|LN|delta|LL}. Default is wye. + + Name: `Conn` + Default: Wye + """ + + def _get_kvar(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 11) + + def _set_kvar(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 11, value, flags) + + kvar = property(_get_kvar, _set_kvar) # type: float + """ + Specify the base kvar. Alternative to specifying the power factor. + Side effect: the power factor value is altered to agree based on present value of kW. + + Name: `kvar` + Units: kvar + """ + + def _get_Class(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 12) + + def _set_Class(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 12, value, flags) + + Class = property(_get_Class, _set_Class) # type: int + """ + An arbitrary integer number representing the class of WindGen so that WindGen values may be segregated by class. + + Name: `Class` + Default: 1 + """ + + def _get_DebugTrace(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 13) != 0 + + def _set_DebugTrace(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 13, value, flags) + + DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: bool + """ + Turn this on to capture the progress of the WindGen model for each iteration. + Creates a separate file for each WindGen named "WINDGEN_name.CSV". + + Name: `DebugTrace` + Default: False + """ + + def _get_Vminpu(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 14) + + def _set_Vminpu(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 14, value, flags) + + Vminpu = property(_get_Vminpu, _set_Vminpu) # type: float + """ + Minimum per unit voltage for which the Model is assumed to apply. Below this value, the WindGen model reverts to a constant impedance model. For model 7, the current is limited to the value computed for constant power at VMinPU. + + Name: `Vminpu` + Default: 0.9 + """ + + def _get_Vmaxpu(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 15) + + def _set_Vmaxpu(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 15, value, flags) + + Vmaxpu = property(_get_Vmaxpu, _set_Vmaxpu) # type: float + """ + Maximum per unit voltage for which the Model is assumed to apply. + Above this value, the WindGen model reverts to a constant impedance model. + + Name: `Vmaxpu` + Default: 1.1 + """ + + def _get_kVA(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 16) + + def _set_kVA(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 16, value, flags) + + kVA = property(_get_kVA, _set_kVA) # type: float + """ + kVA rating of electrical machine. Defaults to 1.2 times "kW" if not specified. Applied to machine or inverter definition for Dynamics mode solutions. + + Name: `kVA` + Units: kVA + """ + + def _get_MVA(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 17) + + def _set_MVA(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 17, value, flags) + + MVA = property(_get_MVA, _set_MVA) # type: float + """ + MVA rating of electrical machine. Alternative to using the "kVA" property. + + Name: `MVA` + Units: MVA + """ + + def _get_DutyStart(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 18) + + def _set_DutyStart(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 18, value, flags) + + DutyStart = property(_get_DutyStart, _set_DutyStart) # type: float + """ + Starting time offset [hours] into the duty cycle shape for this WindGen. + + Name: `DutyStart` + Units: hour + Default: 0.0 + """ + + def _get_DynamicEq_str(self) -> str: + return self._get_prop_string(19) + + def _set_DynamicEq_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(19, value, flags) + + DynamicEq_str = property(_get_DynamicEq_str, _set_DynamicEq_str) # type: str + """ + The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. + if not defined, the generator dynamics will follow the built-in dynamic equation. + + Name: `DynamicEq` + """ + + def _get_DynamicEq(self) -> DynamicExp: + return self._get_obj(19, DynamicExp) + + def _set_DynamicEq(self, value: Union[AnyStr, DynamicExp], flags: enums.SetterFlags = 0): + if isinstance(value, DSSObj) or value is None: + self._set_obj(19, value, flags) + return + + self._set_string_o(19, value, flags) + + DynamicEq = property(_get_DynamicEq, _set_DynamicEq) # type: DynamicExp + """ + The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. + if not defined, the generator dynamics will follow the built-in dynamic equation. + + Name: `DynamicEq` + """ + + def _get_DynOut(self) -> List[str]: + return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 20) + + def _set_DynOut(self, value: List[AnyStr], flags: enums.SetterFlags = 0): + value, value_ptr, value_count = self._prepare_string_array(value) + self._lib.Obj_SetStringArray(self._ptr, 20, value_ptr, value_count, flags) + self._check_for_error() + + DynOut = property(_get_DynOut, _set_DynOut) # type: List[str] + """ + The name of the variables within the Dynamic equation that will be used to govern the generator dynamics. + This generator model requires 2 outputs from the dynamic equation: + 1. Shaft speed (velocity) relative to synchronous speed. + 2. Shaft, or power, angle (relative to synchronous reference frame). + The output variables need to be defined in the same order. + + Name: `DynOut` + """ + + def _get_RThev(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 21) + + def _set_RThev(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 21, value, flags) + + RThev = property(_get_RThev, _set_RThev) # type: float + """ + Per unit Thévenin equivalent R. + + Name: `RThev` + Default: 0.0 + """ + + def _get_XThev(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 22) + + def _set_XThev(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 22, value, flags) + + XThev = property(_get_XThev, _set_XThev) # type: float + """ + Per unit Thévenin equivalent X. + + Name: `XThev` + Default: 0.05 + """ + + def _get_VSS(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 23) + + def _set_VSS(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 23, value, flags) + + VSS = property(_get_VSS, _set_VSS) # type: float + """ + Steady state voltage magnitude. + + Name: `VSS` + Units: pu (voltage) + Default: 1.0 + """ + + def _get_PSS(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 24) + + def _set_PSS(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 24, value, flags) + + PSS = property(_get_PSS, _set_PSS) # type: float + """ + Steady state output real power. + + Name: `PSS` + Default: 1.0 + """ + + def _get_QSS(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 25) + + def _set_QSS(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 25, value, flags) + + QSS = property(_get_QSS, _set_QSS) # type: float + """ + Steady state output reactive power. + + Name: `QSS` + Default: 0.0 + """ + + def _get_VWind(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 26) + + def _set_VWind(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 26, value, flags) + + VWind = property(_get_VWind, _set_VWind) # type: float + """ + Wind speed in m/s + + Name: `VWind` + Default: 12.0 + """ + + def _get_QMode(self) -> enums.WindGenQMode: + return enums.WindGenQMode(self._lib.Obj_GetInt32(self._ptr, 27)) + + def _set_QMode(self, value: Union[int, enums.WindGenQMode], flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 27, value, flags) + + QMode = property(_get_QMode, _set_QMode) # type: enums.WindGenQMode + """ + Q control mode (0:Q, 1:PF, 2:VV). + + Name: `QMode` + Default: 0 + """ + + def _get_SimMechFlg(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 28) + + def _set_SimMechFlg(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 28, value, flags) + + SimMechFlg = property(_get_SimMechFlg, _set_SimMechFlg) # type: int + """ + 1 to simulate mechanical system. Otherwise (0) only uses the electrical system. For dynamics simulation purposes. + + Name: `SimMechFlg` + Default: 1 + """ + + def _get_APCFlg(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 29) + + def _set_APCFlg(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 29, value, flags) + + APCFlg = property(_get_APCFlg, _set_APCFlg) # type: int + """ + 1 to enable active power control. + + Name: `APCFlg` + Default: 0 + """ + + def _get_QFlg(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 30) + + def _set_QFlg(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 30, value, flags) + + QFlg = property(_get_QFlg, _set_QFlg) # type: int + """ + 1 to enable reactive power and voltage control. + + Name: `QFlg` + Default: 1 + """ + + def _get_delt0(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 31) + + def _set_delt0(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 31, value, flags) + + delt0 = property(_get_delt0, _set_delt0) # type: float + """ + User defined internal simulation step. + + Name: `delt0` + Default: 5e-05 + """ + + def _get_N_WTG(self) -> int: + return self._lib.Obj_GetInt32(self._ptr, 32) + + def _set_N_WTG(self, value: int, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 32, value, flags) + + N_WTG = property(_get_N_WTG, _set_N_WTG) # type: int + """ + Number of WTG in aggregation. + + Name: `N_WTG` + Default: 1 + """ + + def _get_VV_Curve_str(self) -> str: + return self._get_prop_string(33) + + def _set_VV_Curve_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(33, value, flags) + + VV_Curve_str = property(_get_VV_Curve_str, _set_VV_Curve_str) # type: str + """ + Name of the XY curve defining the control curve for implementing volt-var (VV) control with this inverter. + + Name: `VV_Curve` + """ + + def _get_VV_Curve(self) -> XYcurve: + return self._get_obj(33, XYcurve) + + def _set_VV_Curve(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags = 0): + if isinstance(value, DSSObj) or value is None: + self._set_obj(33, value, flags) + return + + self._set_string_o(33, value, flags) + + VV_Curve = property(_get_VV_Curve, _set_VV_Curve) # type: XYcurve + """ + Name of the XY curve defining the control curve for implementing volt-var (VV) control with this inverter. + + Name: `VV_Curve` + """ + + def _get_Ag(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 34) + + def _set_Ag(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 34, value, flags) + + Ag = property(_get_Ag, _set_Ag) # type: float + """ + Gearbox ratio. + + Name: `Ag` + Default: 0.011111111111111112 + """ + + def _get_Cp(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 35) + + def _set_Cp(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 35, value, flags) + + Cp = property(_get_Cp, _set_Cp) # type: float + """ + Turbine performance coefficient. + + Name: `Cp` + Default: 0.41 + """ + + def _get_Lamda(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 36) + + def _set_Lamda(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 36, value, flags) + + Lamda = property(_get_Lamda, _set_Lamda) # type: float + """ + Tip speed ratio. + + Name: `Lamda` + Default: 7.95 + """ + + def _get_P(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 37) + + def _set_P(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 37, value, flags) + + P = property(_get_P, _set_P) # type: float + """ + Number of pole pairs of the induction generator. + + Name: `P` + Default: 2.0 + """ + + def _get_pd(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 38) + + def _set_pd(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 38, value, flags) + + pd = property(_get_pd, _set_pd) # type: float + """ + Air density in kg/m3. + + Name: `pd` + Default: 1.225 + """ + + def _get_PLoss_str(self) -> str: + return self._get_prop_string(39) + + def _set_PLoss_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(39, value, flags) + + PLoss_str = property(_get_PLoss_str, _set_PLoss_str) # type: str + """ + Name of the XYCurve object describing the active power losses in pct versus the wind speed. + + Name: `PLoss` + """ + + def _get_PLoss(self) -> XYcurve: + return self._get_obj(39, XYcurve) + + def _set_PLoss(self, value: Union[AnyStr, XYcurve], flags: enums.SetterFlags = 0): + if isinstance(value, DSSObj) or value is None: + self._set_obj(39, value, flags) + return + + self._set_string_o(39, value, flags) + + PLoss = property(_get_PLoss, _set_PLoss) # type: XYcurve + """ + Name of the XYCurve object describing the active power losses in pct versus the wind speed. + + Name: `PLoss` + """ + + def _get_Rad(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 40) + + def _set_Rad(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 40, value, flags) + + Rad = property(_get_Rad, _set_Rad) # type: float + """ + Rotor radius in meters. + + Name: `Rad` + Default: 40.0 + """ + + def _get_VCutIn(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 41) + + def _set_VCutIn(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 41, value, flags) + + VCutIn = property(_get_VCutIn, _set_VCutIn) # type: float + """ + Cut-in speed for the wind generator. + + Name: `VCutIn` + Default: 5.0 + """ + + def _get_VCutOut(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 42) + + def _set_VCutOut(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 42, value, flags) + + VCutOut = property(_get_VCutOut, _set_VCutOut) # type: float + """ + Cut-out speed for the wind generator. + + Name: `VCutOut` + Default: 23.0 + """ + + def _get_Spectrum_str(self) -> str: + return self._get_prop_string(43) + + def _set_Spectrum_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_string_o(43, value, flags) + + Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: str + """ + Name of harmonic voltage or current spectrum for this WindGen. + Voltage behind Xd" for machine - default. Current injection for inverter. + + Name: `Spectrum` + Default: defaultgen + """ + + def _get_Spectrum(self) -> SpectrumObj: + return self._get_obj(43, SpectrumObj) + + def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj], flags: enums.SetterFlags = 0): + if isinstance(value, DSSObj) or value is None: + self._set_obj(43, value, flags) + return + + self._set_string_o(43, value, flags) + + Spectrum = property(_get_Spectrum, _set_Spectrum) # type: SpectrumObj + """ + Name of harmonic voltage or current spectrum for this WindGen. + Voltage behind Xd" for machine - default. Current injection for inverter. + + Name: `Spectrum` + Default: defaultgen + """ + + def _get_BaseFreq(self) -> float: + return self._lib.Obj_GetFloat64(self._ptr, 44) + + def _set_BaseFreq(self, value: float, flags: enums.SetterFlags = 0): + self._lib.Obj_SetFloat64(self._ptr, 44, value, flags) + + BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: float + """ + Base Frequency for ratings. + + Name: `BaseFreq` + Units: Hz + """ + + def _get_Enabled(self) -> bool: + return self._lib.Obj_GetInt32(self._ptr, 45) != 0 + + def _set_Enabled(self, value: bool, flags: enums.SetterFlags = 0): + self._lib.Obj_SetInt32(self._ptr, 45, value, flags) + + Enabled = property(_get_Enabled, _set_Enabled) # type: bool + """ + Indicates whether this element is enabled. + + Name: `Enabled` + Default: True + """ + + def Like(self, value: AnyStr): + """ + Make like another object, e.g.: + + New Capacitor.C2 like=c1 ... + + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` + """ + self._set_string_o(46, value) + + +class WindGenProperties(TypedDict): + Phases: int + Bus1: AnyStr + kV: float + kW: float + PF: float + Model: Union[int, enums.WindGenModel] + Yearly: Union[AnyStr, LoadShape] + Daily: Union[AnyStr, LoadShape] + Duty: Union[AnyStr, LoadShape] + Conn: Union[AnyStr, int, enums.Connection] + kvar: float + Class: int + DebugTrace: bool + Vminpu: float + Vmaxpu: float + kVA: float + MVA: float + DutyStart: float + DynamicEq: Union[AnyStr, DynamicExp] + DynOut: List[AnyStr] + RThev: float + XThev: float + VSS: float + PSS: float + QSS: float + VWind: float + QMode: Union[int, enums.WindGenQMode] + SimMechFlg: int + APCFlg: int + QFlg: int + delt0: float + N_WTG: int + VV_Curve: Union[AnyStr, XYcurve] + Ag: float + Cp: float + Lamda: float + P: float + pd: float + PLoss: Union[AnyStr, XYcurve] + Rad: float + VCutIn: float + VCutOut: float + Spectrum: Union[AnyStr, SpectrumObj] + BaseFreq: float + Enabled: bool + Like: AnyStr + +class WindGenBatch(DSSBatch, CircuitElementBatchMixin, PCElementBatchMixin): + _cls_name = 'WindGen' + _obj_cls = WindGen + _cls_idx = 28 + __slots__ = [] + + def __init__(self, api_util, **kwargs): + DSSBatch.__init__(self, api_util, **kwargs) + CircuitElementBatchMixin.__init__(self) + PCElementBatchMixin.__init__(self) + + def edit(self, **kwargs: Unpack[WindGenBatchProperties]) -> WindGenBatch: + """ + Edit this WindGen 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. + + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the objects. + :return: Returns itself to allow call chaining. + """ + + self._edit(props=kwargs) + return self + + + if TYPE_CHECKING: + def __iter__(self) -> Iterator[WindGen]: + yield from DSSBatch.__iter__(self) + + def _get_Phases(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 1) + + def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(1, value, flags) + + Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy + """ + Number of phases for this WindGen. Power is evenly divided among phases. + + Name: `Phases` + Default: 3 + """ + + def _get_Bus1(self) -> List[str]: + return self._get_batch_str_prop(2) + + def _set_Bus1(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(2, value, flags) + + Bus1 = property(_get_Bus1, _set_Bus1) # type: List[str] + """ + Bus to which the WindGen is connected. May include specific node specification. + + Name: `Bus1` + """ + + def _get_kV(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 3) + + def _set_kV(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(3, value, flags) + + kV = property(_get_kV, _set_kV) # type: BatchFloat64ArrayProxy + """ + Nominal rated (1.0 per unit) voltage, kV, for WindGen. For 2- and 3-phase WindGens, specify phase-phase kV. + Otherwise, for phases=1 or phases>3, specify actual kV across each branch of the WindGen. + If wye (star), specify phase-neutral kV. + If delta or phase-phase connected, specify phase-phase kV. + + Name: `kV` + Units: kV + Default: 12.47 + """ + + def _get_kW(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 4) + + def _set_kW(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(4, value, flags) + + kW = property(_get_kW, _set_kW) # type: BatchFloat64ArrayProxy + """ + Total base kW for the WindGen. + A positive value denotes power coming OUT of the element, which is the opposite of a load. This value is modified depending on the dispatch mode. + Unaffected by the global load multiplier and growth curves. + If you want there to be more generation, you must add more WindGens or change this value. + + Name: `kW` + Units: kW + Default: 1000.0 + """ + + def _get_PF(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 5) + + def _set_PF(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(5, value, flags) + + PF = property(_get_PF, _set_PF) # type: BatchFloat64ArrayProxy + """ + WindGen power factor. Enter negative for leading powerfactor (when kW and kvar have opposite signs.) + A positive power factor for a WindGen signifies that the WindGen produces vars as is typical for a synchronous WindGen. + Induction machines would be generally specified with a negative power factor. + + Name: `PF` + Default: 0.88 + """ + + def _get_Model(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 6) + + def _set_Model(self, value: Union[int, enums.WindGenModel, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(6, value, flags) + + Model = property(_get_Model, _set_Model) # type: BatchInt32ArrayProxy + """ + Integer code for the model to use for generation variation with voltage. + Valid values are (**NOTE:** this is under review): + 1:WindGen injects a constant kW at specified power factor. + 2:WindGen is modeled as a constant admittance. + 4:Const kW, Fixed Q (Q never varies) + 5:Const kW, Fixed Q (as a constant reactance) + + Name: `Model` + Default: 1 + """ + + def _get_Yearly_str(self) -> List[str]: + return self._get_batch_str_prop(7) + + def _set_Yearly_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(7, value, flags) + + Yearly_str = property(_get_Yearly_str, _set_Yearly_str) # type: List[str] + """ + Wind speed shape to use for yearly-mode simulations. Must be previously defined as a LoadShape object. + If this is not specified, a constant value is assumed (no variation). + Set to NONE to reset to no LoadShape. + Nominally for 8760 simulations. If there are fewer points in the designated shape than the number of points in the solution, the curve is repeated. + + Name: `Yearly` + """ + + def _get_Yearly(self) -> List[LoadShape]: + return self._get_batch_obj_prop(7) + + def _set_Yearly(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape]], flags: enums.SetterFlags = 0): + self._set_batch_obj_prop(7, value, flags) + + Yearly = property(_get_Yearly, _set_Yearly) # type: List[LoadShape] + """ + Wind speed shape to use for yearly-mode simulations. Must be previously defined as a LoadShape object. + If this is not specified, a constant value is assumed (no variation). + Set to NONE to reset to no LoadShape. + Nominally for 8760 simulations. If there are fewer points in the designated shape than the number of points in the solution, the curve is repeated. + + Name: `Yearly` + """ + + def _get_Daily_str(self) -> List[str]: + return self._get_batch_str_prop(8) + + def _set_Daily_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(8, value, flags) + + Daily_str = property(_get_Daily_str, _set_Daily_str) # type: List[str] + """ + Wind speed shape to use for daily-mode simulations. Must be previously defined as a LoadShape object of 24 hrs, typically. + Set to NONE to reset to no LoadShape. + + Name: `Daily` + """ + + def _get_Daily(self) -> List[LoadShape]: + return self._get_batch_obj_prop(8) + + def _set_Daily(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape]], flags: enums.SetterFlags = 0): + self._set_batch_obj_prop(8, value, flags) + + Daily = property(_get_Daily, _set_Daily) # type: List[LoadShape] + """ + Wind speed shape to use for daily-mode simulations. Must be previously defined as a LoadShape object of 24 hrs, typically. + Set to NONE to reset to no LoadShape. + + Name: `Daily` + """ + + def _get_Duty_str(self) -> List[str]: + return self._get_batch_str_prop(9) + + def _set_Duty_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(9, value, flags) + + Duty_str = property(_get_Duty_str, _set_Duty_str) # type: List[str] + """ + Load shape to use for duty cycle dispatch simulations such as for wind or solar generation. + Must be previously defined as a LoadShape object. + Typically would have time intervals less than 1 hr -- perhaps, in seconds. + Set to NONE to reset to no LoadShape. + 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. + + Name: `Duty` + """ + + def _get_Duty(self) -> List[LoadShape]: + return self._get_batch_obj_prop(9) + + def _set_Duty(self, value: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape]], flags: enums.SetterFlags = 0): + self._set_batch_obj_prop(9, value, flags) + + Duty = property(_get_Duty, _set_Duty) # type: List[LoadShape] + """ + Load shape to use for duty cycle dispatch simulations such as for wind or solar generation. + Must be previously defined as a LoadShape object. + Typically would have time intervals less than 1 hr -- perhaps, in seconds. + Set to NONE to reset to no LoadShape. + 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. + + Name: `Duty` + """ + + def _get_Conn(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 10) + + def _set_Conn(self, value: Union[AnyStr, int, enums.Connection, List[AnyStr], List[int], List[enums.Connection], Int32Array], flags: enums.SetterFlags = 0): + if isinstance(value, (str, bytes)) or (isinstance(value, LIST_LIKE) and isinstance(value[0], (str, bytes))): + self._set_batch_string(10, value, flags) + return + + self._set_batch_int32_array(10, value, flags) + + Conn = property(_get_Conn, _set_Conn) # type: BatchInt32ArrayProxy + """ + ={wye|LN|delta|LL}. Default is wye. + + Name: `Conn` + Default: Wye + """ + + def _get_Conn_str(self) -> List[str]: + return self._get_batch_str_prop(10) + + def _set_Conn_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + self._set_Conn(value, flags) + + Conn_str = property(_get_Conn_str, _set_Conn_str) # type: List[str] + """ + ={wye|LN|delta|LL}. Default is wye. + + Name: `Conn` + Default: Wye + """ + + def _get_kvar(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 11) + + def _set_kvar(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(11, value, flags) + + kvar = property(_get_kvar, _set_kvar) # type: BatchFloat64ArrayProxy + """ + Specify the base kvar. Alternative to specifying the power factor. + Side effect: the power factor value is altered to agree based on present value of kW. + + Name: `kvar` + Units: kvar + """ + + def _get_Class(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 12) + + def _set_Class(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(12, value, flags) + + Class = property(_get_Class, _set_Class) # type: BatchInt32ArrayProxy + """ + An arbitrary integer number representing the class of WindGen so that WindGen values may be segregated by class. + + Name: `Class` + Default: 1 + """ + + def _get_DebugTrace(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(13) + ] + + def _set_DebugTrace(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(13, value, flags) + + DebugTrace = property(_get_DebugTrace, _set_DebugTrace) # type: List[bool] + """ + Turn this on to capture the progress of the WindGen model for each iteration. + Creates a separate file for each WindGen named "WINDGEN_name.CSV". + + Name: `DebugTrace` + Default: False + """ + + def _get_Vminpu(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 14) + + def _set_Vminpu(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(14, value, flags) + + Vminpu = property(_get_Vminpu, _set_Vminpu) # type: BatchFloat64ArrayProxy + """ + Minimum per unit voltage for which the Model is assumed to apply. Below this value, the WindGen model reverts to a constant impedance model. For model 7, the current is limited to the value computed for constant power at VMinPU. + + Name: `Vminpu` + Default: 0.9 + """ + + def _get_Vmaxpu(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 15) + + def _set_Vmaxpu(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(15, value, flags) + + Vmaxpu = property(_get_Vmaxpu, _set_Vmaxpu) # type: BatchFloat64ArrayProxy + """ + Maximum per unit voltage for which the Model is assumed to apply. + Above this value, the WindGen model reverts to a constant impedance model. + + Name: `Vmaxpu` + Default: 1.1 + """ + + def _get_kVA(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 16) + + def _set_kVA(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(16, value, flags) + + kVA = property(_get_kVA, _set_kVA) # type: BatchFloat64ArrayProxy + """ + kVA rating of electrical machine. Defaults to 1.2 times "kW" if not specified. Applied to machine or inverter definition for Dynamics mode solutions. + + Name: `kVA` + Units: kVA + """ + + def _get_MVA(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 17) + + def _set_MVA(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(17, value, flags) + + MVA = property(_get_MVA, _set_MVA) # type: BatchFloat64ArrayProxy + """ + MVA rating of electrical machine. Alternative to using the "kVA" property. + + Name: `MVA` + Units: MVA + """ + + def _get_DutyStart(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 18) + + def _set_DutyStart(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(18, value, flags) + + DutyStart = property(_get_DutyStart, _set_DutyStart) # type: BatchFloat64ArrayProxy + """ + Starting time offset [hours] into the duty cycle shape for this WindGen. + + Name: `DutyStart` + Units: hour + Default: 0.0 + """ + + def _get_DynamicEq_str(self) -> List[str]: + return self._get_batch_str_prop(19) + + def _set_DynamicEq_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(19, value, flags) + + DynamicEq_str = property(_get_DynamicEq_str, _set_DynamicEq_str) # type: List[str] + """ + The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. + if not defined, the generator dynamics will follow the built-in dynamic equation. + + Name: `DynamicEq` + """ + + def _get_DynamicEq(self) -> List[DynamicExp]: + return self._get_batch_obj_prop(19) + + def _set_DynamicEq(self, value: Union[AnyStr, DynamicExp, List[AnyStr], List[DynamicExp]], flags: enums.SetterFlags = 0): + self._set_batch_obj_prop(19, value, flags) + + DynamicEq = property(_get_DynamicEq, _set_DynamicEq) # type: List[DynamicExp] + """ + The name of the dynamic equation (DynamicExp) that will be used for defining the dynamic behavior of the generator. + if not defined, the generator dynamics will follow the built-in dynamic equation. + + Name: `DynamicEq` + """ + + def _get_DynOut(self) -> List[List[str]]: + return self._get_string_ll(20) + + def _set_DynOut(self, value: List[AnyStr], flags: enums.SetterFlags = 0): + value, value_ptr, value_count = self._prepare_string_array(value) + for x in self._unpack(): + self._lib.Obj_SetStringArray(x, 20, value_ptr, value_count, flags) + + self._check_for_error() + + DynOut = property(_get_DynOut, _set_DynOut) # type: List[List[str]] + """ + The name of the variables within the Dynamic equation that will be used to govern the generator dynamics. + This generator model requires 2 outputs from the dynamic equation: + 1. Shaft speed (velocity) relative to synchronous speed. + 2. Shaft, or power, angle (relative to synchronous reference frame). + The output variables need to be defined in the same order. + + Name: `DynOut` + """ + + def _get_RThev(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 21) + + def _set_RThev(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(21, value, flags) + + RThev = property(_get_RThev, _set_RThev) # type: BatchFloat64ArrayProxy + """ + Per unit Thévenin equivalent R. + + Name: `RThev` + Default: 0.0 + """ + + def _get_XThev(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 22) + + def _set_XThev(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(22, value, flags) + + XThev = property(_get_XThev, _set_XThev) # type: BatchFloat64ArrayProxy + """ + Per unit Thévenin equivalent X. + + Name: `XThev` + Default: 0.05 + """ + + def _get_VSS(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 23) + + def _set_VSS(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(23, value, flags) + + VSS = property(_get_VSS, _set_VSS) # type: BatchFloat64ArrayProxy + """ + Steady state voltage magnitude. + + Name: `VSS` + Units: pu (voltage) + Default: 1.0 + """ + + def _get_PSS(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 24) + + def _set_PSS(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(24, value, flags) + + PSS = property(_get_PSS, _set_PSS) # type: BatchFloat64ArrayProxy + """ + Steady state output real power. + + Name: `PSS` + Default: 1.0 + """ + + def _get_QSS(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 25) + + def _set_QSS(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(25, value, flags) + + QSS = property(_get_QSS, _set_QSS) # type: BatchFloat64ArrayProxy + """ + Steady state output reactive power. + + Name: `QSS` + Default: 0.0 + """ + + def _get_VWind(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 26) + + def _set_VWind(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(26, value, flags) + + VWind = property(_get_VWind, _set_VWind) # type: BatchFloat64ArrayProxy + """ + Wind speed in m/s + + Name: `VWind` + Default: 12.0 + """ + + def _get_QMode(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 27) + + def _set_QMode(self, value: Union[int, enums.WindGenQMode, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(27, value, flags) + + QMode = property(_get_QMode, _set_QMode) # type: BatchInt32ArrayProxy + """ + Q control mode (0:Q, 1:PF, 2:VV). + + Name: `QMode` + Default: 0 + """ + + def _get_SimMechFlg(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 28) + + def _set_SimMechFlg(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(28, value, flags) + + SimMechFlg = property(_get_SimMechFlg, _set_SimMechFlg) # type: BatchInt32ArrayProxy + """ + 1 to simulate mechanical system. Otherwise (0) only uses the electrical system. For dynamics simulation purposes. + + Name: `SimMechFlg` + Default: 1 + """ + + def _get_APCFlg(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 29) + + def _set_APCFlg(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(29, value, flags) + + APCFlg = property(_get_APCFlg, _set_APCFlg) # type: BatchInt32ArrayProxy + """ + 1 to enable active power control. + + Name: `APCFlg` + Default: 0 + """ + + def _get_QFlg(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 30) + + def _set_QFlg(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(30, value, flags) + + QFlg = property(_get_QFlg, _set_QFlg) # type: BatchInt32ArrayProxy + """ + 1 to enable reactive power and voltage control. + + Name: `QFlg` + Default: 1 + """ + + def _get_delt0(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 31) + + def _set_delt0(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(31, value, flags) + + delt0 = property(_get_delt0, _set_delt0) # type: BatchFloat64ArrayProxy + """ + User defined internal simulation step. + + Name: `delt0` + Default: 5e-05 + """ + + def _get_N_WTG(self) -> BatchInt32ArrayProxy: + return BatchInt32ArrayProxy(self, 32) + + def _set_N_WTG(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(32, value, flags) + + N_WTG = property(_get_N_WTG, _set_N_WTG) # type: BatchInt32ArrayProxy + """ + Number of WTG in aggregation. + + Name: `N_WTG` + Default: 1 + """ + + def _get_VV_Curve_str(self) -> List[str]: + return self._get_batch_str_prop(33) + + def _set_VV_Curve_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(33, value, flags) + + VV_Curve_str = property(_get_VV_Curve_str, _set_VV_Curve_str) # type: List[str] + """ + Name of the XY curve defining the control curve for implementing volt-var (VV) control with this inverter. + + Name: `VV_Curve` + """ + + def _get_VV_Curve(self) -> List[XYcurve]: + return self._get_batch_obj_prop(33) + + def _set_VV_Curve(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve]], flags: enums.SetterFlags = 0): + self._set_batch_obj_prop(33, value, flags) + + VV_Curve = property(_get_VV_Curve, _set_VV_Curve) # type: List[XYcurve] + """ + Name of the XY curve defining the control curve for implementing volt-var (VV) control with this inverter. + + Name: `VV_Curve` + """ + + def _get_Ag(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 34) + + def _set_Ag(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(34, value, flags) + + Ag = property(_get_Ag, _set_Ag) # type: BatchFloat64ArrayProxy + """ + Gearbox ratio. + + Name: `Ag` + Default: 0.011111111111111112 + """ + + def _get_Cp(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 35) + + def _set_Cp(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(35, value, flags) + + Cp = property(_get_Cp, _set_Cp) # type: BatchFloat64ArrayProxy + """ + Turbine performance coefficient. + + Name: `Cp` + Default: 0.41 + """ + + def _get_Lamda(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 36) + + def _set_Lamda(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(36, value, flags) + + Lamda = property(_get_Lamda, _set_Lamda) # type: BatchFloat64ArrayProxy + """ + Tip speed ratio. + + Name: `Lamda` + Default: 7.95 + """ + + def _get_P(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 37) + + def _set_P(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(37, value, flags) + + P = property(_get_P, _set_P) # type: BatchFloat64ArrayProxy + """ + Number of pole pairs of the induction generator. + + Name: `P` + Default: 2.0 + """ + + def _get_pd(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 38) + + def _set_pd(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(38, value, flags) + + pd = property(_get_pd, _set_pd) # type: BatchFloat64ArrayProxy + """ + Air density in kg/m3. + + Name: `pd` + Default: 1.225 + """ + + def _get_PLoss_str(self) -> List[str]: + return self._get_batch_str_prop(39) + + def _set_PLoss_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(39, value, flags) + + PLoss_str = property(_get_PLoss_str, _set_PLoss_str) # type: List[str] + """ + Name of the XYCurve object describing the active power losses in pct versus the wind speed. + + Name: `PLoss` + """ + + def _get_PLoss(self) -> List[XYcurve]: + return self._get_batch_obj_prop(39) + + def _set_PLoss(self, value: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve]], flags: enums.SetterFlags = 0): + self._set_batch_obj_prop(39, value, flags) + + PLoss = property(_get_PLoss, _set_PLoss) # type: List[XYcurve] + """ + Name of the XYCurve object describing the active power losses in pct versus the wind speed. + + Name: `PLoss` + """ + + def _get_Rad(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 40) + + def _set_Rad(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(40, value, flags) + + Rad = property(_get_Rad, _set_Rad) # type: BatchFloat64ArrayProxy + """ + Rotor radius in meters. + + Name: `Rad` + Default: 40.0 + """ + + def _get_VCutIn(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 41) + + def _set_VCutIn(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(41, value, flags) + + VCutIn = property(_get_VCutIn, _set_VCutIn) # type: BatchFloat64ArrayProxy + """ + Cut-in speed for the wind generator. + + Name: `VCutIn` + Default: 5.0 + """ + + def _get_VCutOut(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 42) + + def _set_VCutOut(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(42, value, flags) + + VCutOut = property(_get_VCutOut, _set_VCutOut) # type: BatchFloat64ArrayProxy + """ + Cut-out speed for the wind generator. + + Name: `VCutOut` + Default: 23.0 + """ + + def _get_Spectrum_str(self) -> List[str]: + return self._get_batch_str_prop(43) + + def _set_Spectrum_str(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFlags = 0): + self._set_batch_string(43, value, flags) + + Spectrum_str = property(_get_Spectrum_str, _set_Spectrum_str) # type: List[str] + """ + Name of harmonic voltage or current spectrum for this WindGen. + Voltage behind Xd" for machine - default. Current injection for inverter. + + Name: `Spectrum` + Default: defaultgen + """ + + def _get_Spectrum(self) -> List[SpectrumObj]: + return self._get_batch_obj_prop(43) + + def _set_Spectrum(self, value: Union[AnyStr, SpectrumObj, List[AnyStr], List[SpectrumObj]], flags: enums.SetterFlags = 0): + self._set_batch_obj_prop(43, value, flags) + + Spectrum = property(_get_Spectrum, _set_Spectrum) # type: List[SpectrumObj] + """ + Name of harmonic voltage or current spectrum for this WindGen. + Voltage behind Xd" for machine - default. Current injection for inverter. + + Name: `Spectrum` + Default: defaultgen + """ + + def _get_BaseFreq(self) -> BatchFloat64ArrayProxy: + return BatchFloat64ArrayProxy(self, 44) + + def _set_BaseFreq(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0): + self._set_batch_float64_array(44, value, flags) + + BaseFreq = property(_get_BaseFreq, _set_BaseFreq) # type: BatchFloat64ArrayProxy + """ + Base Frequency for ratings. + + Name: `BaseFreq` + Units: Hz + """ + + def _get_Enabled(self) -> List[bool]: + return [v != 0 for v in + self._get_batch_int32_prop(45) + ] + + def _set_Enabled(self, value: Union[bool, List[bool]], flags: enums.SetterFlags = 0): + self._set_batch_int32_array(45, value, flags) + + Enabled = property(_get_Enabled, _set_Enabled) # type: List[bool] + """ + Indicates whether this element is enabled. + + Name: `Enabled` + Default: True + """ + + def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): + """ + Make like another object, e.g.: + + New Capacitor.C2 like=c1 ... + + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` + """ + self._set_batch_string(46, value, flags) + +class WindGenBatchProperties(TypedDict): + Phases: Union[int, Int32Array] + Bus1: Union[AnyStr, List[AnyStr]] + kV: Union[float, Float64Array] + kW: Union[float, Float64Array] + PF: Union[float, Float64Array] + Model: Union[int, enums.WindGenModel, Int32Array] + Yearly: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape]] + Daily: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape]] + Duty: Union[AnyStr, LoadShape, List[AnyStr], List[LoadShape]] + Conn: Union[AnyStr, int, enums.Connection, List[AnyStr], List[int], List[enums.Connection], Int32Array] + kvar: Union[float, Float64Array] + Class: Union[int, Int32Array] + DebugTrace: bool + Vminpu: Union[float, Float64Array] + Vmaxpu: Union[float, Float64Array] + kVA: Union[float, Float64Array] + MVA: Union[float, Float64Array] + DutyStart: Union[float, Float64Array] + DynamicEq: Union[AnyStr, DynamicExp, List[AnyStr], List[DynamicExp]] + DynOut: List[AnyStr] + RThev: Union[float, Float64Array] + XThev: Union[float, Float64Array] + VSS: Union[float, Float64Array] + PSS: Union[float, Float64Array] + QSS: Union[float, Float64Array] + VWind: Union[float, Float64Array] + QMode: Union[int, enums.WindGenQMode, Int32Array] + SimMechFlg: Union[int, Int32Array] + APCFlg: Union[int, Int32Array] + QFlg: Union[int, Int32Array] + delt0: Union[float, Float64Array] + N_WTG: Union[int, Int32Array] + VV_Curve: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve]] + Ag: Union[float, Float64Array] + Cp: Union[float, Float64Array] + Lamda: Union[float, Float64Array] + P: Union[float, Float64Array] + pd: Union[float, Float64Array] + PLoss: Union[AnyStr, XYcurve, List[AnyStr], List[XYcurve]] + Rad: Union[float, Float64Array] + VCutIn: Union[float, Float64Array] + VCutOut: Union[float, Float64Array] + Spectrum: Union[AnyStr, SpectrumObj, List[AnyStr], List[SpectrumObj]] + BaseFreq: Union[float, Float64Array] + Enabled: bool + Like: AnyStr + +class IWindGen(IDSSObj, WindGenBatch): + __slots__ = IDSSObj._extra_slots + + def __init__(self, iobj): + IDSSObj.__init__(self, iobj, WindGen, WindGenBatch) + WindGenBatch.__init__(self, self._api_util, sync_cls_idx=WindGen._cls_idx) + + if TYPE_CHECKING: + def __getitem__(self, name_or_idx: Union[AnyStr, int]) -> WindGen: + return self.find(name_or_idx) + + def batch(self, **kwargs) -> WindGenBatch: #TODO: add annotation to kwargs (specialized typed dict) + """ + Creates a new batch handler of (existing) WindGen objects + """ + return self._batch_cls(self._api_util, **kwargs) + + def __iter__(self) -> Iterator[WindGen]: + yield from WindGenBatch.__iter__(self) + + + def new(self, name: AnyStr, *, begin_edit: Optional[bool] = None, activate=False, **kwargs: Unpack[WindGenProperties]) -> WindGen: + """ + Creates a new WindGen. + + :param name: The object's name is a required positional argument. + + :param 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). + + :param 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 an `end_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. + + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the object. + :return: 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. + """ + return self._new(name, begin_edit=begin_edit, activate=activate, props=kwargs) + + def batch_new(self, names: Optional[List[AnyStr]] = None, *, df = None, count: Optional[int] = None, begin_edit: Optional[bool] = None, **kwargs: Unpack[WindGenBatchProperties]) -> WindGenBatch: + """ + Creates a new batch of WindGen objects + + Either `names`, `count` or `df` is required. + + :param begin_edit: The argument `begin_edit` indicates if the user want to leave the elements in the edit state, and requires a call to `end_edit()` or equivalent. The default `begin_edit` is set to `None`. With `None`, the behavior will be adjusted according the default of how the batch is created. + :param **kwargs: Pass keyword arguments equivalent to the DSS properties of the object. + :param names: When using a list of names, each new object will match the names from this list. `begin_edit` defaults to `True` if no arguments for properties were passed, `False` otherwise. + :param count: When using `count`, new objects will be created with based on a random prefix, with an increasing integer up to `count`. `begin_edit` defaults to `True` if no arguments for properties were passed, `False` otherwise. + :param df: Currently **EXPERIMENTAL AND LIMITED**, tries to get the columns from a dataframe to populate the names and the DSS properties. `begin_edit` defaults to `False`. + :return: 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. + """ + return self._batch_new_aux(names=names, df=df, count=count, begin_edit=begin_edit, props=kwargs) diff --git a/altdss/WireData.py b/altdss/WireData.py index 52be71b..76dd87a 100644 --- a/altdss/WireData.py +++ b/altdss/WireData.py @@ -73,9 +73,10 @@ def _set_RDC(self, value: float, flags: enums.SetterFlags = 0): RDC = property(_get_RDC, _set_RDC) # type: float """ - dc Resistance, ohms per unit length (see Runits). Defaults to Rac/1.02 if not specified. + DC resistance, ohms per unit length (see `Runits`). Defaults to $Rac/1.02$ if not specified. - DSS property name: `RDC`, DSS property index: 1. + Name: `RDC` + Units: Ω/[length_unit] """ def _get_RAC(self) -> float: @@ -86,9 +87,9 @@ def _set_RAC(self, value: float, flags: enums.SetterFlags = 0): RAC = property(_get_RAC, _set_RAC) # type: float """ - Resistance at 60 Hz per unit length. Defaults to 1.02*Rdc if not specified. + Resistance at 60 Hz per unit length. Defaults to $1.02 × Rdc$ if not specified. - DSS property name: `RAC`, DSS property index: 2. + Name: `RAC` """ def _get_RUnits(self) -> enums.LengthUnit: @@ -104,7 +105,8 @@ def _set_RUnits(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enums. """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 3. + Name: `RUnits` + Default: none """ def _get_RUnits_str(self) -> str: @@ -117,7 +119,8 @@ def _set_RUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 3. + Name: `RUnits` + Default: none """ def _get_GMRAC(self) -> float: @@ -128,9 +131,9 @@ def _set_GMRAC(self, value: float, flags: enums.SetterFlags = 0): GMRAC = property(_get_GMRAC, _set_GMRAC) # type: float """ - GMR at 60 Hz. Defaults to .7788*radius if not specified. + GMR at 60 Hz. Defaults to $0.7788 × radius$ if not specified. - DSS property name: `GMRAC`, DSS property index: 4. + Name: `GMRAC` """ def _get_GMRUnits(self) -> enums.LengthUnit: @@ -144,9 +147,10 @@ def _set_GMRUnits(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enum GMRUnits = property(_get_GMRUnits, _set_GMRUnits) # type: enums.LengthUnit """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 5. + Name: `GMRUnits` + Default: none """ def _get_GMRUnits_str(self) -> str: @@ -157,9 +161,10 @@ def _set_GMRUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): GMRUnits_str = property(_get_GMRUnits_str, _set_GMRUnits_str) # type: str """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 5. + Name: `GMRUnits` + Default: none """ def _get_Radius(self) -> float: @@ -172,7 +177,7 @@ def _set_Radius(self, value: float, flags: enums.SetterFlags = 0): """ Outside radius of conductor. Defaults to GMR/0.7788 if not specified. - DSS property name: `Radius`, DSS property index: 6. + Name: `Radius` """ def _get_RadUnits(self) -> enums.LengthUnit: @@ -186,9 +191,10 @@ def _set_RadUnits(self, value: Union[AnyStr, int, enums.LengthUnit], flags: enum RadUnits = property(_get_RadUnits, _set_RadUnits) # type: enums.LengthUnit """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 7. + Name: `RadUnits` + Default: none """ def _get_RadUnits_str(self) -> str: @@ -199,9 +205,10 @@ def _set_RadUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): RadUnits_str = property(_get_RadUnits_str, _set_RadUnits_str) # type: str """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 7. + Name: `RadUnits` + Default: none """ def _get_NormAmps(self) -> float: @@ -212,9 +219,9 @@ def _set_NormAmps(self, value: float, flags: enums.SetterFlags = 0): NormAmps = property(_get_NormAmps, _set_NormAmps) # type: float """ - Normal ampacity, amperes. Defaults to Emergency amps/1.5 if not specified. + Normal ampacity, amperes. Defaults to $EmergAmps / 1.5$ if not specified. - DSS property name: `NormAmps`, DSS property index: 8. + Name: `NormAmps` """ def _get_EmergAmps(self) -> float: @@ -225,9 +232,9 @@ def _set_EmergAmps(self, value: float, flags: enums.SetterFlags = 0): EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: float """ - Emergency ampacity, amperes. Defaults to 1.5 * Normal Amps if not specified. + Emergency ampacity, amperes. Defaults to $1.5 × NormAmps$ if not specified. - DSS property name: `EmergAmps`, DSS property index: 9. + Name: `EmergAmps` """ def _get_Diam(self) -> float: @@ -240,7 +247,7 @@ def _set_Diam(self, value: float, flags: enums.SetterFlags = 0): """ Diameter; Alternative method for entering radius. - DSS property name: `Diam`, DSS property index: 10. + Name: `Diam` """ def _get_Seasons(self) -> int: @@ -253,7 +260,7 @@ def _set_Seasons(self, value: int, flags: enums.SetterFlags = 0): """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 11. + Name: `Seasons` """ def _get_Ratings(self) -> Float64Array: @@ -267,7 +274,8 @@ def _set_Ratings(self, value: Float64Array, flags: enums.SetterFlags = 0): An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. - DSS property name: `Ratings`, DSS property index: 12. + Name: `Ratings` + Default: [-1.0] """ def _get_CapRadius(self) -> float: @@ -280,7 +288,7 @@ def _set_CapRadius(self, value: float, flags: enums.SetterFlags = 0): """ Equivalent conductor radius for capacitance calcs. Specify this for bundled conductors. Defaults to same value as radius. Define Diam or Radius property first. - DSS property name: `CapRadius`, DSS property index: 13. + Name: `CapRadius` """ def Like(self, value: AnyStr): @@ -289,7 +297,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 14. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(14, value) @@ -346,9 +356,10 @@ def _set_RDC(self, value: Union[float, Float64Array], flags: enums.SetterFlags = RDC = property(_get_RDC, _set_RDC) # type: BatchFloat64ArrayProxy """ - dc Resistance, ohms per unit length (see Runits). Defaults to Rac/1.02 if not specified. + DC resistance, ohms per unit length (see `Runits`). Defaults to $Rac/1.02$ if not specified. - DSS property name: `RDC`, DSS property index: 1. + Name: `RDC` + Units: Ω/[length_unit] """ def _get_RAC(self) -> BatchFloat64ArrayProxy: @@ -359,9 +370,9 @@ def _set_RAC(self, value: Union[float, Float64Array], flags: enums.SetterFlags = RAC = property(_get_RAC, _set_RAC) # type: BatchFloat64ArrayProxy """ - Resistance at 60 Hz per unit length. Defaults to 1.02*Rdc if not specified. + Resistance at 60 Hz per unit length. Defaults to $1.02 × Rdc$ if not specified. - DSS property name: `RAC`, DSS property index: 2. + Name: `RAC` """ def _get_RUnits(self) -> BatchInt32ArrayProxy: @@ -378,7 +389,8 @@ def _set_RUnits(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr], """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 3. + Name: `RUnits` + Default: none """ def _get_RUnits_str(self) -> List[str]: @@ -391,7 +403,8 @@ def _set_RUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): """ Length units for resistance: ohms per {mi|kft|km|m|Ft|in|cm|mm} Default=none. - DSS property name: `RUnits`, DSS property index: 3. + Name: `RUnits` + Default: none """ def _get_GMRAC(self) -> BatchFloat64ArrayProxy: @@ -402,9 +415,9 @@ def _set_GMRAC(self, value: Union[float, Float64Array], flags: enums.SetterFlags GMRAC = property(_get_GMRAC, _set_GMRAC) # type: BatchFloat64ArrayProxy """ - GMR at 60 Hz. Defaults to .7788*radius if not specified. + GMR at 60 Hz. Defaults to $0.7788 × radius$ if not specified. - DSS property name: `GMRAC`, DSS property index: 4. + Name: `GMRAC` """ def _get_GMRUnits(self) -> BatchInt32ArrayProxy: @@ -419,9 +432,10 @@ def _set_GMRUnits(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr] GMRUnits = property(_get_GMRUnits, _set_GMRUnits) # type: BatchInt32ArrayProxy """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 5. + Name: `GMRUnits` + Default: none """ def _get_GMRUnits_str(self) -> List[str]: @@ -432,9 +446,10 @@ def _set_GMRUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): GMRUnits_str = property(_get_GMRUnits_str, _set_GMRUnits_str) # type: List[str] """ - Units for GMR: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for GMR. - DSS property name: `GMRUnits`, DSS property index: 5. + Name: `GMRUnits` + Default: none """ def _get_Radius(self) -> BatchFloat64ArrayProxy: @@ -447,7 +462,7 @@ def _set_Radius(self, value: Union[float, Float64Array], flags: enums.SetterFlag """ Outside radius of conductor. Defaults to GMR/0.7788 if not specified. - DSS property name: `Radius`, DSS property index: 6. + Name: `Radius` """ def _get_RadUnits(self) -> BatchInt32ArrayProxy: @@ -462,9 +477,10 @@ def _set_RadUnits(self, value: Union[AnyStr, int, enums.LengthUnit, List[AnyStr] RadUnits = property(_get_RadUnits, _set_RadUnits) # type: BatchInt32ArrayProxy """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 7. + Name: `RadUnits` + Default: none """ def _get_RadUnits_str(self) -> List[str]: @@ -475,9 +491,10 @@ def _set_RadUnits_str(self, value: AnyStr, flags: enums.SetterFlags = 0): RadUnits_str = property(_get_RadUnits_str, _set_RadUnits_str) # type: List[str] """ - Units for outside radius: {mi|kft|km|m|Ft|in|cm|mm} Default=none. + Units for outside radius. - DSS property name: `RadUnits`, DSS property index: 7. + Name: `RadUnits` + Default: none """ def _get_NormAmps(self) -> BatchFloat64ArrayProxy: @@ -488,9 +505,9 @@ def _set_NormAmps(self, value: Union[float, Float64Array], flags: enums.SetterFl NormAmps = property(_get_NormAmps, _set_NormAmps) # type: BatchFloat64ArrayProxy """ - Normal ampacity, amperes. Defaults to Emergency amps/1.5 if not specified. + Normal ampacity, amperes. Defaults to $EmergAmps / 1.5$ if not specified. - DSS property name: `NormAmps`, DSS property index: 8. + Name: `NormAmps` """ def _get_EmergAmps(self) -> BatchFloat64ArrayProxy: @@ -501,9 +518,9 @@ def _set_EmergAmps(self, value: Union[float, Float64Array], flags: enums.SetterF EmergAmps = property(_get_EmergAmps, _set_EmergAmps) # type: BatchFloat64ArrayProxy """ - Emergency ampacity, amperes. Defaults to 1.5 * Normal Amps if not specified. + Emergency ampacity, amperes. Defaults to $1.5 × NormAmps$ if not specified. - DSS property name: `EmergAmps`, DSS property index: 9. + Name: `EmergAmps` """ def _get_Diam(self) -> BatchFloat64ArrayProxy: @@ -516,7 +533,7 @@ def _set_Diam(self, value: Union[float, Float64Array], flags: enums.SetterFlags """ Diameter; Alternative method for entering radius. - DSS property name: `Diam`, DSS property index: 10. + Name: `Diam` """ def _get_Seasons(self) -> BatchInt32ArrayProxy: @@ -529,7 +546,7 @@ def _set_Seasons(self, value: Union[int, Int32Array], flags: enums.SetterFlags = """ Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 11. + Name: `Seasons` """ def _get_Ratings(self) -> List[Float64Array]: @@ -546,7 +563,8 @@ def _set_Ratings(self, value: Union[Float64Array, List[Float64Array]], flags: en An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines. - DSS property name: `Ratings`, DSS property index: 12. + Name: `Ratings` + Default: [-1.0] """ def _get_CapRadius(self) -> BatchFloat64ArrayProxy: @@ -559,7 +577,7 @@ def _set_CapRadius(self, value: Union[float, Float64Array], flags: enums.SetterF """ Equivalent conductor radius for capacitance calcs. Specify this for bundled conductors. Defaults to same value as radius. Define Diam or Radius property first. - DSS property name: `CapRadius`, DSS property index: 13. + Name: `CapRadius` """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -568,7 +586,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 14. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(14, value, flags) diff --git a/altdss/XYcurve.py b/altdss/XYcurve.py index a3cbb6d..8d88c14 100644 --- a/altdss/XYcurve.py +++ b/altdss/XYcurve.py @@ -69,7 +69,7 @@ def _set_NPts(self, value: int, flags: enums.SetterFlags = 0): """ Max number of points to expect in curve. This could get reset to the actual number of points defined if less than specified. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_YArray(self) -> Float64Array: @@ -87,7 +87,7 @@ def _set_YArray(self, value: Float64Array, flags: enums.SetterFlags = 0): Note: this property will reset Npts to a smaller value if the number of values in the files are fewer. - DSS property name: `YArray`, DSS property index: 3. + Name: `YArray` """ def _get_XArray(self) -> Float64Array: @@ -105,7 +105,7 @@ def _set_XArray(self, value: Float64Array, flags: enums.SetterFlags = 0): Note: this property will reset Npts to a smaller value if the number of values in the files are fewer. - DSS property name: `XArray`, DSS property index: 4. + Name: `XArray` """ def _get_CSVFile(self) -> str: @@ -116,9 +116,9 @@ def _set_CSVFile(self, value: AnyStr, flags: enums.SetterFlags = 0): CSVFile = property(_get_CSVFile, _set_CSVFile) # type: str """ - Switch input of X-Y curve data to a CSV file containing X, Y points one per line. NOTE: This action may reset the number of points to a lower value. + Switch input of X-Y curve data to a CSV file containing X, Y points one per line. NOTE: This action may reset the number of points to a lower value. - DSS property name: `CSVFile`, DSS property index: 5. + Name: `CSVFile` """ def _get_SngFile(self) -> str: @@ -129,9 +129,9 @@ def _set_SngFile(self, value: AnyStr, flags: enums.SetterFlags = 0): SngFile = property(_get_SngFile, _set_SngFile) # type: str """ - Switch input of X-Y curve data to a binary file of SINGLES containing X, Y points packed one after another. NOTE: This action may reset the number of points to a lower value. + Switch input of X-Y curve data to a binary file of SINGLES containing X, Y points packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `SngFile`, DSS property index: 6. + Name: `SngFile` """ def _get_DblFile(self) -> str: @@ -142,9 +142,9 @@ def _set_DblFile(self, value: AnyStr, flags: enums.SetterFlags = 0): DblFile = property(_get_DblFile, _set_DblFile) # type: str """ - Switch input of X-Y curve data to a binary file of DOUBLES containing X, Y points packed one after another. NOTE: This action may reset the number of points to a lower value. + Switch input of X-Y curve data to a binary file of DOUBLES containing X, Y points packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `DblFile`, DSS property index: 7. + Name: `DblFile` """ def _get_X(self) -> float: @@ -157,7 +157,7 @@ def _set_X(self, value: float, flags: enums.SetterFlags = 0): """ Enter a value and then retrieve the interpolated Y value from the Y property. On input shifted then scaled to original curve. Scaled then shifted on output. - DSS property name: `X`, DSS property index: 8. + Name: `X` """ def _get_Y(self) -> float: @@ -170,7 +170,7 @@ def _set_Y(self, value: float, flags: enums.SetterFlags = 0): """ Enter a value and then retrieve the interpolated X value from the X property. On input shifted then scaled to original curve. Scaled then shifted on output. - DSS property name: `Y`, DSS property index: 9. + Name: `Y` """ def _get_XShift(self) -> float: @@ -181,9 +181,10 @@ def _set_XShift(self, value: float, flags: enums.SetterFlags = 0): XShift = property(_get_XShift, _set_XShift) # type: float """ - Shift X property values (in/out) by this amount of offset. Default = 0. Does not change original definition of arrays. + Shift X property values (in/out) by this amount of offset. Does not change original definition of arrays. - DSS property name: `XShift`, DSS property index: 10. + Name: `XShift` + Default: 0.0 """ def _get_YShift(self) -> float: @@ -194,9 +195,10 @@ def _set_YShift(self, value: float, flags: enums.SetterFlags = 0): YShift = property(_get_YShift, _set_YShift) # type: float """ - Shift Y property values (in/out) by this amount of offset. Default = 0. Does not change original definition of arrays. + Shift Y property values (in/out) by this amount of offset. Does not change original definition of arrays. - DSS property name: `YShift`, DSS property index: 11. + Name: `YShift` + Default: 0.0 """ def _get_XScale(self) -> float: @@ -207,9 +209,10 @@ def _set_XScale(self, value: float, flags: enums.SetterFlags = 0): XScale = property(_get_XScale, _set_XScale) # type: float """ - Scale X property values (in/out) by this factor. Default = 1.0. Does not change original definition of arrays. + Scale X property values (in/out) by this factor. Does not change original definition of arrays. - DSS property name: `XScale`, DSS property index: 12. + Name: `XScale` + Default: 1.0 """ def _get_YScale(self) -> float: @@ -220,9 +223,10 @@ def _set_YScale(self, value: float, flags: enums.SetterFlags = 0): YScale = property(_get_YScale, _set_YScale) # type: float """ - Scale Y property values (in/out) by this factor. Default = 1.0. Does not change original definition of arrays. + Scale Y property values (in/out) by this factor. Does not change original definition of arrays. - DSS property name: `YScale`, DSS property index: 13. + Name: `YScale` + Default: 1.0 """ def Like(self, value: AnyStr): @@ -231,7 +235,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 14. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(14, value) @@ -289,7 +295,7 @@ def _set_NPts(self, value: Union[int, Int32Array], flags: enums.SetterFlags = 0) """ Max number of points to expect in curve. This could get reset to the actual number of points defined if less than specified. - DSS property name: `NPts`, DSS property index: 1. + Name: `NPts` """ def _get_YArray(self) -> List[Float64Array]: @@ -310,7 +316,7 @@ def _set_YArray(self, value: Union[Float64Array, List[Float64Array]], flags: enu Note: this property will reset Npts to a smaller value if the number of values in the files are fewer. - DSS property name: `YArray`, DSS property index: 3. + Name: `YArray` """ def _get_XArray(self) -> List[Float64Array]: @@ -331,7 +337,7 @@ def _set_XArray(self, value: Union[Float64Array, List[Float64Array]], flags: enu Note: this property will reset Npts to a smaller value if the number of values in the files are fewer. - DSS property name: `XArray`, DSS property index: 4. + Name: `XArray` """ def _get_CSVFile(self) -> List[str]: @@ -342,9 +348,9 @@ def _set_CSVFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl CSVFile = property(_get_CSVFile, _set_CSVFile) # type: List[str] """ - Switch input of X-Y curve data to a CSV file containing X, Y points one per line. NOTE: This action may reset the number of points to a lower value. + Switch input of X-Y curve data to a CSV file containing X, Y points one per line. NOTE: This action may reset the number of points to a lower value. - DSS property name: `CSVFile`, DSS property index: 5. + Name: `CSVFile` """ def _get_SngFile(self) -> List[str]: @@ -355,9 +361,9 @@ def _set_SngFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl SngFile = property(_get_SngFile, _set_SngFile) # type: List[str] """ - Switch input of X-Y curve data to a binary file of SINGLES containing X, Y points packed one after another. NOTE: This action may reset the number of points to a lower value. + Switch input of X-Y curve data to a binary file of SINGLES containing X, Y points packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `SngFile`, DSS property index: 6. + Name: `SngFile` """ def _get_DblFile(self) -> List[str]: @@ -368,9 +374,9 @@ def _set_DblFile(self, value: Union[AnyStr, List[AnyStr]], flags: enums.SetterFl DblFile = property(_get_DblFile, _set_DblFile) # type: List[str] """ - Switch input of X-Y curve data to a binary file of DOUBLES containing X, Y points packed one after another. NOTE: This action may reset the number of points to a lower value. + Switch input of X-Y curve data to a binary file of DOUBLES containing X, Y points packed one after another. NOTE: This action may reset the number of points to a lower value. - DSS property name: `DblFile`, DSS property index: 7. + Name: `DblFile` """ def _get_X(self) -> BatchFloat64ArrayProxy: @@ -383,7 +389,7 @@ def _set_X(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ Enter a value and then retrieve the interpolated Y value from the Y property. On input shifted then scaled to original curve. Scaled then shifted on output. - DSS property name: `X`, DSS property index: 8. + Name: `X` """ def _get_Y(self) -> BatchFloat64ArrayProxy: @@ -396,7 +402,7 @@ def _set_Y(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ Enter a value and then retrieve the interpolated X value from the X property. On input shifted then scaled to original curve. Scaled then shifted on output. - DSS property name: `Y`, DSS property index: 9. + Name: `Y` """ def _get_XShift(self) -> BatchFloat64ArrayProxy: @@ -407,9 +413,10 @@ def _set_XShift(self, value: Union[float, Float64Array], flags: enums.SetterFlag XShift = property(_get_XShift, _set_XShift) # type: BatchFloat64ArrayProxy """ - Shift X property values (in/out) by this amount of offset. Default = 0. Does not change original definition of arrays. + Shift X property values (in/out) by this amount of offset. Does not change original definition of arrays. - DSS property name: `XShift`, DSS property index: 10. + Name: `XShift` + Default: 0.0 """ def _get_YShift(self) -> BatchFloat64ArrayProxy: @@ -420,9 +427,10 @@ def _set_YShift(self, value: Union[float, Float64Array], flags: enums.SetterFlag YShift = property(_get_YShift, _set_YShift) # type: BatchFloat64ArrayProxy """ - Shift Y property values (in/out) by this amount of offset. Default = 0. Does not change original definition of arrays. + Shift Y property values (in/out) by this amount of offset. Does not change original definition of arrays. - DSS property name: `YShift`, DSS property index: 11. + Name: `YShift` + Default: 0.0 """ def _get_XScale(self) -> BatchFloat64ArrayProxy: @@ -433,9 +441,10 @@ def _set_XScale(self, value: Union[float, Float64Array], flags: enums.SetterFlag XScale = property(_get_XScale, _set_XScale) # type: BatchFloat64ArrayProxy """ - Scale X property values (in/out) by this factor. Default = 1.0. Does not change original definition of arrays. + Scale X property values (in/out) by this factor. Does not change original definition of arrays. - DSS property name: `XScale`, DSS property index: 12. + Name: `XScale` + Default: 1.0 """ def _get_YScale(self) -> BatchFloat64ArrayProxy: @@ -446,9 +455,10 @@ def _set_YScale(self, value: Union[float, Float64Array], flags: enums.SetterFlag YScale = property(_get_YScale, _set_YScale) # type: BatchFloat64ArrayProxy """ - Scale Y property values (in/out) by this factor. Default = 1.0. Does not change original definition of arrays. + Scale Y property values (in/out) by this factor. Does not change original definition of arrays. - DSS property name: `YScale`, DSS property index: 13. + Name: `YScale` + Default: 1.0 """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -457,7 +467,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 14. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(14, value, flags) diff --git a/altdss/XfmrCode.py b/altdss/XfmrCode.py index c75571f..352f90d 100644 --- a/altdss/XfmrCode.py +++ b/altdss/XfmrCode.py @@ -1,5 +1,5 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from typing import Union, List, AnyStr, Optional, Iterator, TYPE_CHECKING from typing_extensions import TypedDict, Unpack @@ -122,9 +122,10 @@ def _set_Phases(self, value: int, flags: enums.SetterFlags = 0): Phases = property(_get_Phases, _set_Phases) # type: int """ - Number of phases this transformer. Default is 3. + Number of phases this transformer. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Windings(self) -> int: @@ -137,7 +138,7 @@ def _set_Windings(self, value: int, flags: enums.SetterFlags = 0): """ Number of windings, this transformers. (Also is the number of terminals) Default is 2. This property triggers memory allocation for the Transformer and will cause other properties to revert to default values. - DSS property name: `Windings`, DSS property index: 2. + Name: `Windings` """ def _get_pctR(self) -> Float64Array: @@ -150,7 +151,8 @@ def _set_pctR(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Percent resistance this winding. (half of total for a 2-winding). - DSS property name: `%R`, DSS property index: 8. + Name: `%R` + Default: [0.2, 0.2] """ def _get_RNeut(self) -> Float64Array: @@ -161,9 +163,11 @@ def _set_RNeut(self, value: Float64Array, flags: enums.SetterFlags = 0): RNeut = property(_get_RNeut, _set_RNeut) # type: Float64Array """ - Default = -1. Neutral resistance of wye (star)-connected winding in actual ohms.If entered as a negative value, the neutral is assumed to be open, or floating. + Neutral resistance of wye (star)-connected winding in actual ohms. If entered as a negative value, the neutral is assumed to be open, or floating. - DSS property name: `RNeut`, DSS property index: 9. + Name: `RNeut` + Units: Ω + Default: [-1.0, -1.0] """ def _get_XNeut(self) -> Float64Array: @@ -174,9 +178,11 @@ def _set_XNeut(self, value: Float64Array, flags: enums.SetterFlags = 0): XNeut = property(_get_XNeut, _set_XNeut) # type: Float64Array """ - Neutral reactance of wye(star)-connected winding in actual ohms. May be + or -. + Neutral reactance of wye(star)-connected winding in actual ohms. May be positive or negative. - DSS property name: `XNeut`, DSS property index: 10. + Name: `XNeut` + Units: Ω + Default: [0.0, 0.0] """ def _get_Conns(self) -> List[enums.Connection]: @@ -195,13 +201,14 @@ def _set_Conns(self, value: Union[List[Union[int, enums.Connection]], List[AnySt New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye) - DSS property name: `Conns`, DSS property index: 11. + Name: `Conns` + Default: ['Wye', 'Wye'] """ def _get_Conns_str(self) -> List[str]: return self._get_string_array(self._lib.Obj_GetStringArray, self._ptr, 11) - def _set_Conns_str(self, value: AnyStr, flags: enums.SetterFlags = 0): + def _set_Conns_str(self, value: List[AnyStr], flags: enums.SetterFlags = 0): self._set_Conns(value, flags) Conns_str = property(_get_Conns_str, _set_Conns_str) # type: List[str] @@ -211,7 +218,8 @@ def _set_Conns_str(self, value: AnyStr, flags: enums.SetterFlags = 0): New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye) - DSS property name: `Conns`, DSS property index: 11. + Name: `Conns` + Default: ['Wye', 'Wye'] """ def _get_kVs(self) -> Float64Array: @@ -230,7 +238,8 @@ def _set_kVs(self, value: Float64Array, flags: enums.SetterFlags = 0): See kV= property for voltage rules. - DSS property name: `kVs`, DSS property index: 12. + Name: `kVs` + Default: [12.47, 12.47] """ def _get_kVAs(self) -> Float64Array: @@ -243,7 +252,8 @@ def _set_kVAs(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Use this to specify the kVA ratings of all windings at once using an array. - DSS property name: `kVAs`, DSS property index: 13. + Name: `kVAs` + Default: [1000.0, 1000.0] """ def _get_Taps(self) -> Float64Array: @@ -256,7 +266,8 @@ def _set_Taps(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Use this to specify the normal p.u. tap of all windings at once using an array. - DSS property name: `Taps`, DSS property index: 14. + Name: `Taps` + Default: [1.0, 1.0] """ def _get_XHL(self) -> float: @@ -269,7 +280,7 @@ def _set_XHL(self, value: float, flags: enums.SetterFlags = 0): """ Use this to specify the percent reactance, H-L (winding 1 to winding 2). Use for 2- or 3-winding transformers. On the kva base of winding 1. - DSS property name: `XHL`, DSS property index: 15. + Name: `XHL` """ def _get_XHT(self) -> float: @@ -282,7 +293,7 @@ def _set_XHT(self, value: float, flags: enums.SetterFlags = 0): """ Use this to specify the percent reactance, H-T (winding 1 to winding 3). Use for 3-winding transformers only. On the kVA base of winding 1. - DSS property name: `XHT`, DSS property index: 16. + Name: `XHT` """ def _get_XLT(self) -> float: @@ -295,7 +306,7 @@ def _set_XLT(self, value: float, flags: enums.SetterFlags = 0): """ Use this to specify the percent reactance, L-T (winding 2 to winding 3). Use for 3-winding transformers only. On the kVA base of winding 1. - DSS property name: `XLT`, DSS property index: 17. + Name: `XLT` """ def _get_XSCArray(self) -> Float64Array: @@ -312,7 +323,7 @@ def _set_XSCArray(self, value: Float64Array, flags: enums.SetterFlags = 0): There will be n(n-1)/2 values, where n=number of windings. - DSS property name: `XSCArray`, DSS property index: 18. + Name: `XSCArray` """ def _get_Thermal(self) -> float: @@ -323,9 +334,13 @@ def _set_Thermal(self, value: float, flags: enums.SetterFlags = 0): Thermal = property(_get_Thermal, _set_Thermal) # type: float """ - Thermal time constant of the transformer in hours. Typically about 2. + Thermal time constant of the transformer. Typically about 2. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `Thermal`, DSS property index: 19. + Name: `Thermal` + Units: hour + Default: 2.0 """ def _get_n(self) -> float: @@ -338,7 +353,10 @@ def _set_n(self, value: float, flags: enums.SetterFlags = 0): """ n Exponent for thermal properties in IEEE C57. Typically 0.8. - DSS property name: `n`, DSS property index: 20. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `n` + Default: 0.8 """ def _get_m(self) -> float: @@ -351,7 +369,10 @@ def _set_m(self, value: float, flags: enums.SetterFlags = 0): """ m Exponent for thermal properties in IEEE C57. Typically 0.9 - 1.0 - DSS property name: `m`, DSS property index: 21. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `m` + Default: 0.8 """ def _get_FLRise(self) -> float: @@ -362,9 +383,13 @@ def _set_FLRise(self, value: float, flags: enums.SetterFlags = 0): FLRise = property(_get_FLRise, _set_FLRise) # type: float """ - Temperature rise, deg C, for full load. Default is 65. + Temperature rise for full load. - DSS property name: `FLRise`, DSS property index: 22. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `FLRise` + Units: °C + Default: 65.0 """ def _get_HSRise(self) -> float: @@ -375,9 +400,13 @@ def _set_HSRise(self, value: float, flags: enums.SetterFlags = 0): HSRise = property(_get_HSRise, _set_HSRise) # type: float """ - Hot spot temperature rise, deg C. Default is 15. + Hot spot temperature rise. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `HSRise`, DSS property index: 23. + Name: `HSRise` + Units: °C + Default: 15.0 """ def _get_pctLoadLoss(self) -> float: @@ -390,7 +419,8 @@ def _set_pctLoadLoss(self, value: float, flags: enums.SetterFlags = 0): """ Percent load loss at full load. The %R of the High and Low windings (1 and 2) are adjusted to agree at rated kVA loading. - DSS property name: `%LoadLoss`, DSS property index: 24. + Name: `%LoadLoss` + Default: 0.4 """ def _get_pctNoLoadLoss(self) -> float: @@ -403,7 +433,8 @@ def _set_pctNoLoadLoss(self, value: float, flags: enums.SetterFlags = 0): """ Percent no load losses at rated excitation voltage. Default is 0. Converts to a resistance in parallel with the magnetizing impedance in each winding. - DSS property name: `%NoLoadLoss`, DSS property index: 25. + Name: `%NoLoadLoss` + Default: 0.0 """ def _get_NormHkVA(self) -> float: @@ -416,7 +447,8 @@ def _set_NormHkVA(self, value: float, flags: enums.SetterFlags = 0): """ Normal maximum kVA rating of H winding (winding 1). Usually 100% - 110% of maximum nameplate rating, depending on load shape. Defaults to 110% of kVA rating of Winding 1. - DSS property name: `NormHkVA`, DSS property index: 26. + Name: `NormHkVA` + Units: kVA """ def _get_EmergHkVA(self) -> float: @@ -429,7 +461,8 @@ def _set_EmergHkVA(self, value: float, flags: enums.SetterFlags = 0): """ Emergency (contingency) kVA rating of H winding (winding 1). Usually 140% - 150% of maximum nameplate rating, depending on load shape. Defaults to 150% of kVA rating of Winding 1. - DSS property name: `EmergHkVA`, DSS property index: 27. + Name: `EmergHkVA` + Units: kVA """ def _get_MaxTap(self) -> Float64Array: @@ -440,9 +473,10 @@ def _set_MaxTap(self, value: Float64Array, flags: enums.SetterFlags = 0): MaxTap = property(_get_MaxTap, _set_MaxTap) # type: Float64Array """ - Max per unit tap for the active winding. Default is 1.10 + Max per unit tap for the active winding. - DSS property name: `MaxTap`, DSS property index: 28. + Name: `MaxTap` + Default: [1.1, 1.1] """ def _get_MinTap(self) -> Float64Array: @@ -453,9 +487,10 @@ def _set_MinTap(self, value: Float64Array, flags: enums.SetterFlags = 0): MinTap = property(_get_MinTap, _set_MinTap) # type: Float64Array """ - Min per unit tap for the active winding. Default is 0.90 + Min per unit tap for the active winding. - DSS property name: `MinTap`, DSS property index: 29. + Name: `MinTap` + Default: [0.9, 0.9] """ def _get_NumTaps(self) -> Int32Array: @@ -468,7 +503,8 @@ def _set_NumTaps(self, value: Int32Array, flags: enums.SetterFlags = 0): """ Total number of taps between min and max tap. Default is 32. - DSS property name: `NumTaps`, DSS property index: 30. + Name: `NumTaps` + Default: [32, 32] """ def _get_pctIMag(self) -> float: @@ -479,9 +515,10 @@ def _set_pctIMag(self, value: float, flags: enums.SetterFlags = 0): pctIMag = property(_get_pctIMag, _set_pctIMag) # type: float """ - Percent magnetizing current. Default=0.0. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". + Percent magnetizing current. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". - DSS property name: `%IMag`, DSS property index: 31. + Name: `%IMag` + Default: 0.0 """ def _get_ppm_Antifloat(self) -> float: @@ -494,7 +531,8 @@ def _set_ppm_Antifloat(self, value: float, flags: enums.SetterFlags = 0): """ Default=1 ppm. Parts per million of transformer winding VA rating connected to ground to protect against accidentally floating a winding without a reference. If positive then the effect is adding a very large reactance to ground. If negative, then a capacitor. - DSS property name: `ppm_Antifloat`, DSS property index: 32. + Name: `ppm_Antifloat` + Default: 1.0 """ def _get_pctRs(self) -> Float64Array: @@ -509,7 +547,8 @@ def _set_pctRs(self, value: Float64Array, flags: enums.SetterFlags = 0): New Transformer.T1 buses="Hibus, lowbus" ~ %Rs=(0.2 0.3) - DSS property name: `%Rs`, DSS property index: 33. + Name: `%Rs` + Default: [0.2, 0.2] """ def _get_X12(self) -> float: @@ -522,7 +561,8 @@ def _set_X12(self, value: float, flags: enums.SetterFlags = 0): """ Alternative to XHL for specifying the percent reactance from winding 1 to winding 2. Use for 2- or 3-winding transformers. Percent on the kVA base of winding 1. - DSS property name: `X12`, DSS property index: 34. + Name: `X12` + Default: 7.000000000000001 """ def _get_X13(self) -> float: @@ -535,7 +575,8 @@ def _set_X13(self, value: float, flags: enums.SetterFlags = 0): """ Alternative to XHT for specifying the percent reactance from winding 1 to winding 3. Use for 3-winding transformers only. Percent on the kVA base of winding 1. - DSS property name: `X13`, DSS property index: 35. + Name: `X13` + Default: 35.0 """ def _get_X23(self) -> float: @@ -548,7 +589,8 @@ def _set_X23(self, value: float, flags: enums.SetterFlags = 0): """ Alternative to XLT for specifying the percent reactance from winding 2 to winding 3.Use for 3-winding transformers only. Percent on the kVA base of winding 1. - DSS property name: `X23`, DSS property index: 36. + Name: `X23` + Default: 30.0 """ def _get_RDCOhms(self) -> Float64Array: @@ -561,7 +603,8 @@ def _set_RDCOhms(self, value: Float64Array, flags: enums.SetterFlags = 0): """ Winding dc resistance in OHMS. Useful for GIC analysis. From transformer test report. Defaults to 85% of %R property - DSS property name: `RDCOhms`, DSS property index: 37. + Name: `RDCOhms` + Default: [0.26435153000000006, 0.26435153000000006] """ def _get_Seasons(self) -> int: @@ -572,9 +615,9 @@ def _set_Seasons(self, value: int, flags: enums.SetterFlags = 0): Seasons = property(_get_Seasons, _set_Seasons) # type: int """ - Defines the number of ratings to be defined for the transfomer, to be used only when defining seasonal ratings using the "Ratings" property. + Defines the number of ratings to be defined for the transformer, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 38. + Name: `Seasons` """ def _get_Ratings(self) -> Float64Array: @@ -588,7 +631,8 @@ def _set_Ratings(self, value: Float64Array, flags: enums.SetterFlags = 0): An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in transformers. - DSS property name: `Ratings`, DSS property index: 39. + Name: `Ratings` + Default: [600.0] """ def Like(self, value: AnyStr): @@ -597,7 +641,9 @@ def Like(self, value: AnyStr): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 40. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_string_o(40, value) @@ -675,9 +721,10 @@ def _set_Phases(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Phases = property(_get_Phases, _set_Phases) # type: BatchInt32ArrayProxy """ - Number of phases this transformer. Default is 3. + Number of phases this transformer. - DSS property name: `Phases`, DSS property index: 1. + Name: `Phases` + Default: 3 """ def _get_Windings(self) -> BatchInt32ArrayProxy: @@ -690,7 +737,7 @@ def _set_Windings(self, value: Union[int, Int32Array], flags: enums.SetterFlags """ Number of windings, this transformers. (Also is the number of terminals) Default is 2. This property triggers memory allocation for the Transformer and will cause other properties to revert to default values. - DSS property name: `Windings`, DSS property index: 2. + Name: `Windings` """ def _get_pctR(self) -> List[Float64Array]: @@ -706,7 +753,8 @@ def _set_pctR(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Percent resistance this winding. (half of total for a 2-winding). - DSS property name: `%R`, DSS property index: 8. + Name: `%R` + Default: [0.2, 0.2] """ def _get_RNeut(self) -> List[Float64Array]: @@ -720,9 +768,11 @@ def _set_RNeut(self, value: Union[Float64Array, List[Float64Array]], flags: enum RNeut = property(_get_RNeut, _set_RNeut) # type: List[Float64Array] """ - Default = -1. Neutral resistance of wye (star)-connected winding in actual ohms.If entered as a negative value, the neutral is assumed to be open, or floating. + Neutral resistance of wye (star)-connected winding in actual ohms. If entered as a negative value, the neutral is assumed to be open, or floating. - DSS property name: `RNeut`, DSS property index: 9. + Name: `RNeut` + Units: Ω + Default: [-1.0, -1.0] """ def _get_XNeut(self) -> List[Float64Array]: @@ -736,9 +786,11 @@ def _set_XNeut(self, value: Union[Float64Array, List[Float64Array]], flags: enum XNeut = property(_get_XNeut, _set_XNeut) # type: List[Float64Array] """ - Neutral reactance of wye(star)-connected winding in actual ohms. May be + or -. + Neutral reactance of wye(star)-connected winding in actual ohms. May be positive or negative. - DSS property name: `XNeut`, DSS property index: 10. + Name: `XNeut` + Units: Ω + Default: [0.0, 0.0] """ def _get_Conns(self) -> List[Int32Array]: @@ -765,7 +817,8 @@ def _set_Conns(self, value: Union[List[Union[int, enums.Connection]], List[AnySt New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye) - DSS property name: `Conns`, DSS property index: 11. + Name: `Conns` + Default: ['Wye', 'Wye'] """ def _get_Conns_str(self) -> List[List[str]]: @@ -781,7 +834,8 @@ def _set_Conns_str(self, value: AnyStr, flags: enums.SetterFlags = 0): New Transformer.T1 buses="Hibus, lowbus" ~ conns=(delta, wye) - DSS property name: `Conns`, DSS property index: 11. + Name: `Conns` + Default: ['Wye', 'Wye'] """ def _get_kVs(self) -> List[Float64Array]: @@ -803,7 +857,8 @@ def _set_kVs(self, value: Union[Float64Array, List[Float64Array]], flags: enums. See kV= property for voltage rules. - DSS property name: `kVs`, DSS property index: 12. + Name: `kVs` + Default: [12.47, 12.47] """ def _get_kVAs(self) -> List[Float64Array]: @@ -819,7 +874,8 @@ def _set_kVAs(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Use this to specify the kVA ratings of all windings at once using an array. - DSS property name: `kVAs`, DSS property index: 13. + Name: `kVAs` + Default: [1000.0, 1000.0] """ def _get_Taps(self) -> List[Float64Array]: @@ -835,7 +891,8 @@ def _set_Taps(self, value: Union[Float64Array, List[Float64Array]], flags: enums """ Use this to specify the normal p.u. tap of all windings at once using an array. - DSS property name: `Taps`, DSS property index: 14. + Name: `Taps` + Default: [1.0, 1.0] """ def _get_XHL(self) -> BatchFloat64ArrayProxy: @@ -848,7 +905,7 @@ def _set_XHL(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Use this to specify the percent reactance, H-L (winding 1 to winding 2). Use for 2- or 3-winding transformers. On the kva base of winding 1. - DSS property name: `XHL`, DSS property index: 15. + Name: `XHL` """ def _get_XHT(self) -> BatchFloat64ArrayProxy: @@ -861,7 +918,7 @@ def _set_XHT(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Use this to specify the percent reactance, H-T (winding 1 to winding 3). Use for 3-winding transformers only. On the kVA base of winding 1. - DSS property name: `XHT`, DSS property index: 16. + Name: `XHT` """ def _get_XLT(self) -> BatchFloat64ArrayProxy: @@ -874,7 +931,7 @@ def _set_XLT(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Use this to specify the percent reactance, L-T (winding 2 to winding 3). Use for 3-winding transformers only. On the kVA base of winding 1. - DSS property name: `XLT`, DSS property index: 17. + Name: `XLT` """ def _get_XSCArray(self) -> List[Float64Array]: @@ -894,7 +951,7 @@ def _set_XSCArray(self, value: Union[Float64Array, List[Float64Array]], flags: e There will be n(n-1)/2 values, where n=number of windings. - DSS property name: `XSCArray`, DSS property index: 18. + Name: `XSCArray` """ def _get_Thermal(self) -> BatchFloat64ArrayProxy: @@ -905,9 +962,13 @@ def _set_Thermal(self, value: Union[float, Float64Array], flags: enums.SetterFla Thermal = property(_get_Thermal, _set_Thermal) # type: BatchFloat64ArrayProxy """ - Thermal time constant of the transformer in hours. Typically about 2. + Thermal time constant of the transformer. Typically about 2. - DSS property name: `Thermal`, DSS property index: 19. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `Thermal` + Units: hour + Default: 2.0 """ def _get_n(self) -> BatchFloat64ArrayProxy: @@ -920,7 +981,10 @@ def _set_n(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ n Exponent for thermal properties in IEEE C57. Typically 0.8. - DSS property name: `n`, DSS property index: 20. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `n` + Default: 0.8 """ def _get_m(self) -> BatchFloat64ArrayProxy: @@ -933,7 +997,10 @@ def _set_m(self, value: Union[float, Float64Array], flags: enums.SetterFlags = 0 """ m Exponent for thermal properties in IEEE C57. Typically 0.9 - 1.0 - DSS property name: `m`, DSS property index: 21. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `m` + Default: 0.8 """ def _get_FLRise(self) -> BatchFloat64ArrayProxy: @@ -944,9 +1011,13 @@ def _set_FLRise(self, value: Union[float, Float64Array], flags: enums.SetterFlag FLRise = property(_get_FLRise, _set_FLRise) # type: BatchFloat64ArrayProxy """ - Temperature rise, deg C, for full load. Default is 65. + Temperature rise for full load. - DSS property name: `FLRise`, DSS property index: 22. + **Unused** (unused internally by the models, but can be used to transport data) + + Name: `FLRise` + Units: °C + Default: 65.0 """ def _get_HSRise(self) -> BatchFloat64ArrayProxy: @@ -957,9 +1028,13 @@ def _set_HSRise(self, value: Union[float, Float64Array], flags: enums.SetterFlag HSRise = property(_get_HSRise, _set_HSRise) # type: BatchFloat64ArrayProxy """ - Hot spot temperature rise, deg C. Default is 15. + Hot spot temperature rise. + + **Unused** (unused internally by the models, but can be used to transport data) - DSS property name: `HSRise`, DSS property index: 23. + Name: `HSRise` + Units: °C + Default: 15.0 """ def _get_pctLoadLoss(self) -> BatchFloat64ArrayProxy: @@ -972,7 +1047,8 @@ def _set_pctLoadLoss(self, value: Union[float, Float64Array], flags: enums.Sette """ Percent load loss at full load. The %R of the High and Low windings (1 and 2) are adjusted to agree at rated kVA loading. - DSS property name: `%LoadLoss`, DSS property index: 24. + Name: `%LoadLoss` + Default: 0.4 """ def _get_pctNoLoadLoss(self) -> BatchFloat64ArrayProxy: @@ -985,7 +1061,8 @@ def _set_pctNoLoadLoss(self, value: Union[float, Float64Array], flags: enums.Set """ Percent no load losses at rated excitation voltage. Default is 0. Converts to a resistance in parallel with the magnetizing impedance in each winding. - DSS property name: `%NoLoadLoss`, DSS property index: 25. + Name: `%NoLoadLoss` + Default: 0.0 """ def _get_NormHkVA(self) -> BatchFloat64ArrayProxy: @@ -998,7 +1075,8 @@ def _set_NormHkVA(self, value: Union[float, Float64Array], flags: enums.SetterFl """ Normal maximum kVA rating of H winding (winding 1). Usually 100% - 110% of maximum nameplate rating, depending on load shape. Defaults to 110% of kVA rating of Winding 1. - DSS property name: `NormHkVA`, DSS property index: 26. + Name: `NormHkVA` + Units: kVA """ def _get_EmergHkVA(self) -> BatchFloat64ArrayProxy: @@ -1011,7 +1089,8 @@ def _set_EmergHkVA(self, value: Union[float, Float64Array], flags: enums.SetterF """ Emergency (contingency) kVA rating of H winding (winding 1). Usually 140% - 150% of maximum nameplate rating, depending on load shape. Defaults to 150% of kVA rating of Winding 1. - DSS property name: `EmergHkVA`, DSS property index: 27. + Name: `EmergHkVA` + Units: kVA """ def _get_MaxTap(self) -> List[Float64Array]: @@ -1025,9 +1104,10 @@ def _set_MaxTap(self, value: Union[Float64Array, List[Float64Array]], flags: enu MaxTap = property(_get_MaxTap, _set_MaxTap) # type: List[Float64Array] """ - Max per unit tap for the active winding. Default is 1.10 + Max per unit tap for the active winding. - DSS property name: `MaxTap`, DSS property index: 28. + Name: `MaxTap` + Default: [1.1, 1.1] """ def _get_MinTap(self) -> List[Float64Array]: @@ -1041,9 +1121,10 @@ def _set_MinTap(self, value: Union[Float64Array, List[Float64Array]], flags: enu MinTap = property(_get_MinTap, _set_MinTap) # type: List[Float64Array] """ - Min per unit tap for the active winding. Default is 0.90 + Min per unit tap for the active winding. - DSS property name: `MinTap`, DSS property index: 29. + Name: `MinTap` + Default: [0.9, 0.9] """ def _get_NumTaps(self) -> List[Int32Array]: @@ -1059,7 +1140,8 @@ def _set_NumTaps(self, value: Union[Int32Array, List[Int32Array]], flags: enums. """ Total number of taps between min and max tap. Default is 32. - DSS property name: `NumTaps`, DSS property index: 30. + Name: `NumTaps` + Default: [32, 32] """ def _get_pctIMag(self) -> BatchFloat64ArrayProxy: @@ -1070,9 +1152,10 @@ def _set_pctIMag(self, value: Union[float, Float64Array], flags: enums.SetterFla pctIMag = property(_get_pctIMag, _set_pctIMag) # type: BatchFloat64ArrayProxy """ - Percent magnetizing current. Default=0.0. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". + Percent magnetizing current. Magnetizing branch is in parallel with windings in each phase. Also, see "ppm_antifloat". - DSS property name: `%IMag`, DSS property index: 31. + Name: `%IMag` + Default: 0.0 """ def _get_ppm_Antifloat(self) -> BatchFloat64ArrayProxy: @@ -1085,7 +1168,8 @@ def _set_ppm_Antifloat(self, value: Union[float, Float64Array], flags: enums.Set """ Default=1 ppm. Parts per million of transformer winding VA rating connected to ground to protect against accidentally floating a winding without a reference. If positive then the effect is adding a very large reactance to ground. If negative, then a capacitor. - DSS property name: `ppm_Antifloat`, DSS property index: 32. + Name: `ppm_Antifloat` + Default: 1.0 """ def _get_pctRs(self) -> List[Float64Array]: @@ -1103,7 +1187,8 @@ def _set_pctRs(self, value: Union[Float64Array, List[Float64Array]], flags: enum New Transformer.T1 buses="Hibus, lowbus" ~ %Rs=(0.2 0.3) - DSS property name: `%Rs`, DSS property index: 33. + Name: `%Rs` + Default: [0.2, 0.2] """ def _get_X12(self) -> BatchFloat64ArrayProxy: @@ -1116,7 +1201,8 @@ def _set_X12(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Alternative to XHL for specifying the percent reactance from winding 1 to winding 2. Use for 2- or 3-winding transformers. Percent on the kVA base of winding 1. - DSS property name: `X12`, DSS property index: 34. + Name: `X12` + Default: 7.000000000000001 """ def _get_X13(self) -> BatchFloat64ArrayProxy: @@ -1129,7 +1215,8 @@ def _set_X13(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Alternative to XHT for specifying the percent reactance from winding 1 to winding 3. Use for 3-winding transformers only. Percent on the kVA base of winding 1. - DSS property name: `X13`, DSS property index: 35. + Name: `X13` + Default: 35.0 """ def _get_X23(self) -> BatchFloat64ArrayProxy: @@ -1142,7 +1229,8 @@ def _set_X23(self, value: Union[float, Float64Array], flags: enums.SetterFlags = """ Alternative to XLT for specifying the percent reactance from winding 2 to winding 3.Use for 3-winding transformers only. Percent on the kVA base of winding 1. - DSS property name: `X23`, DSS property index: 36. + Name: `X23` + Default: 30.0 """ def _get_RDCOhms(self) -> List[Float64Array]: @@ -1158,7 +1246,8 @@ def _set_RDCOhms(self, value: Union[Float64Array, List[Float64Array]], flags: en """ Winding dc resistance in OHMS. Useful for GIC analysis. From transformer test report. Defaults to 85% of %R property - DSS property name: `RDCOhms`, DSS property index: 37. + Name: `RDCOhms` + Default: [0.26435153000000006, 0.26435153000000006] """ def _get_Seasons(self) -> BatchInt32ArrayProxy: @@ -1169,9 +1258,9 @@ def _set_Seasons(self, value: Union[int, Int32Array], flags: enums.SetterFlags = Seasons = property(_get_Seasons, _set_Seasons) # type: BatchInt32ArrayProxy """ - Defines the number of ratings to be defined for the transfomer, to be used only when defining seasonal ratings using the "Ratings" property. + Defines the number of ratings to be defined for the transformer, to be used only when defining seasonal ratings using the "Ratings" property. - DSS property name: `Seasons`, DSS property index: 38. + Name: `Seasons` """ def _get_Ratings(self) -> List[Float64Array]: @@ -1188,7 +1277,8 @@ def _set_Ratings(self, value: Union[Float64Array, List[Float64Array]], flags: en An array of ratings to be used when the seasonal ratings flag is True. It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in transformers. - DSS property name: `Ratings`, DSS property index: 39. + Name: `Ratings` + Default: [600.0] """ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): @@ -1197,7 +1287,9 @@ def Like(self, value: AnyStr, flags: enums.SetterFlags = 0): New Capacitor.C2 like=c1 ... - DSS property name: `Like`, DSS property index: 40. + **Deprecated:** `Like` has been deprecated since at least 2021, see https://sourceforge.net/p/electricdss/discussion/861977/thread/8b59d21eb6/#b57c/f668 + + Name: `Like` """ self._set_batch_string(40, value, flags) diff --git a/altdss/YMatrix.py b/altdss/YMatrix.py index 12acba6..ecc468c 100644 --- a/altdss/YMatrix.py +++ b/altdss/YMatrix.py @@ -6,9 +6,18 @@ from typing import Tuple, List class IYMatrix(Base): + ''' + YMatrix provides access to some lower-level solution aspects. + + Part of this class is ported from the original OpenDSSDirect.DLL back in 2017, but + part is new. Since this is not exposed in the official COM API, it is marked as an extension. + + (**API Extension**) + ''' + __slots__ = [] - def GetCompressedYMatrix(self, factor: bool = True) -> Tuple[ComplexArray, Int32Array, Int32Array]: + def GetCompressedYMatrix(self) -> Tuple[ComplexArray, Int32Array, Int32Array]: '''Return as (data, indices, indptr) that can fed into `scipy.sparse.csc_matrix`''' ffi = self._api_util.ffi @@ -22,51 +31,53 @@ def GetCompressedYMatrix(self, factor: bool = True) -> Tuple[ComplexArray, Int32 RowIdxPtr = ffi.new('int32_t**') cValsPtr = ffi.new('double**') - self._lib.YMatrix_GetCompressedYMatrix(factor, nBus, nNz, ColPtr, RowIdxPtr, cValsPtr) + lib = self._api_util.lib_unpatched # use the raw CFFI version + lib.YMatrix_GetCompressedYMatrix(self._api_util.ctx, True, nBus, nNz, ColPtr, RowIdxPtr, cValsPtr) if not nBus[0] or not nNz[0]: res = None else: # return as (data, indices, indptr) that can fed into scipy.sparse.csc_matrix - res = ( + from scipy.sparse import csc_matrix + return csc_matrix(( np.frombuffer(ffi.buffer(cValsPtr[0], nNz[0] * 16), dtype=complex).copy(), np.frombuffer(ffi.buffer(RowIdxPtr[0], nNz[0] * 4), dtype=np.int32).copy(), np.frombuffer(ffi.buffer(ColPtr[0], (nBus[0] + 1) * 4), dtype=np.int32).copy() - ) + )) - self._lib.DSS_Dispose_PInteger(ColPtr) - self._lib.DSS_Dispose_PInteger(RowIdxPtr) - self._lib.DSS_Dispose_PDouble(cValsPtr) + lib.DSS_Dispose_PInteger(ColPtr) + lib.DSS_Dispose_PInteger(RowIdxPtr) + lib.DSS_Dispose_PDouble(cValsPtr) - self._check_for_error() + self._api_util._check_for_error() return res def ZeroInjCurr(self): - self._check_for_error(self._lib.YMatrix_ZeroInjCurr()) + self._lib.YMatrix_ZeroInjCurr() def GetSourceInjCurrents(self): - self._check_for_error(self._lib.YMatrix_GetSourceInjCurrents()) + self._lib.YMatrix_GetSourceInjCurrents() def GetPCInjCurr(self): - self._check_for_error(self._lib.YMatrix_GetPCInjCurr()) + self._lib.YMatrix_GetPCInjCurr() def BuildYMatrixD(self, BuildOps: int, AllocateVI: bool): - self._check_for_error(self._lib.YMatrix_BuildYMatrixD(BuildOps, AllocateVI)) + self._lib.YMatrix_BuildYMatrixD(BuildOps, AllocateVI) def AddInAuxCurrents(self, SType): - self._check_for_error(self._lib.YMatrix_AddInAuxCurrents(SType)) + self._lib.YMatrix_AddInAuxCurrents(SType) def GetIPointer(self): '''Get access to the internal Current pointer''' IvectorPtr = self._api_util.ffi.new('double**') - self._check_for_error(self._lib.YMatrix_getIpointer(IvectorPtr)) + self._lib.YMatrix_getIpointer(IvectorPtr) return IvectorPtr[0] def GetVPointer(self): '''Get access to the internal Voltage pointer''' VvectorPtr = self._api_util.ffi.new('double**') - self._check_for_error(self._lib.YMatrix_getVpointer(VvectorPtr)) + self._lib.YMatrix_getVpointer(VvectorPtr) return VvectorPtr[0] def SolveSystem(self, NodeV=None) -> int: @@ -78,24 +89,23 @@ def SolveSystem(self, NodeV=None) -> int: else: NodeVPtr = self._api_util.ffi.cast("double *", NodeV.ctypes.data) - result = self._check_for_error(self._lib.YMatrix_SolveSystem(NodeVPtr)) - return result + return self._lib.YMatrix_SolveSystem(NodeVPtr) @property def SystemYChanged(self) -> bool: - return self._check_for_error(self._lib.YMatrix_Get_SystemYChanged() != 0) + return self._lib.YMatrix_Get_SystemYChanged() @SystemYChanged.setter def SystemYChanged(self, value: bool): - self._check_for_error(self._lib.YMatrix_Set_SystemYChanged(value)) + self._lib.YMatrix_Set_SystemYChanged(value) @property def UseAuxCurrents(self) -> bool: - return self._check_for_error(self._lib.YMatrix_Get_UseAuxCurrents() != 0) + return self._lib.YMatrix_Get_UseAuxCurrents() @UseAuxCurrents.setter def UseAuxCurrents(self, value: bool): - self._check_for_error(self._lib.YMatrix_Set_UseAuxCurrents(value)) + self._lib.YMatrix_Set_UseAuxCurrents(value) # for better compatibility with OpenDSSDirect.py getYSparse = GetCompressedYMatrix @@ -112,39 +122,39 @@ def SolverOptions(self, Value: int): def getI(self) -> List[float]: '''Get the data from the internal Current pointer''' IvectorPtr = self.GetIPointer() - return self._api_util.ffi.unpack(IvectorPtr, 2 * (self._check_for_error(self._lib.Circuit_Get_NumNodes() + 1))) + return self._api_util.ffi.unpack(IvectorPtr, 2 * (self._lib.Circuit_Get_NumNodes() + 1)) def getV(self) -> List[float]: '''Get the data from the internal Voltage pointer''' VvectorPtr = self.GetVPointer() - return self._api_util.ffi.unpack(VvectorPtr, 2 * (self._check_for_error(self._lib.Circuit_Get_NumNodes() + 1))) + return self._api_util.ffi.unpack(VvectorPtr, 2 * (self._lib.Circuit_Get_NumNodes() + 1)) def CheckConvergence(self) -> bool: - return self._check_for_error(self._lib.YMatrix_CheckConvergence() != 0) + return self._lib.YMatrix_CheckConvergence() def SetGeneratordQdV(self): - self._check_for_error(self._lib.YMatrix_SetGeneratordQdV()) + self._lib.YMatrix_SetGeneratordQdV() @property def LoadsNeedUpdating(self) -> bool: - return self._check_for_error(self._lib.YMatrix_Get_LoadsNeedUpdating() != 0) + return self._lib.YMatrix_Get_LoadsNeedUpdating() @LoadsNeedUpdating.setter def LoadsNeedUpdating(self, value: bool): - self._check_for_error(self._lib.YMatrix_Set_LoadsNeedUpdating(value)) + self._lib.YMatrix_Set_LoadsNeedUpdating(value) @property def SolutionInitialized(self) -> bool: - return self._check_for_error(self._lib.YMatrix_Get_SolutionInitialized() != 0) + return self._lib.YMatrix_Get_SolutionInitialized() @SolutionInitialized.setter def SolutionInitialized(self, value: bool): - self._check_for_error(self._lib.YMatrix_Set_SolutionInitialized(value)) + self._lib.YMatrix_Set_SolutionInitialized(value) @property def Iteration(self) -> int: - return self._check_for_error(self._lib.YMatrix_Get_Iteration()) + return self._lib.YMatrix_Get_Iteration() @Iteration.setter def Iteration(self, value: int): - self._check_for_error(self._lib.YMatrix_Set_Iteration(value)) + self._lib.YMatrix_Set_Iteration(value) diff --git a/altdss/ZIP.py b/altdss/ZIP.py index 973be6f..ccbb630 100644 --- a/altdss/ZIP.py +++ b/altdss/ZIP.py @@ -3,6 +3,17 @@ from typing import AnyStr, Optional, List class IZIP(Base): + ''' + ZIP allows controlling the ZIP-compressed file functions from AltDSS/DSS C-API. + + It allows opening a ZIP file, and loading circuits directly from it, without requiring extracting the contents to files before reading. + + The implementation provides a specialization which allows more efficient access if the ZIP file is open and reused for many circuits. + Doing so reduces the overhead of the initial opening and indexing of the file contents. + + (**API Extension**) + ''' + __slots__ = [] _columns = [] @@ -14,20 +25,17 @@ def Open(self, FileName: AnyStr): 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) + **(API Extension)** ''' - if not isinstance(FileName, bytes): - FileName = FileName.encode(self._api_util.codec) - - self._check_for_error(self._lib.ZIP_Open(FileName)) + self._lib.ZIP_Open(FileName) def Close(self): ''' Closes the current open ZIP file - (API Extension) + **(API Extension)** ''' - self._check_for_error(self._lib.ZIP_Close()) + self._lib.ZIP_Close() def Redirect(self, FileInZip: AnyStr): ''' @@ -36,29 +44,28 @@ def Redirect(self, FileInZip: AnyStr): be present inside the ZIP, using relative paths. The only exceptions are memory-mapped files. - (API Extension) + **(API Extension)** ''' - if not isinstance(FileInZip, bytes): - FileInZip = FileInZip.encode(self._api_util.codec) - - self._check_for_error(self._lib.ZIP_Redirect(FileInZip)) + self._lib.ZIP_Redirect(FileInZip) def Extract(self, FileName: AnyStr) -> bytes: ''' Extracts the contents of the file "FileName" from the current (open) ZIP file. Returns a byte-string. - (API Extension) + **(API Extension)** ''' api_util = self._api_util if not isinstance(FileName, bytes): FileName = FileName.encode(api_util.codec) - self._check_for_error(self._lib.ZIP_Extract_GR(FileName)) + api_util.lib_unpatched.ZIP_Extract_GR(self._api_util.ctx, FileName) + api_util._check_for_error() ptr, cnt = api_util.gr_int8_pointers return bytes(api_util.ffi.buffer(ptr[0], cnt[0])) - def List(self, regexp: Optional[AnyStr]=None) -> List[str]: + + def List(self, regexp: AnyStr='') -> List[str]: ''' 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. @@ -66,26 +73,20 @@ def List(self, regexp: Optional[AnyStr]=None) -> List[str]: See https://regex.sorokin.engineer/en/latest/regular_expressions.html for information on the expression syntax and options. - (API Extension) + **(API Extension)** ''' if regexp is None or not regexp: - regexp = self._api_util.ffi.NULL - else: - if not isinstance(regexp, bytes): - regexp = regexp.encode(self._api_util.codec) + regexp = b'' - return self._check_for_error(self._get_string_array(self._lib.ZIP_List, regexp)) + return self._lib.ZIP_List(regexp) def Contains(self, Name: AnyStr) -> bool: ''' Check if the given path name is present in the current ZIP file. - (API Extension) + **(API Extension)** ''' - if not isinstance(Name, bytes): - Name = Name.encode(self._api_util.codec) - - return self._check_for_error(self._lib.ZIP_Contains(Name)) != 0 + return self._lib.ZIP_Contains(Name) def __getitem__(self, FileName) -> bytes: return self.Extract(FileName) diff --git a/altdss/common.py b/altdss/common.py index 37c5fd2..9970722 100644 --- a/altdss/common.py +++ b/altdss/common.py @@ -1,4 +1,4 @@ -from dss._cffi_api_util import DSSException, Base, CffiApiUtil +from dss._cffi_api_util import DSSException, Base as SimpleBase, AltDSSAPIUtil try: import pandas as pd @@ -6,6 +6,54 @@ except ModuleNotFoundError: LIST_LIKE = (list, tuple) + +class Base(SimpleBase): + __slots__ = [ + '_get_float64_array', + '_get_float64_gr_array', + '_get_int32_array', + '_get_int32_gr_array', + '_get_int8_array', + '_get_int8_gr_array', + '_get_string_array', + '_get_complex128_array', + '_get_complex128_simple', + '_get_fcomplex128_simple', + '_get_complex128_gr_array', + '_get_complex128_gr_simple', + '_get_fcomplex128_gr_array', + '_get_fcomplex128_array', + '_get_fcomplex128_gr_simple', + '_get_string', + ] + + def __init__(self, api_util): + SimpleBase.__init__(self, api_util) + + # Moved from the old DSS-Python _cffi_api_util, until + # we rework AltDSS-Python to use FastDSS. + lib = self._lib + + self._get_fcomplex128_gr_array = lib.get_fcomplex128_gr_array + self._get_fcomplex128_array = lib.get_fcomplex128_array + self._get_fcomplex128_simple = lib.get_fcomplex128_simple + self._get_fcomplex128_gr_simple = lib.get_fcomplex128_gr_simple + self._get_float64_array = lib.get_float64_array + self._get_float64_gr_array = lib.get_float64_gr_array + self._get_int32_array = lib.get_int32_array + self._get_int32_gr_array = lib.get_int32_gr_array + self._get_int8_array = lib.get_int8_array + self._get_int8_gr_array = lib.get_int8_gr_array + self._get_string_array = lib.get_string_array + + self._get_complex128_array = lib.get_complex128_array + self._get_complex128_simple = lib.get_complex128_simple + self._get_complex128_gr_array = lib.get_complex128_gr_array + self._get_complex128_gr_simple = lib.get_complex128_gr_simple + + self._get_string = api_util.get_string + + class InvalidatedDSSObject: ''' If you see this class somewhere, such as a traceback, it means that the related @@ -16,6 +64,18 @@ class InvalidatedDSSObject: InvalidatedObject = InvalidatedDSSObject() + +class InvalidatedDSSObjectIterator: + ''' + If you see this class somewhere, such as a traceback, it means that the related + iterator was invalidated and is out-of-scope. If you need to store the object + referenced by the iterator, use the Python `copy()` function. + ''' + pass + +InvalidatedObjectIterator = InvalidatedDSSObjectIterator() + + class InvalidatedDSSBus: ''' If you see this class somewhere, such as a traceback, it means that the related @@ -27,6 +87,18 @@ class InvalidatedDSSBus: InvalidatedBus = InvalidatedDSSBus() + +class InvalidatedDSSBusIterator: + ''' + If you see this class somewhere, such as a traceback, it means that the related + bus iterator was invalidated and is out-of-scope. If you need to store the object + referenced by the iterator, use the Python `copy()` function. + ''' + pass + +InvalidatedBusIterator = InvalidatedDSSBusIterator() + + class Edit: ''' Edit is a helper class that makes block-editing DSS properties @@ -54,4 +126,4 @@ def __exit__(self, exc_type, exc_val, exc_tb): self.obj_or_batch.end_edit(self.num_changes) -__all__ = ('DSSException', 'Base', 'CffiApiUtil', 'LIST_LIKE', 'Edit') \ No newline at end of file +__all__ = ('DSSException', 'Base', 'AltDSSAPIUtil', 'LIST_LIKE', 'Edit') \ No newline at end of file diff --git a/altdss/enums.py b/altdss/enums.py index c19aca0..c0797b3 100644 --- a/altdss/enums.py +++ b/altdss/enums.py @@ -1,8 +1,8 @@ -# Copyright (c) 2021-2024 Paulo Meira -# Copyright (c) 2021-2024 DSS-Extensions contributors +# Copyright (c) 2021-2026 Paulo Meira +# Copyright (c) 2021-2026 DSS-Extensions contributors from __future__ import annotations from enum import IntEnum, IntFlag -from dss_python_backend.enums import SetterFlags +from dss_python_backend.enums import SetterFlags, DSSObjectFlags, BatchOperation # Global enumerations @@ -177,6 +177,7 @@ class SolutionAlgorithm(IntEnum): """Solution Algorithm (DSS enumeration)""" Normal = 0 # Normal Newton = 1 # Newton + NCIM = 2 # NCIM class CircuitModel(IntEnum): @@ -216,6 +217,21 @@ class PlotProfilePhases(IntEnum): LLPrimary = -6 # LLPrimary +class AltDSSCompatFlags(IntEnum): + """AltDSSCompatFlags (DSS enumeration)""" + NoSolverFloatChecks = 1 # NoSolverFloatChecks + BadPrecision = 2 # BadPrecision + InvControl9611 = 4 # InvControl9611 + SaveCalcVoltageBases = 8 # SaveCalcVoltageBases + ActiveLine = 16 # ActiveLine + NoPropertyTracking = 32 # NoPropertyTracking + SkipSideEffects = 64 # SkipSideEffects + MonitorHeader = 128 # MonitorHeader + InvControlDeltaV = 256 # InvControlDeltaV + PermissiveProperties = 512 # PermissiveProperties + LegacySMARTDS = 2048 # LegacySMARTDS + + # Class-specific enumerations @@ -256,8 +272,8 @@ class LoadModel(IntEnum): Motor = 3 # Motor (constant P, quadratic Q) CVR = 4 # CVR (linear P, quadratic Q) ConstantI = 5 # Constant I - ConstantP_fixedQ = 6 # Constant P, fixed Q - ConstantP_fixedX = 7 # Constant P, fixed X + ConstantP_FixedQ = 6 # Constant P, fixed Q + ConstantP_FixedX = 7 # Constant P, fixed X ZIPV = 8 # ZIPV class LoadStatus(IntEnum): @@ -288,10 +304,10 @@ class GeneratorModel(IntEnum): ConstantPQ = 1 # Constant PQ ConstantZ = 2 # Constant Z ConstantPV = 3 # Constant P|V| - ConstantP_fixedQ = 4 # Constant P, fixed Q - ConstantP_fixedX = 5 # Constant P, fixed X - Usermodel = 6 # User model - Approximateinvertermodel = 7 # Approximate inverter model + ConstantP_FixedQ = 4 # Constant P, Fixed Q + ConstantP_FixedX = 5 # Constant P, Fixed X + UserModel = 6 # User Model + ApproxInverter = 7 # Approximate Inverter Model class GeneratorDispatchMode(IntEnum): """Generator: Dispatch Mode (DSS enumeration)""" @@ -305,6 +321,20 @@ class GeneratorStatus(IntEnum): Fixed = 1 # Fixed +class WindGenModel(IntEnum): + """WindGen: Model (DSS enumeration)""" + ConstantPQ = 1 # Constant PQ + ConstantZ = 2 # Constant Z + ConstantP_FixedQ = 4 # Constant P, fixed Q + ConstantP_FixedX = 5 # Constant P, fixed X + +class WindGenQMode(IntEnum): + """WindGen: Q Mode (DSS enumeration)""" + Q = 0 # Q + PF = 1 # PF + VoltVar = 2 # VoltVar + + class StorageState(IntEnum): """Storage: State (DSS enumeration)""" Charging = -1 # Charging @@ -322,20 +352,20 @@ class StorageDispatchMode(IntEnum): class StorageControllerDischargeMode(IntEnum): """StorageController: Discharge Mode (DSS enumeration)""" - Peakshave = 5 # Peakshave + PeakShave = 5 # PeakShave Follow = 1 # Follow Support = 3 # Support - Loadshape = 2 # Loadshape + LoadShape = 2 # LoadShape Time = 4 # Time Schedule = 6 # Schedule - I_Peakshave = 8 # I-Peakshave + IPeakShave = 8 # I-PeakShave class StorageControllerChargeMode(IntEnum): """StorageController: Charge Mode (DSS enumeration)""" - Loadshape = 2 # Loadshape + LoadShape = 2 # LoadShape Time = 4 # Time - PeakshaveLow = 7 # PeakshaveLow - I_PeakshaveLow = 9 # I-PeakshaveLow + PeakShaveLow = 7 # PeakShaveLow + IPeakShaveLow = 9 # I-PeakShaveLow class RelayType(IntEnum): @@ -343,66 +373,91 @@ class RelayType(IntEnum): Current = 0 # Current Voltage = 1 # Voltage ReversePower = 3 # ReversePower - relay46 = 4 # 46 - relay47 = 5 # 47 + F46 = 4 # 46 + F47 = 5 # 47 Generic = 6 # Generic Distance = 7 # Distance TD21 = 8 # TD21 DOC = 9 # DOC + class RelayAction(IntEnum): """Relay: Action (DSS enumeration)""" - close = 2 # close - open = 1 # open - trip = 1 # trip + Close = 2 # Close + Open = 1 # Open + Trip = 1 # Trip + close = 2 # Close -- **deprecated synonym** + open = 1 # Open -- **deprecated synonym** + trip = 1 # Trip -- **deprecated synonym** + class RelayState(IntEnum): """Relay: State (DSS enumeration)""" - closed = 2 # closed - open = 1 # open - trip = 1 # trip + Closed = 2 # Closed + Open = 1 # Open + Trip = 1 # Trip + closed = 2 # Closed -- **deprecated synonym** + open = 1 # Open -- **deprecated synonym** + trip = 1 # Trip -- **deprecated synonym** class RecloserAction(IntEnum): """Recloser: Action (DSS enumeration)""" - close = 2 # close - open = 1 # open - trip = 1 # trip + Close = 2 # Close + Open = 1 # Open + Trip = 1 # Trip + close = 2 # Close -- **deprecated synonym** + open = 1 # Open -- **deprecated synonym** + trip = 1 # Trip -- **deprecated synonym** + class RecloserState(IntEnum): """Recloser: State (DSS enumeration)""" - closed = 2 # closed - open = 1 # open - trip = 1 # trip + Closed = 2 # Closed + Open = 1 # Open + Trip = 1 # Trip + closed = 2 # Closed -- **deprecated synonym** + open = 1 # Open -- **deprecated synonym** + trip = 1 # Trip -- **deprecated synonym** class FuseAction(IntEnum): """Fuse: Action (DSS enumeration)""" - close = 2 # close - open = 1 # open + Close = 2 # Close + Open = 1 # Open + close = 2 # Close -- **deprecated synonym** + open = 1 # Open -- **deprecated synonym** + class FuseState(IntEnum): """Fuse: State (DSS enumeration)""" - closed = 2 # closed - open = 1 # open + Closed = 2 # Closed + Open = 1 # Open + closed = 2 # Closed -- **deprecated synonym** + open = 1 # Open -- **deprecated synonym** class SwtControlAction(IntEnum): """SwtControl: Action (DSS enumeration)""" - close = 2 # close - open = 1 # open + Close = 2 # Close + Open = 1 # Open + close = 2 # Close -- **deprecated synonym** + open = 1 # Open -- **deprecated synonym** + class SwtControlState(IntEnum): """SwtControl: State (DSS enumeration)""" - closed = 2 # closed - open = 1 # open + Closed = 2 # Closed + Open = 1 # Open + closed = 2 # Closed -- **deprecated synonym** + open = 1 # Open -- **deprecated synonym** class PVSystemModel(IntEnum): """PVSystem: Model (DSS enumeration)""" ConstantP_PF = 1 # Constant P, PF ConstantY = 2 # Constant Y - Usermodel = 3 # User model + UserModel = 3 # User model class UPFCMode(IntEnum): @@ -429,12 +484,9 @@ class IndMach012SlipOption(IntEnum): class AutoTransConnection(IntEnum): """AutoTrans: Connection (DSS enumeration)""" - wye = 0 # wye - delta = 1 # delta - series = 2 # series - y = 0 # y - ln = 0 # ln - ll = 1 # ll + Wye = 0 # wye + Delta = 1 # delta + Series = 2 # series class RegControlPhaseSelection(IntEnum): @@ -523,3 +575,9 @@ class EnergyMeterAction(IntEnum): ZoneDump = 5 # ZoneDump +class FMonitorAction(IntEnum): + """FMonitor: Action (DSS enumeration)""" + Clear = 0 # Clear + Reset = 0 # Reset + + diff --git a/ci/build_linux.sh b/ci/build_linux.sh index d82b182..a3c0389 100644 --- a/ci/build_linux.sh +++ b/ci/build_linux.sh @@ -1,7 +1,8 @@ set -e -x -export PATH=/opt/python/cp39-cp39/bin/:$PATH +export PATH=/opt/python/cp311-cp311/bin/:$PATH cd altdss-python python3 -m pip install --upgrade pip wheel +python3 -m pip install 'virtualenv<21' python3 setup.py --quiet bdist_wheel --py-limited-api cp37 --dist-dir="../artifacts" cd .. diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index a599eed..52c5fd4 100644 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -1,5 +1,5 @@ mkdir -p artifacts cd altdss-python $PYTHON -m pip install --upgrade pip setuptools -$PYTHON -m pip install cffi wheel +$PYTHON -m pip install cffi wheel 'virtualenv<21' $PYTHON setup.py --quiet bdist_wheel --py-limited-api cp37 --dist-dir=$ARTIFACTS_FOLDER diff --git a/docs/examples/Batches.ipynb b/docs/examples/Batches.ipynb index 6c86f61..da7dfac 100644 --- a/docs/examples/Batches.ipynb +++ b/docs/examples/Batches.ipynb @@ -765,7 +765,7 @@ } ], "source": [ - "loads_300A = altdss.Load.batch(idx=np.where(altdss.Load.MaxCurrent(-1) > 300))\n", + "loads_300A = altdss.Load.batch(idx=np.where(altdss.Load.MaxCurrent() > 300))\n", "loads_300A.Name" ] }, @@ -864,6 +864,106 @@ "loads_300A()" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Using element indices is simple if the batch is the base collection for an object type, but not straightforward when the batch is already a filtered selection of objects. Passing object names, existing Python objects, or using DSS properties are alternatives for more complex situations." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Batches from object names\n", + "\n", + "Sometimes the target names are an input of a tool, or the names are selected outside the DSS engine as part of another process." + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [], + "source": [ + "d1_loadnames = [n for n in altdss.Load.Name if n.endswith('d1')]\n", + "d1_batch_from_names = altdss.Load.batch(names=d1_loadnames)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Batches from existing objects\n", + "\n", + "If the filter options as exemplified in the following sections do not cover a more complex filter, the objects can be manually collected and then used to instantiate a batch." + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [], + "source": [ + "d1_loads = [l for l in altdss.Load if l.Name.endswith('d1')]\n", + "d1_batch_from_objs = altdss.Load.batch(objs=d1_loads)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If only a small fraction of the objects are used, prefer to use the new `iterate()` method that reuses objects, which is much faster. In this case, use the `copy` function explicitly when you need to keep a copy:" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [], + "source": [ + "from copy import copy\n", + "d1_loads = [copy(l) for l in altdss.Load.iterate() if l.Name.endswith('d1')]\n", + "d1_batch_from_objs = altdss.Load.batch(objs=d1_loads)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Batches from iterators and Python generator objects\n", + "\n", + "If the objects are not going to be reused individually in Python, since AltDSS Python v0.3.0, users can also create batches from Python generators:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "d1_batch_from_it = altdss.Load.batch(objs=(x for x in altdss.Load.iterate() if x.Name.endswith('d1')))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Note that in this example, there is no list comprehension expression. A generator expression is used.\n", + "\n", + "This construct is typically 10x faster than the naive alternative (`altdss.Load.batch(objs=[x for x in altdss.Load if x.Name.endswith('c2')])`).\n", + "If the predicate results in a large number of objects, it is still a lot faster than just using the `iterate` method.\n", + "\n", + "The two important aspects are:\n", + "- Prefer the `iterate()` method if the most objects are temporary. Python's `copy` can be used to make non-temporary references to the object.\n", + "- If the objects are not already instantiated in Python, i.e., you are already using a Batch or a DSS class container, prefer using [generator expressions](https://docs.python.org/3/reference/expressions.html#grammar-token-python-grammar-generator_expression) or generator functions to provide elements when creating batches from objects. \n", + "\n", + "\n", + "See Python's official documentations for more on generators: https://docs.python.org/3/glossary.html#term-generator\n", + "\n", + "For small circuits, the naive approach is simpler and should be enough. Consider generators and iterators especially when handling large-scale circuits with thousands of elements." + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -1007,7 +1107,7 @@ } ], "source": [ - "batch_combined_filter = altdss.Load.batch(idx=np.where(altdss.Load.MaxCurrent(-1) > 300), Phases=3, kW=(100, 200))\n", + "batch_combined_filter = altdss.Load.batch(idx=np.where(altdss.Load.MaxCurrent() > 300), Phases=3, kW=(100, 200))\n", "batch_combined_filter.Name" ] }, @@ -1058,7 +1158,7 @@ } ], "source": [ - "%timeit altdss.Load.batch(idx=np.where(altdss.Load.MaxCurrent(-1) > 300), Phases=3, kW=(100, 200)).Name" + "%timeit altdss.Load.batch(idx=np.where(altdss.Load.MaxCurrent() > 300), Phases=3, kW=(100, 200)).Name" ] }, { @@ -1246,7 +1346,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 47, "metadata": {}, "outputs": [], "source": [ diff --git a/pyproject.toml b/pyproject.toml index 485fddf..9ce2720 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,14 +20,14 @@ artifacts = ["altdss/_version.py"] name = "altdss" dynamic = ["version"] dependencies = [ - "dss_python", - "dss_python_backend==0.14.5", - "numpy>=1.21.0", + "dss_python>=0.16.0b2,<0.17", + "dss_python_backend==0.15.0b4", + "numpy>=2,<3", "typing_extensions>=4.5,<5", "scipy", "pandas", ] -requires-python = ">=3.7" +requires-python = ">=3.11" authors = [ {name = "Paulo Meira", email = "pmeira@ieee.org"}, {name = "Dheepak Krishnamurthy", email = "me@kdheepak.com"}, @@ -42,12 +42,10 @@ keywords = ["opendss", "altdss", "electric power systems", "opendssdirect", "pow classifiers = [ 'Intended Audience :: Science/Research', 'Intended Audience :: Education', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Development Status :: 4 - Beta', @@ -69,5 +67,6 @@ test = [ "pytest", ] all = [ + "opendssdirect.py>=0.10.0b1,<0.11", # temporary, for the beta "dss_python[all]", ] diff --git a/tests/test_alt.py b/tests/test_alt.py index 4527d82..5bba830 100644 --- a/tests/test_alt.py +++ b/tests/test_alt.py @@ -251,7 +251,7 @@ def test_ymatrix_csc(): altdss(f'redirect "{BASE_DIR}/Version8/Distrib/IEEETestCases/13Bus/IEEE13Nodeckt.dss"') altdss.Solution.Solve() altdss.Settings.AdvancedTypes = True - assert np.all(altdss.SystemY(dense=True) == sp.csc_matrix(altdss.YMatrix.GetCompressedYMatrix())) + assert np.all(altdss.SystemY(dense=True) == altdss.YMatrix.GetCompressedYMatrix()) y_sparse1 = altdss.SystemY(dense=False) y_sparse2 = sp.csc_matrix(altdss.YMatrix.GetCompressedYMatrix()) np.testing.assert_array_equal(y_sparse1.toarray(), y_sparse2.toarray()) diff --git a/tests/test_batch.py b/tests/test_batch.py index 9a44bb9..eac0d6c 100644 --- a/tests/test_batch.py +++ b/tests/test_batch.py @@ -595,7 +595,7 @@ def test_loads_float_na(): # Generate some test data -- half the loads are multiplied by 1.1 mults = np.asarray([1.1] * len(alt1.Load)) - mults[0:len(alt1.Load) // 2] = np.NaN + mults[0:len(alt1.Load) // 2] = np.nan kWs = alt1.Load.kW * mults for kW, load in zip(kWs, alt1.Load): @@ -854,7 +854,17 @@ def test_ce_functions(): ce_powers.extend(CE.Powers.view(dtype=complex)) assert altdss.Load.Powers().tolist() == ce_powers - + + +def test_batch_from_iter(): + create_ref_ckt7(altdss) + + b1 = altdss.Load.batch(objs=[x for x in altdss.Load if x.Name.endswith('c2')]) + b2 = altdss.Load.batch(objs=(x for x in altdss.Load.iterate() if x.Name.endswith('c2'))) + + assert len(b1) == len(b2) + assert b1.to_list() == b2.to_list() + if __name__ == '__main__': # Adjust for manually running a test-case diff --git a/tests/test_obj.py b/tests/test_obj.py index a395c03..7c8b6c1 100644 --- a/tests/test_obj.py +++ b/tests/test_obj.py @@ -20,7 +20,7 @@ Vsource, Transformer, LineCode, Load, Line, Capacitor, Connection as Conn, RegControl, LengthUnit as Units, LoadModel, Edit, AltDSS, altdss, LineGeometry, LineSpacing, - DSSException + Fuse, FuseState, DSSException ) def create_ref_ckt13(ref): @@ -438,6 +438,424 @@ def create_ckt13_verbose(altdss: AltDSS): altdss.Solution.Solve() +def create_ckt13_verbose_with_iterators(altdss: AltDSS): + altdss.ClearAll() + altdss('new circuit.IEEE13Nodeckt') + altdss.Settings.AdvancedTypes = True + + src = altdss.Vsource[0] + with Edit(src): + src.BasekV = 115 + src.pu = 1.0001 + src.Phases = 3 + src.Bus1 = 'SourceBus' + src.Angle = 30 # advance angle 30 deg so result agree with published angle + src.MVASC3 = 20000 + src.MVASC1 = 21000 # stiffen the source to approximate inf source + + # Transformers and regulators + sub: Transformer = altdss.Transformer.new('Sub') + sub.Phases = 3 + sub.Windings = 2 + sub.XHL = 8 / 1000 + sub.Buses = ['SourceBus', '650'] + sub.Conns = [Conn.delta, Conn.wye] + sub.kVs = [115, 4.16] + sub.kVAs = [5000, 5000] + sub.pctRs = [0.5 / 1000, 0.5 / 1000] + sub.end_edit() + + for i in (1, 2, 3): + tr: Transformer = altdss.Transformer.new(f'Reg{i}') + + tr.Phases = 1 + tr.Bank = 'reg1' + tr.XHL = 0.01 + tr.kVAs = [1666, 1666] + tr.Buses = [f'650.{i}', f'RG60.{i}'] + tr.kVs = [2.4, 2.4] + tr.pctLoadLoss = 0.01 + tr.end_edit() + + reg: RegControl = altdss.RegControl.new(f'Reg{i}') + reg.Transformer = tr + reg.Winding = 2 + reg.VReg = 122 + reg.Band = 2 + reg.PTRatio = 20 + reg.CTPrim = 700 + reg.R = 3 + reg.X = 9 + reg.end_edit() + + xfm1: Transformer = altdss.Transformer.new('XFM1') + xfm1.Phases = 3 + xfm1.Windings = 2 + xfm1.XHL = 2 + xfm1.Buses = ['633', '634'] + xfm1.Conns = [Conn.wye, Conn.wye] + xfm1.kVs = [4.16, 0.480] + xfm1.kVAs = [500, 500] + xfm1.pctRs = [0.55, 0.55] + xfm1.end_edit() + + # Line codes + mtx601: LineCode = altdss.LineCode.new('mtx601') + mtx601.NPhases = 3 + mtx601.BaseFreq = 60 + mtx601.RMatrix = [0.3465, 0.1560, 0.3375, 0.1580, 0.1535, 0.3414] + mtx601.XMatrix = [1.0179, 0.5017, 1.0478, 0.4236, 0.3849, 1.0348] + mtx601.Units = Units.miles + mtx601.end_edit() + + mtx602: LineCode = altdss.LineCode.new('mtx602') + mtx602.NPhases = 3 + mtx602.BaseFreq = 60 + # We can pass the triangle or the full matrix for these + # If someone calculated the matrix somehow, it would + # be easier to pass it directly in the full form. + mtx602.RMatrix = [ + [0.7526, 0.1580, 0.1560], + [0.1580, 0.7475, 0.1535], + [0.1560, 0.1535, 0.7436] + ] + mtx602.XMatrix = (1.1814, 0.4236, 1.1983, 0.5017, 0.3849, 1.2112) + mtx602.Units = Units.miles + mtx602.end_edit() + + mtx603: LineCode = altdss.LineCode.new('mtx603') + mtx603.NPhases = 2 + mtx603.BaseFreq = 60 + mtx603.RMatrix = [1.3238, 0.2066, 0.2066, 1.3294] + mtx603.XMatrix = [1.3569, 0.4591, 0.4591, 1.3471] + mtx603.Units = Units.miles + mtx603.end_edit() + + mtx604: LineCode = altdss.LineCode.new('mtx604') + mtx604.NPhases = 2 + mtx604.BaseFreq = 60 + mtx604.RMatrix = (1.3238, 0.2066, 0.2066, 1.3294) + mtx604.XMatrix = (1.3569, 0.4591, 0.4591, 1.3471) + mtx604.Units = Units.miles + mtx604.end_edit() + + mtx605: LineCode = altdss.LineCode.new('mtx605') + mtx605.NPhases = 1 + mtx605.BaseFreq = 60 + mtx605.RMatrix = [1.3292] + mtx605.XMatrix = [1.3475] + mtx605.Units = Units.miles + mtx605.end_edit() + + mtx606: LineCode = altdss.LineCode.new('mtx606') + mtx606.NPhases = 3 + mtx606.Units = Units.miles + mtx606.RMatrix = [0.791721, 0.318476, 0.781649, 0.28345, 0.318476, 0.791721] + mtx606.XMatrix = [0.438352, 0.0276838, 0.396697, -0.0184204, 0.0276838, 0.438352] + mtx606.CMatrix = [383.948, 0, 383.948, 0, 0, 383.948] + mtx606.end_edit() + + mtx607: LineCode = altdss.LineCode.new('mtx607') + mtx607.NPhases = 1 + mtx607.BaseFreq = 60 + mtx607.RMatrix = (1.3425,) + mtx607.XMatrix = (0.5124,) + mtx607.CMatrix = [236] + mtx607.Units = Units.miles + mtx607.end_edit() + + # Here we test the temporary iterator objs. Here, e.g., instead of creating a + # new actual Load object for each `Load.new`, an iterator object is reused + # behind the scenes. If we wanted to keep a reference to a certain Load, + # we would need to explicitly copy it (`from copy import copy; l671_ref = copy(l671)`) + # + # Note that this is a test and there won't be a performance difference for + # such a small circuit. + with altdss.Settings.map_to_iterators(): + # Loads + l671: Load = altdss.Load.new('671') + l671.Bus1 = '671.1.2.3' + l671.Phases = 3 + l671.Conn = Conn.delta + l671.Model = LoadModel.ConstantPQ + l671.kV = 4.16 + l671.kW = 1155 + l671.kvar = 660 + l671.end_edit() + + l634a: Load = altdss.Load.new('634a') + l634a.Bus1 = '634.1' + l634a.Phases = 1 + l634a.Conn = Conn.wye + l634a.Model = LoadModel.ConstantPQ + l634a.kV = 0.277 + l634a.kW = 160 + l634a.kvar = 110 + l634a.end_edit() + + l634b: Load = altdss.Load.new('634b') + l634b.Bus1 = '634.2' + l634b.Phases = 1 + l634b.Conn = Conn.wye + l634b.Model = LoadModel.ConstantPQ + l634b.kV = 0.277 + l634b.kW = 120 + l634b.kvar = 90 + l634b.end_edit() + + l634c: Load = altdss.Load.new('634c') + l634c.Bus1 = '634.3' + l634c.Phases = 1 + l634c.Conn = Conn.wye + l634c.Model = LoadModel.ConstantPQ + l634c.kV = 0.277 + l634c.kW = 120 + l634c.kvar = 90 + l634c.end_edit() + + l645: Load = altdss.Load.new('645') + l645.Bus1 = '645.2' + l645.Phases = 1 + l645.Conn = Conn.wye + l645.Model = LoadModel.ConstantPQ + l645.kV = 2.4 + l645.kW = 170 + l645.kvar = 125 + l645.end_edit() + + l646: Load = altdss.Load.new('646') + l646.Bus1 = '646.2.3' + l646.Phases = 1 + l646.Conn = Conn.delta + l646.Model = LoadModel.ConstantZ + l646.kV = 4.16 + l646.kW = 230 + l646.kvar = 132 + l646.end_edit() + + l692: Load = altdss.Load.new('692') + l692.Bus1 = '692.3.1' + l692.Phases = 1 + l692.Conn = Conn.delta + l692.Model = LoadModel.ConstantI + l692.kV = 4.16 + l692.kW = 170 + l692.kvar = 151 + l692.end_edit() + + l675a: Load = altdss.Load.new('675a') + l675a.Bus1 = '675.1' + l675a.Phases = 1 + l675a.Conn = Conn.wye + l675a.Model = LoadModel.ConstantPQ + l675a.kV = 2.4 + l675a.kW = 485 + l675a.kvar = 190 + l675a.end_edit() + + l675b: Load = altdss.Load.new('675b') + l675b.Bus1 = '675.2' + l675b.Phases = 1 + l675b.Conn = Conn.wye + l675b.Model = LoadModel.ConstantPQ + l675b.kV = 2.4 + l675b.kW = 68 + l675b.kvar = 60 + l675b.end_edit() + + l675c: Load = altdss.Load.new('675c') + l675c.Bus1 = '675.3' + l675c.Phases = 1 + l675c.Conn = Conn.wye + l675c.Model = LoadModel.ConstantPQ + l675c.kV = 2.4 + l675c.kW = 290 + l675c.kvar = 212 + l675c.end_edit() + + l611: Load = altdss.Load.new('611') + l611.Bus1 = '611.3' + l611.Phases = 1 + l611.Conn = Conn.wye + l611.Model = LoadModel.ConstantI + l611.kV = 2.4 + l611.kW = 170 + l611.kvar = 80 + l611.end_edit() + + l652: Load = altdss.Load.new('652') + l652.Bus1 = '652.1' + l652.Phases = 1 + l652.Conn = Conn.wye + l652.Model = LoadModel.ConstantZ + l652.kV = 2.4 + l652.kW = 128 + l652.kvar = 86 + l652.end_edit() + + l670a: Load = altdss.Load.new('670a') + l670a.Bus1 = '670.1' + l670a.Phases = 1 + l670a.Conn = Conn.wye + l670a.Model = LoadModel.ConstantPQ + l670a.kV = 2.4 + l670a.kW = 17 + l670a.kvar = 10 + l670a.end_edit() + + l670b: Load = altdss.Load.new('670b') + l670b.Bus1 = '670.2' + l670b.Phases = 1 + l670b.Conn = Conn.wye + l670b.Model = LoadModel.ConstantPQ + l670b.kV = 2.4 + l670b.kW = 66 + l670b.kvar = 38 + l670b.end_edit() + + l670c: Load = altdss.Load.new('670c') + l670c.Bus1 = '670.3' + l670c.Phases = 1 + l670c.Conn = Conn.wye + l670c.Model = LoadModel.ConstantPQ + l670c.kV = 2.4 + l670c.kW = 117 + l670c.kvar = 68 + l670c.end_edit() + + # Capacitors + cap1: Capacitor = altdss.Capacitor.new('Cap1') + cap1.Bus1 = '675' + cap1.Phases = 3 + cap1.kvar = 600 + cap1.kV = 4.16 + cap1.end_edit() + + cap2: Capacitor = altdss.Capacitor.new('Cap2') + cap2.Bus1 = '611.3' + cap2.Phases = 1 + cap2.kvar = 100 + cap2.kV = 2.4 + cap2.end_edit() + + # Lines + l650632 = altdss.Line.new('650632') + l650632.Phases = 3 + l650632.Bus1 = 'RG60.1.2.3' + l650632.Bus2 = '632.1.2.3' + l650632.LineCode = mtx601 + l650632.Length = 2000 + l650632.Units = Units.ft + l650632.end_edit() + + l632670 = altdss.Line.new('632670') + l632670.Phases = 3 + l632670.Bus1 = '632.1.2.3' + l632670.Bus2 = '670.1.2.3' + l632670.LineCode = mtx601 + l632670.Length = 667 + l632670.Units = Units.ft + l632670.end_edit() + + l670671 = altdss.Line.new('670671') + l670671.Phases = 3 + l670671.Bus1 = '670.1.2.3' + l670671.Bus2 = '671.1.2.3' + l670671.LineCode = mtx601 + l670671.Length = 1333 + l670671.Units = Units.ft + l670671.end_edit() + + l671680 = altdss.Line.new('671680') + l671680.Phases = 3 + l671680.Bus1 = '671.1.2.3' + l671680.Bus2 = '680.1.2.3' + l671680.LineCode = mtx601 + l671680.Length = 1000 + l671680.Units = Units.ft + l671680.end_edit() + + l632633 = altdss.Line.new('632633') + l632633.Phases = 3 + l632633.Bus1 = '632.1.2.3' + l632633.Bus2 = '633.1.2.3' + l632633.LineCode = mtx602 + l632633.Length = 500 + l632633.Units = Units.ft + l671680.end_edit() + + l632645 = altdss.Line.new('632645') + l632645.Phases = 2 + l632645.Bus1 = '632.3.2' + l632645.Bus2 = '645.3.2' + l632645.LineCode = mtx603 + l632645.Length = 500 + l632645.Units = Units.ft + l632645.end_edit() + + l645646 = altdss.Line.new('645646') + l645646.Phases = 2 + l645646.Bus1 = '645.3.2' + l645646.Bus2 = '646.3.2' + l645646.LineCode = mtx603 + l645646.Length = 300 + l645646.Units = Units.ft + l645646.end_edit() + + l692675 = altdss.Line.new('692675') + l692675.Phases = 3 + l692675.Bus1 = '692.1.2.3' + l692675.Bus2 = '675.1.2.3' + l692675.LineCode = mtx606 + l692675.Length = 500 + l692675.Units = Units.ft + l692675.end_edit() + + l671684 = altdss.Line.new('671684') + l671684.Phases = 2 + l671684.Bus1 = '671.1.3' + l671684.Bus2 = '684.1.3' + l671684.LineCode = mtx604 + l671684.Length = 300 + l671684.Units = Units.ft + l671684.end_edit() + + l684611 = altdss.Line.new('684611') + l684611.Phases = 1 + l684611.Bus1 = '684.3' + l684611.Bus2 = '611.3' + l684611.LineCode = mtx605 + l684611.Length = 300 + l684611.Units = Units.ft + l684611.end_edit() + + l684652 = altdss.Line.new('684652') + l684652.Phases = 1 + l684652.Bus1 = '684.1' + l684652.Bus2 = '652.1' + l684652.LineCode = mtx607 + l684652.Length = 800 + l684652.Units = Units.ft + l684652.end_edit() + + # Switch + sw671692 = altdss.Line.new('671692') + sw671692.Phases = 3 + sw671692.Bus1 = '671' + sw671692.Bus2 = '692' + sw671692.Switch = True + sw671692.R1 = 1e-4 + sw671692.R0 = 1e-4 + sw671692.X1 = 0.0 + sw671692.X0 = 0.0 + sw671692.C1 = 0.0 + sw671692.C0 = 0.0 + sw671692.end_edit() + + altdss.Settings.VoltageBases = [115, 4.16, .48] + altdss('CalcV') + altdss.Solution.Solve() + def create_ckt13_shortcut(altdss: AltDSS, use_edit_method: bool): altdss.ClearAll() altdss('new circuit.IEEE13Nodeckt') @@ -543,13 +961,124 @@ def create_ckt13_shortcut(altdss: AltDSS, use_edit_method: bool): altdss.Solution.Solve() -def test_create_ckt13_verbose(): +def create_ckt13_shortcut_with_iterators(altdss: AltDSS, use_edit_method: bool): + altdss.ClearAll() + altdss('new circuit.IEEE13Nodeckt') + altdss.Settings.AdvancedTypes = True + + # Get some local names for cleaner syntax + LineCode = altdss.LineCode + Line = altdss.Line + Load = altdss.Load + Transformer = altdss.Transformer + Capacitor = altdss.Capacitor + RegControl = altdss.RegControl + + if not use_edit_method: + src = altdss.Vsource[0] + with Edit(src): + src.BasekV = 115 + src.pu = 1.0001 + src.Phases = 3 + src.Bus1 = 'SourceBus' + src.Angle = 30 + src.MVASC3 = 20000 + src.MVASC1 = 21000 + else: + altdss.Vsource[0].edit( + BasekV=115, pu=1.0001, Phases=3, Bus1='SourceBus', Angle=30, MVASC3=20000, MVASC1=21000 + ) + + + # Transformers and regulators + Transformer.new('Sub', Phases=3, Windings=2, XHL=8 / 1000, Buses=['SourceBus', '650'], Conns=[Conn.delta, Conn.wye], kVs=[115, 4.16], kVAs=[5000, 5000], pctRs=[0.5 / 1000, 0.5 / 1000]) + for i in (1, 2, 3): + tr = Transformer.new(f'Reg{i}', Phases=1, Bank='reg1', XHL=0.01, kVAs=[1666, 1666], Buses=[f'650.{i}', f'RG60.{i}'], kVs=[2.4, 2.4], pctLoadLoss=0.01) + RegControl.new(f'Reg{i}', Transformer=tr, Winding=2, VReg=122, Band=2, PTRatio=20, CTPrim=700, R=3, X=9) + + Transformer.new('XFM1', Phases=3, Windings=2, XHL=2, Buses=['633', '634'], Conns=[Conn.wye, Conn.wye], kVs=[4.16, 0.480], kVAs=[500, 500], pctRs=[0.55, 0.55]) + + # Line codes + mtx601 = LineCode.new('mtx601', NPhases=3, BaseFreq=60, + RMatrix=[0.3465, 0.1560, 0.3375, 0.1580, 0.1535, 0.3414], + XMatrix=[1.0179, 0.5017, 1.0478, 0.4236, 0.3849, 1.0348], + Units=Units.miles + ) + mtx602 = LineCode.new('mtx602', NPhases=3, BaseFreq=60, + RMatrix=[[0.7526, 0.1580, 0.1560], [0.1580, 0.7475, 0.1535], [0.1560, 0.1535, 0.7436]], + XMatrix=(1.1814, 0.4236, 1.1983, 0.5017, 0.3849, 1.2112), + Units=Units.miles + ) + mtx603 = LineCode.new('mtx603', NPhases=2, BaseFreq=60, + RMatrix=[1.3238, 0.2066, 0.2066, 1.3294], XMatrix=[1.3569, 0.4591, 0.4591, 1.3471], + Units=Units.miles + ) + mtx604 = LineCode.new('mtx604', NPhases=2, BaseFreq=60, + RMatrix=(1.3238, 0.2066, 0.2066, 1.3294), XMatrix=(1.3569, 0.4591, 0.4591, 1.3471), + Units=Units.miles) + mtx605 = LineCode.new('mtx605', NPhases=1, BaseFreq=60, RMatrix=[1.3292], XMatrix=[1.3475], Units=Units.miles) + mtx606 = LineCode.new('mtx606', NPhases=3, Units=Units.miles, + RMatrix=[0.791721, 0.318476, 0.781649, 0.28345, 0.318476, 0.791721], + XMatrix=[0.438352, 0.0276838, 0.396697, -0.0184204, 0.0276838, 0.438352], + CMatrix=[383.948, 0, 383.948, 0, 0, 383.948] + ) + mtx607 = LineCode.new('mtx607', NPhases=1, BaseFreq=60, RMatrix=(1.3425,), XMatrix=(0.5124,), CMatrix=[236], Units=Units.miles) + + with altdss.Settings.map_to_iterators(): + # Loads + Load.new('671', Bus1='671.1.2.3', Phases=3, Conn=Conn.delta, Model=LoadModel.ConstantPQ, kV=4.16, kW=1155, kvar=660) + Load.new('634a', Bus1='634.1', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantPQ, kV=0.277, kW=160, kvar=110) + Load.new('634b', Bus1='634.2', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantPQ, kV=0.277, kW=120, kvar=90) + Load.new('634c', Bus1='634.3', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantPQ, kV=0.277, kW=120, kvar=90) + Load.new('645', Bus1='645.2', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantPQ, kV=2.4, kW=170, kvar=125) + Load.new('646', Bus1='646.2.3', Phases=1, Conn=Conn.delta, Model=LoadModel.ConstantZ, kV=4.16, kW=230, kvar=132) + Load.new('692', Bus1='692.3.1', Phases=1, Conn=Conn.delta, Model=LoadModel.ConstantI, kV=4.16, kW=170, kvar=151) + Load.new('675a', Bus1='675.1', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantPQ, kV=2.4, kW=485, kvar=190) + Load.new('675b', Bus1='675.2', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantPQ, kV=2.4, kW=68, kvar=60) + Load.new('675c', Bus1='675.3', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantPQ, kV=2.4, kW=290, kvar=212) + Load.new('611', Bus1='611.3', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantI, kV=2.4, kW=170, kvar=80) + Load.new('652', Bus1='652.1', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantZ, kV=2.4, kW=128, kvar=86) + Load.new('670a', Bus1='670.1', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantPQ, kV=2.4, kW=17, kvar=10) + Load.new('670b', Bus1='670.2', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantPQ, kV=2.4, kW=66, kvar=38) + Load.new('670c', Bus1='670.3', Phases=1, Conn=Conn.wye, Model=LoadModel.ConstantPQ, kV=2.4, kW=117, kvar=68) + + # Capacitors + Capacitor.new('Cap1', Bus1='675', Phases=3, kvar=600, kV=4.16) + Capacitor.new('Cap2', Bus1='611.3', Phases=1, kvar=100, kV=2.4) + + # Lines + Line.new('650632', Phases=3, Bus1='RG60.1.2.3', Bus2='632.1.2.3', LineCode=mtx601, Length=2000, Units=Units.ft) + Line.new('632670', Phases=3, Bus1='632.1.2.3', Bus2='670.1.2.3', LineCode=mtx601, Length=667, Units=Units.ft) + Line.new('670671', Phases=3, Bus1='670.1.2.3', Bus2='671.1.2.3', LineCode=mtx601, Length=1333, Units=Units.ft) + Line.new('671680', Phases=3, Bus1='671.1.2.3', Bus2='680.1.2.3', LineCode=mtx601, Length=1000, Units=Units.ft) + Line.new('632633', Phases=3, Bus1='632.1.2.3', Bus2='633.1.2.3', LineCode=mtx602, Length=500, Units=Units.ft) + Line.new('632645', Phases=2, Bus1='632.3.2', Bus2='645.3.2', LineCode=mtx603, Length=500, Units=Units.ft) + Line.new('645646', Phases=2, Bus1='645.3.2', Bus2='646.3.2', LineCode=mtx603, Length=300, Units=Units.ft) + Line.new('692675', Phases=3, Bus1='692.1.2.3', Bus2='675.1.2.3', LineCode=mtx606, Length=500, Units=Units.ft) + Line.new('671684', Phases=2, Bus1='671.1.3', Bus2='684.1.3', LineCode=mtx604, Length=300, Units=Units.ft) + Line.new('684611', Phases=1, Bus1='684.3', Bus2='611.3', LineCode=mtx605, Length=300, Units=Units.ft) + Line.new('684652', Phases=1, Bus1='684.1', Bus2='652.1', LineCode=mtx607, Length=800, Units=Units.ft) + + # Switch + Line.new('671692', Phases=3, Bus1='671', Bus2='692', Switch=True, R1=1e-4, R0=1e-4, X1=0.0, X0=0.0, C1=0.0, C0=0.0) + + altdss.Settings.VoltageBases = [115, 4.16, .48] + altdss('CalcV') + altdss.Solution.Solve() + + +def test_create_ckt13_verbose(it: bool = False): ''' This is the more verbose version; we don't expect anyone to do this since the data is usually loaded from other sources... but we still need to test it. ''' + if it: + from timeit import timeit + create_ckt13_verbose_with_iterators(altdss) + else: + from timeit import timeit + create_ckt13_verbose(altdss) - create_ckt13_verbose(altdss) ref: AltDSS = altdss.NewContext() create_ref_ckt13(ref) @@ -590,14 +1119,20 @@ def test_create_ckt13_verbose(): # Should also be the same result now assert max(abs(ref.BusVolts() - altdss.BusVolts())) < 1e-12, 'Voltages after changing loads differ' +def test_create_ckt13_verbose_with_iterators(): + test_create_ckt13_verbose(True) -def _test_create_ckt13_shortcut(use_edit_method: bool): +def _test_create_ckt13_shortcut(use_edit_method: bool, use_it: bool = False): ''' This is the more verbose version; we don't expect anyone to do this since the data is usually loaded from other sources... but we still need to test it. ''' - create_ckt13_shortcut(altdss, use_edit_method) + if use_it: + create_ckt13_shortcut_with_iterators(altdss, use_edit_method) + else: + create_ckt13_shortcut(altdss, use_edit_method) + ref: AltDSS = altdss.NewContext() create_ref_ckt13(ref) @@ -644,6 +1179,9 @@ def test_create_ckt13_shortcut(): def test_create_ckt13_shortcut_and_edit(): _test_create_ckt13_shortcut(True) +def test_create_ckt13_shortcut_with_iterators(): + _test_create_ckt13_shortcut(False, True) + def test_new_em(): create_ref_ckt13(altdss) em = altdss.EnergyMeter.new('sub', Element=altdss.Transformer['sub'], Terminal=1) @@ -746,7 +1284,9 @@ def test_line_linegeo_conductors(): lg: LineGeometry = altdss.LineGeometry.new('606') lg.NPhases = 3 lg.NConds = 3 - lg.Units = Units.ft + lg.Units = Units.ft # Using broadcast to set all units at once + assert lg.Units == [Units.ft, Units.ft, Units.ft] + print([cn.FullName()] * 3) lg.Conductors = [cn, cn, cn] lg.X = [-0.5, 0, 0.5] @@ -762,6 +1302,45 @@ def test_line_linegeo_conductors(): print(len(altdss.LineGeometry)) +def test_broadcast_linegeometry(): + lg: LineGeometry = altdss.LineGeometry.new('test_linegeo') + lg.NPhases = 3 + lg.NConds = 3 + lg.Units = Units.ft + + lg.Units = Units.ft + assert lg.Units == [Units.ft, Units.ft, Units.ft] + lg.Units = Units.cm + assert lg.Units == [Units.cm, Units.cm, Units.cm] + lg.Units = [Units.ft, Units.cm, Units.ft] + assert lg.Units == [Units.ft, Units.cm, Units.ft] + lg.Units = [Units.ft] * 3 + assert lg.Units == [Units.ft, Units.ft, Units.ft] + + # TODO: implement simple ArrayProxy (like we use in batches) to allow this to work + # lg.Units[1] = Units.m + # assert lg.Units == [Units.ft, Units.m, Units.ft] + # lg.Units[1] = Units.inch + # assert lg.Units == [Units.inch, Units.inch, Units.inch] + + +def test_broadcast_fuse(): + create_ref_ckt13(altdss) + + fuse: Fuse = altdss.Fuse.new('test_fuse') + fuse.MonitoredObj = altdss.Line[0] + fuse.MonitoredTerm = 1 + fuse.Normal = FuseState.Open + + fuse.State = FuseState.Closed + assert fuse.State == [FuseState.Closed] * 3 + fuse.State = [FuseState.Closed, FuseState.Open, FuseState.Closed] + assert fuse.State == [FuseState.Closed, FuseState.Open, FuseState.Closed] + + assert fuse.Normal == [FuseState.Open, FuseState.Open, FuseState.Open] + fuse.Normal = FuseState.Closed + assert fuse.Normal == [FuseState.Closed] * 3 + def test_no_new_attr(): create_ref_ckt13(altdss) @@ -841,4 +1420,8 @@ def test_new(): if __name__ == '__main__': # Adjust for manual running a test-case - test_register_values() + # test_register_values() + test_create_ckt13_verbose(False) + test_create_ckt13_verbose(True) + test_create_ckt13_shortcut() + test_create_ckt13_shortcut_with_iterators()