altdss.StorageController

Contents

altdss.StorageController#

Module Contents#

Classes#

IStorageController

StorageController

StorageControllerBatch

StorageControllerBatchProperties

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

StorageControllerProperties

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

API#

class altdss.StorageController.IStorageController(iobj)#

Bases: altdss.DSSObj.IDSSObj, altdss.StorageController.StorageControllerBatch

BaseFreq: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

Base Frequency for ratings.

DSS property name: BaseFreq, DSS property index: 38.

ComplexSeqCurrents() altdss.types.ComplexArray#

Complex double array of Sequence Currents for all conductors of all terminals of active circuit element.

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

ComplexSeqVoltages() altdss.types.ComplexArray#

Complex double array of Sequence Voltage for all terminals of active circuit element.

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

Currents() altdss.types.ComplexArray#

Complex array of currents into each conductor of each terminal

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

CurrentsMagAng() altdss.types.Float64Array#

Currents in magnitude, angle (degrees) format as a array of doubles.

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

Daily: List[altdss.LoadShape.LoadShape]#

‘property(…)’

Dispatch loadshape object, If any, for Daily solution mode.

DSS property name: Daily, DSS property index: 25.

Daily_str: List[str]#

‘property(…)’

Dispatch loadshape object, If any, for Daily solution mode.

DSS property name: Daily, DSS property index: 25.

DispFactor: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

Defaults to 1 (disabled). Set to any value between 0 and 1 to enable this parameter.

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.

Duty: List[altdss.LoadShape.LoadShape]#

‘property(…)’

Dispatch loadshape object, If any, for Dutycycle solution mode.

DSS property name: Duty, DSS property index: 26.

Duty_str: List[str]#

‘property(…)’

Dispatch loadshape object, If any, for Dutycycle solution mode.

DSS property name: Duty, DSS property index: 26.

Element: List[altdss.DSSObj.DSSObj]#

‘property(…)’

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.

ElementList: List[List[str]]#

‘property(…)’

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.

Element_str: List[str]#

‘property(…)’

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.

Enabled: List[bool]#

‘property(…)’

{Yes|No or True|False} Indicates whether this element is enabled.

DSS property name: Enabled, DSS property index: 39.

EventLog: List[bool]#

‘property(…)’

{Yes/True | No/False} Default is No. Log control actions to Eventlog.

DSS property name: EventLog, DSS property index: 27.

FullName() List[str]#

Returns the full name (including object type) for all objects in this batch

GUID() List[str]#

GUID/UUID for each object. Currently used only in the CIM-related methods.

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

Handle() altdss.types.Int32Array#

Index of each element into the circuit’s element list.

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

HasOCPDevice() altdss.types.BoolArray#

For each element in the batch: returns true if a recloser, relay, or fuse controlling the circuit element.

OCP = Overcurrent Protection

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

HasSwitchControl() altdss.types.BoolArray#

For each element in the batch: returns true if the element has a SwtControl attached.

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

HasVoltControl() altdss.types.BoolArray#

For each element in the batch: returns true if the element has a CapControl or RegControl attached.

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

InhibitTime: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

Hours (integer) to inhibit Discharging after going into Charge mode. Default is 5.

DSS property name: InhibitTime, DSS property index: 28.

IsIsolated() altdss.types.BoolArray#

For each element in the batch: returns true if the element is isolated. Note that this only fetches the current value. See also the Topology interface.

Like(value: AnyStr, flags: altdss.enums.SetterFlags = 0)#

Make like another object, e.g.:

New Capacitor.C2 like=c1 …

DSS property name: Like, DSS property index: 40.

Losses() altdss.types.ComplexArray#

For each element in the batch: total losses in the element, in VA (watts, vars).

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

MaxCurrent(terminal: int) altdss.types.Float64Array#

Returns the maximum current (magnitude) at the specified terminal for each element in this batch. Use -1 as terminal to get the value across all terminals.

ModeCharge: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

{Loadshape | Time* | PeakShaveLow | I-PeakShaveLow} 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 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.

ModeCharge_str: List[str]#

‘property(…)’

{Loadshape | Time* | PeakShaveLow | I-PeakShaveLow} 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 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.

ModeDischarge: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

{PeakShave* | Follow | Support | Loadshape | Time | Schedule | I-PeakShave} 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.

In Follow mode, the control is triggered by time and resets the kWTarget value to the present monitored element power. It then attempts to discharge Storage to keep power in the monitored element below the new kWTarget. See TimeDischargeTrigger.

In Support mode, the control operates oppositely of PeakShave mode: Storage is discharged to keep kW power output up near the target.

In Loadshape mode, both charging and discharging precisely follows the per unit loadshape. Storage is discharged when the loadshape value is positive.

In Time mode, the Storage discharge is turned on at the specified %RatekW at the specified discharge trigger time in fractional hours.

In Schedule mode, the Tup, TFlat, and Tdn properties specify the up ramp duration, flat duration, and down ramp duration for the schedule. The schedule start time is set by TimeDischargeTrigger and the rate of discharge for the flat part is determined by %RatekW.

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.

ModeDischarge_str: List[str]#

‘property(…)’

{PeakShave* | Follow | Support | Loadshape | Time | Schedule | I-PeakShave} 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.

In Follow mode, the control is triggered by time and resets the kWTarget value to the present monitored element power. It then attempts to discharge Storage to keep power in the monitored element below the new kWTarget. See TimeDischargeTrigger.

In Support mode, the control operates oppositely of PeakShave mode: Storage is discharged to keep kW power output up near the target.

In Loadshape mode, both charging and discharging precisely follows the per unit loadshape. Storage is discharged when the loadshape value is positive.

In Time mode, the Storage discharge is turned on at the specified %RatekW at the specified discharge trigger time in fractional hours.

In Schedule mode, the Tup, TFlat, and Tdn properties specify the up ramp duration, flat duration, and down ramp duration for the schedule. The schedule start time is set by TimeDischargeTrigger and the rate of discharge for the flat part is determined by %RatekW.

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.

MonPhase: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

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.

MonPhase_str: List[str]#

‘property(…)’

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.

property Name: List[str]#
NumConductors() altdss.types.Int32Array#

Number of conductors per terminal for each element in the batch.

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

NumControllers() altdss.types.Int32Array#

Number of controllers connected to each device in the batch.

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

NumPhases() altdss.types.Int32Array#

Number of Phases for each element in this batch.

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

NumTerminals() altdss.types.Int32Array#

Number of terminals for each Circuit Element in the batch.

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

OCPDevice() List[Union[altdss.DSSObj.DSSObj, None]]#

Returns (as a list of Python objects) the OCP device controlling each element.

OCPDeviceIndex() altdss.types.Int32Array#

For each element in the batch: index into each controller list of the OCP Device controlling each circuit element

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

OCPDeviceType() List[dss.enums.OCPDevType]#

For each element in the batch: type of OCP controller device

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

PhaseLosses() altdss.types.ComplexArray#

Complex array of losses (kVA) by phase

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

Powers() altdss.types.ComplexArray#

Complex array of powers (kVA) into each conductor of each terminal, of each element in the batch.

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

ResetLevel: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

SeasonTargets: List[altdss.types.Float64Array]#

‘property(…)’

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.

SeasonTargetsLow: List[altdss.types.Float64Array]#

‘property(…)’

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.

Seasons: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

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.

SeqCurrents() altdss.types.Float64Array#

Array of symmetrical component currents (magnitudes only) into each 3-phase terminal of each element

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

SeqPowers() altdss.types.ComplexArray#

Complex array of sequence powers (kW, kvar) into each 3-phase terminal of each element

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

SeqVoltages() altdss.types.Float64Array#

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

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

TDn: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

Duration, hrs, of downramp part for SCHEDULE mode. Default is 0.25.

DSS property name: TDn, DSS property index: 31.

TFlat: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

Duration, hrs, of flat part for SCHEDULE mode. Default is 2.0.

DSS property name: TFlat, DSS property index: 30.

TUp: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

Duration, hrs, of upramp part for SCHEDULE mode. Default is 0.25.

DSS property name: TUp, DSS property index: 29.

Terminal: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

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.

TimeChargeTrigger: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

TimeDischargeTrigger: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

TotalPowers() altdss.types.ComplexArray#

Returns an array with the total powers (complex, kVA) at all terminals of the circuit elements in this batch.

The resulting array is equivalent to concatenating the TotalPowers for each element.

Voltages() altdss.types.ComplexArray#

Complex array of voltages at terminals

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

VoltagesMagAng() altdss.types.Float64Array#

Voltages at each conductor in magnitude, angle form as array of doubles.

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

Weights: List[altdss.types.Float64Array]#

‘property(…)’

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.

Yearly: List[altdss.LoadShape.LoadShape]#

‘property(…)’

Dispatch loadshape object, If any, for Yearly solution Mode.

DSS property name: Yearly, DSS property index: 24.

Yearly_str: List[str]#

‘property(…)’

Dispatch loadshape object, If any, for Yearly solution Mode.

DSS property name: Yearly, DSS property index: 24.

__call__()#
__contains__(name: str) bool#
__getitem__(name_or_idx)#
__init__(iobj)#
__iter__()#
__len__() int#
batch(**kwargs)#

Creates a new batch handler of (existing) objects

batch_new(names: Optional[List[AnyStr]] = None, *, df=None, count: Optional[int] = None, begin_edit: Optional[bool] = None, **kwargs: typing_extensions.Unpack[altdss.StorageController.StorageControllerBatchProperties]) altdss.StorageController.StorageControllerBatch#

Creates a new batch of StorageController objects

Either names, count or df is required.

Parameters:
  • begin_edit – The argument begin_edit indicates if the user want to leave the elements in the edit state, and requires a call 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.

  • **kwargs – Pass keyword arguments equivalent to the DSS properties of the object.

  • names – When using a list of names, each new object will match the names from this list. begin_edit defaults to True if no arguments for properties were passed, False otherwise.

  • count – When using count, new objects will be created with based on a random prefix, with an increasing integer up to count. begin_edit defaults to True if no arguments for properties were passed, False otherwise.

  • df – Currently EXPERIMENTAL AND LIMITED, tries to get the columns from a dataframe to populate the names and the DSS properties. begin_edit defaults to False.

Returns:

Returns the new batch of DSS objects, wrapped in Python.

Note that, to make it easier for new users where the edit context might not be too relevant, AltDSS automatically opens/closes edit contexts for single properties if the object is not in the edit state already.

begin_edit() None#

Marks for editing all DSS objects in the batch

In the editing mode, some final side-effects of changing properties are postponed until end_edit is called. This side-effects can be somewhat costly, like updating the model parameters or internal matrices.

If you don’t have any performance constraint, you may edit each property individually without worrying about using begin_edit and end_edit. For convenience, those are emitted automatically when editing single properties outside an edit block.

edit(**kwargs: typing_extensions.Unpack[altdss.StorageController.StorageControllerBatchProperties]) altdss.StorageController.StorageControllerBatch#

Edit this StorageController batch.

This method will try to open a new edit context (if not already open), edit the properties, and finalize the edit context for objects in the batch. It can be seen as a shortcut to manually setting each property, or a Pythonic analogous (but extended) to the DSS BatchEdit command.

Parameters:

**kwargs – Pass keyword arguments equivalent to the DSS properties of the objects.

Returns:

Returns itself to allow call chaining.

end_edit(num_changes: int = 1) None#

Leaves the editing states of all DSS objects in the batch

num_changes is required for a few classes to correctly match the official OpenDSS behavior and must be the number of properties modified in the current editing block. As of DSS C-API v0.13, this is only required for the Monitor class, when the Action property is used with the Process value.

find(name_or_idx: Union[AnyStr, int]) altdss.DSSObj.DSSObj#

Returns an object from the collection by name or index; the index must be zero-based.

kWActual: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

(Read only). Actual kW output of all controlled Storage elements.

DSS property name: kWActual, DSS property index: 22.

kWBand: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

kWBandLow: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

kWNeed: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

(Read only). KW needed to meet target.

DSS property name: kWNeed, DSS property index: 23.

kWTarget: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

kWTargetLow: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

kWThreshold: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

kWTotal: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

(Read only). Total rated kW power capacity of Storage elements controlled by this controller.

DSS property name: kWTotal, DSS property index: 20.

kWhActual: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

(Read only). Actual kWh stored of all controlled Storage elements.

DSS property name: kWhActual, DSS property index: 21.

kWhTotal: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

(Read only). Total rated kWh energy Storage capacity of Storage elements controlled by this controller.

DSS property name: kWhTotal, DSS property index: 19.

new(name: AnyStr, *, begin_edit: Optional[bool] = None, activate=False, **kwargs: typing_extensions.Unpack[altdss.StorageController.StorageControllerProperties]) altdss.StorageController.StorageController#

Creates a new StorageController.

Parameters:
  • name – The object’s name is a required positional argument.

  • activate – Activation (setting activate to true) is useful for integration with the classic API, and some internal OpenDSS commands. If you interact with this object only via the Alt API, no need to activate it (due to performance costs).

  • begin_edit – This controls how the edit context is left after the object creation:

  • True: The object will be left in the edit state, requiring 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.

Parameters:

**kwargs – Pass keyword arguments equivalent to the DSS properties of the object.

Returns:

Returns the new DSS object, wrapped in Python.

Note that, to make it easier for new users where the edit context might not be too relevant, AltDSS automatically opens/closes edit contexts for single properties if the object is not in the edit state already.

pctRateCharge: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

pctRatekW: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

pctReserve: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

pctkWBand: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

pctkWBandLow: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

to_json(options: Union[int, dss.enums.DSSJSONFlags] = 0)#

Returns the data (as a list) of the elements in a batch as a JSON-encoded string.

The options parameter contains bit-flags to toggle specific features. See Obj_ToJSON (C-API) for more, or DSSObj.to_json in Python.

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

to_list()#
class altdss.StorageController.StorageController(api_util, ptr)#

Bases: altdss.DSSObj.DSSObj, altdss.CircuitElement.CircuitElementMixin

BaseFreq: float#

‘property(…)’

Base Frequency for ratings.

DSS property name: BaseFreq, DSS property index: 38.

Close(terminal: int, phase: int) None#

Close the specified terminal and phase, if non-zero, or all conductors at the terminal.

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

ComplexSeqCurrents() altdss.types.ComplexArray#

Complex double array of Sequence Currents for all conductors of all terminals of active circuit element.

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

ComplexSeqVoltages() altdss.types.ComplexArray#

Complex double array of Sequence Voltage for all terminals of active circuit element.

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

Currents() altdss.types.ComplexArray#

Complex array of currents into each conductor of each terminal

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

Daily: altdss.LoadShape.LoadShape#

‘property(…)’

Dispatch loadshape object, If any, for Daily solution mode.

DSS property name: Daily, DSS property index: 25.

Daily_str: str#

‘property(…)’

Dispatch loadshape object, If any, for Daily solution mode.

DSS property name: Daily, DSS property index: 25.

DispFactor: float#

‘property(…)’

Defaults to 1 (disabled). Set to any value between 0 and 1 to enable this parameter.

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.

DisplayName: str#

‘property(…)’

Display name of the object (not necessarily unique)

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

Duty: altdss.LoadShape.LoadShape#

‘property(…)’

Dispatch loadshape object, If any, for Dutycycle solution mode.

DSS property name: Duty, DSS property index: 26.

Duty_str: str#

‘property(…)’

Dispatch loadshape object, If any, for Dutycycle solution mode.

DSS property name: Duty, DSS property index: 26.

Element: altdss.DSSObj.DSSObj#

‘property(…)’

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.

ElementList: List[str]#

‘property(…)’

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.

Element_str: str#

‘property(…)’

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.

Enabled: bool#

‘property(…)’

{Yes|No or True|False} Indicates whether this element is enabled.

DSS property name: Enabled, DSS property index: 39.

EventLog: bool#

‘property(…)’

{Yes/True | No/False} Default is No. Log control actions to Eventlog.

DSS property name: EventLog, DSS property index: 27.

FullName() str#
GUID() str#

Object’s GUID/UUID. Currently used only in the CIM-related methods.

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

Handle() int#

Index of this element into the circuit’s element list.

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

HasOCPDevice() bool#

Returns true if a recloser, relay, or fuse controlling the circuit element.

OCP = Overcurrent Protection

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

HasSwitchControl() bool#

Returns true if the element has a SwtControl attached.

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

HasVoltControl() bool#

Returns true if the element has a CapControl or RegControl attached.

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

InhibitTime: int#

‘property(…)’

Hours (integer) to inhibit Discharging after going into Charge mode. Default is 5.

DSS property name: InhibitTime, DSS property index: 28.

IsIsolated() bool#

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

IsOpen(terminal: int, phase: int) bool#

Returns true if the specified terminal and phase are open.

If the phase parameter is zero, returns if any conductor at the terminal is open.

Like(value: AnyStr)#

Make like another object, e.g.:

New Capacitor.C2 like=c1 …

DSS property name: Like, DSS property index: 40.

Losses() complex#

Total (complex) losses in the element, in VA (watts, vars)

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

MaxCurrent(terminal: int) float#

Returns the maximum current (magnitude) at the specified terminal. Use -1 as terminal to get the value across all terminals.

ModeCharge: altdss.enums.StorageControllerChargeMode#

‘property(…)’

{Loadshape | Time* | PeakShaveLow | I-PeakShaveLow} 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 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.

ModeCharge_str: str#

‘property(…)’

{Loadshape | Time* | PeakShaveLow | I-PeakShaveLow} 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 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.

ModeDischarge: altdss.enums.StorageControllerDischargeMode#

‘property(…)’

{PeakShave* | Follow | Support | Loadshape | Time | Schedule | I-PeakShave} 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.

In Follow mode, the control is triggered by time and resets the kWTarget value to the present monitored element power. It then attempts to discharge Storage to keep power in the monitored element below the new kWTarget. See TimeDischargeTrigger.

In Support mode, the control operates oppositely of PeakShave mode: Storage is discharged to keep kW power output up near the target.

In Loadshape mode, both charging and discharging precisely follows the per unit loadshape. Storage is discharged when the loadshape value is positive.

In Time mode, the Storage discharge is turned on at the specified %RatekW at the specified discharge trigger time in fractional hours.

In Schedule mode, the Tup, TFlat, and Tdn properties specify the up ramp duration, flat duration, and down ramp duration for the schedule. The schedule start time is set by TimeDischargeTrigger and the rate of discharge for the flat part is determined by %RatekW.

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.

ModeDischarge_str: str#

‘property(…)’

{PeakShave* | Follow | Support | Loadshape | Time | Schedule | I-PeakShave} 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.

In Follow mode, the control is triggered by time and resets the kWTarget value to the present monitored element power. It then attempts to discharge Storage to keep power in the monitored element below the new kWTarget. See TimeDischargeTrigger.

In Support mode, the control operates oppositely of PeakShave mode: Storage is discharged to keep kW power output up near the target.

In Loadshape mode, both charging and discharging precisely follows the per unit loadshape. Storage is discharged when the loadshape value is positive.

In Time mode, the Storage discharge is turned on at the specified %RatekW at the specified discharge trigger time in fractional hours.

In Schedule mode, the Tup, TFlat, and Tdn properties specify the up ramp duration, flat duration, and down ramp duration for the schedule. The schedule start time is set by TimeDischargeTrigger and the rate of discharge for the flat part is determined by %RatekW.

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.

MonPhase: altdss.enums.MonitoredPhase#

‘property(…)’

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.

MonPhase_str: str#

‘property(…)’

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.

property Name: str#
NodeOrder() altdss.types.Int32Array#

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

Be sure to run a solution to initialize the values after the circuit is created or modified.

NodeRef() altdss.types.Int32Array#

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

Be sure to run a solution to initialize the values after the circuit is created or modified.

NumConductors() int#

Number of conductors per terminal

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

NumControllers() int#

Number of controllers connected to this device.

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

NumPhases() int#

Number of phases

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

NumTerminals() int#

Number of terminals in this circuit element

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

OCPDevice() Union[altdss.DSSObj.DSSObj, None]#

Returns (as a Python object) the OCP device controlling this element, if any.

OCPDeviceIndex() int#

Index into controller list of OCP Device controlling this circuit element

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

OCPDeviceType() dss.enums.OCPDevType#

Type of OCP controller device

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

Open(terminal: int, phase: int) None#

Open the specified terminal and phase, if non-zero, or all conductors at the terminal.

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

PhaseLosses() altdss.types.ComplexArray#

Complex array of losses (kVA) by phase

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

Powers() altdss.types.ComplexArray#

Complex array of powers (kVA) into each conductor of each terminal

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

ResetLevel: float#

‘property(…)’

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.

Residuals() altdss.types.Float64Array#

Residual currents for each terminal: (magnitude, angle in degrees)

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

SeasonTargets: altdss.types.Float64Array#

‘property(…)’

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.

SeasonTargetsLow: altdss.types.Float64Array#

‘property(…)’

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.

Seasons: int#

‘property(…)’

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.

SeqCurrents() altdss.types.Float64Array#

Array of symmetrical component currents (magnitudes only) into each 3-phase terminal

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

SeqPowers() altdss.types.ComplexArray#

Complex array of sequence powers (kW, kvar) into each 3-phase terminal

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

SeqVoltages() altdss.types.Float64Array#

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

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

TDn: float#

‘property(…)’

Duration, hrs, of downramp part for SCHEDULE mode. Default is 0.25.

DSS property name: TDn, DSS property index: 31.

TFlat: float#

‘property(…)’

Duration, hrs, of flat part for SCHEDULE mode. Default is 2.0.

DSS property name: TFlat, DSS property index: 30.

TUp: float#

‘property(…)’

Duration, hrs, of upramp part for SCHEDULE mode. Default is 0.25.

DSS property name: TUp, DSS property index: 29.

Terminal: int#

‘property(…)’

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.

TimeChargeTrigger: float#

‘property(…)’

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.

TimeDischargeTrigger: float#

‘property(…)’

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.

TotalPowers() altdss.types.ComplexArray#

Returns an array with the total powers (complex, kVA) at ALL terminals of the active circuit element.

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

Voltages() altdss.types.ComplexArray#

Complex array of voltages at terminals

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

VoltagesMagAng() altdss.types.Float64Array#

Voltages at each conductor in magnitude, angle form as array of doubles.

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

Weights: altdss.types.Float64Array#

‘property(…)’

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.

YPrim() altdss.types.ComplexArray#

YPrim matrix, column order, complex numbers

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

Yearly: altdss.LoadShape.LoadShape#

‘property(…)’

Dispatch loadshape object, If any, for Yearly solution Mode.

DSS property name: Yearly, DSS property index: 24.

Yearly_str: str#

‘property(…)’

Dispatch loadshape object, If any, for Yearly solution Mode.

DSS property name: Yearly, DSS property index: 24.

__hash__()#

Return hash(self).

__init__(api_util, ptr)#
__ne__(other)#

Return self!=value.

__repr__()#

Return repr(self).

begin_edit() None#

Marks a DSS object for editing

In the editing mode, some final side-effects of changing properties are postponed until end_edit is called. This side-effects can be somewhat costly, like updating the model parameters or internal matrices.

If you don’t have any performance constraint, you may edit each property individually without worrying about using begin_edit and end_edit. For convenience, those are emitted automatically when editing single properties outside an edit block.

edit(**kwargs: typing_extensions.Unpack[altdss.StorageController.StorageControllerProperties]) altdss.StorageController.StorageController#

Edit this StorageController.

This method will try to open a new edit context (if not already open), edit the properties, and finalize the edit context. It can be seen as a shortcut to manually setting each property, or a Pythonic analogous (but extended) to the DSS Edit command.

Parameters:

**kwargs – Pass keyword arguments equivalent to the DSS properties of the object.

Returns:

Returns itself to allow call chaining.

end_edit(num_changes: int = 1) None#

Leaves the editing state of a DSS object

num_changes is required for a few classes to correctly match the official OpenDSS behavior and must be the number of properties modified in the current editing block. As of DSS C-API v0.13, this is only required for the Monitor class, when the Action property is used with the Process value.

kWActual: float#

‘property(…)’

(Read only). Actual kW output of all controlled Storage elements.

DSS property name: kWActual, DSS property index: 22.

kWBand: float#

‘property(…)’

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.

kWBandLow: float#

‘property(…)’

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.

kWNeed: float#

‘property(…)’

(Read only). KW needed to meet target.

DSS property name: kWNeed, DSS property index: 23.

kWTarget: float#

‘property(…)’

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.

kWTargetLow: float#

‘property(…)’

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.

kWThreshold: float#

‘property(…)’

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.

kWTotal: float#

‘property(…)’

(Read only). Total rated kW power capacity of Storage elements controlled by this controller.

DSS property name: kWTotal, DSS property index: 20.

kWhActual: float#

‘property(…)’

(Read only). Actual kWh stored of all controlled Storage elements.

DSS property name: kWhActual, DSS property index: 21.

kWhTotal: float#

‘property(…)’

(Read only). Total rated kWh energy Storage capacity of Storage elements controlled by this controller.

DSS property name: kWhTotal, DSS property index: 19.

pctRateCharge: float#

‘property(…)’

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.

pctRatekW: float#

‘property(…)’

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.

pctReserve: float#

‘property(…)’

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.

pctkWBand: float#

‘property(…)’

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.

pctkWBandLow: float#

‘property(…)’

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.

to_json(options: Union[int, dss.enums.DSSJSONFlags] = 0)#

Returns an element’s data as a JSON-encoded string.

The options parameter contains bit-flags to toggle specific features.

By default (options = 0), only the properties explicitly set. The properties are returned in the order they are set in the input. As a reminder, OpenDSS is sensitive to the order of the properties.

The options bit-flags are available in the DSSJSONFlags enum. Values used by this function are:

  • Full: if set, all properties are returned, ordered by property index instead.

  • SkipRedundant: if used with Full, all properties except redundant and unused ones are returned.

  • EnumAsInt: enumerated properties are returned as integer values instead of strings.

  • FullNames: any element reference will use the full name ({class name}.{element name}) even if not required.

  • Pretty: more whitespace is used in the output for a “prettier” format.

  • SkipDSSClass: do not add the “DSSClass” property to the JSON objects.

NOT IMPLEMENTED YET:

  • State: include run-time state information

  • Debug: include debug information

Other bit-flags are reserved for future uses. Please use DSSJSONFlags enum to avoid potential conflicts.

(API Extension)

class altdss.StorageController.StorageControllerBatch(api_util, **kwargs)#

Bases: altdss.Batch.DSSBatch, altdss.CircuitElement.CircuitElementBatchMixin

BaseFreq: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

Base Frequency for ratings.

DSS property name: BaseFreq, DSS property index: 38.

ComplexSeqCurrents() altdss.types.ComplexArray#

Complex double array of Sequence Currents for all conductors of all terminals of active circuit element.

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

ComplexSeqVoltages() altdss.types.ComplexArray#

Complex double array of Sequence Voltage for all terminals of active circuit element.

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

Currents() altdss.types.ComplexArray#

Complex array of currents into each conductor of each terminal

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

CurrentsMagAng() altdss.types.Float64Array#

Currents in magnitude, angle (degrees) format as a array of doubles.

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

Daily: List[altdss.LoadShape.LoadShape]#

‘property(…)’

Dispatch loadshape object, If any, for Daily solution mode.

DSS property name: Daily, DSS property index: 25.

Daily_str: List[str]#

‘property(…)’

Dispatch loadshape object, If any, for Daily solution mode.

DSS property name: Daily, DSS property index: 25.

DispFactor: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

Defaults to 1 (disabled). Set to any value between 0 and 1 to enable this parameter.

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.

Duty: List[altdss.LoadShape.LoadShape]#

‘property(…)’

Dispatch loadshape object, If any, for Dutycycle solution mode.

DSS property name: Duty, DSS property index: 26.

Duty_str: List[str]#

‘property(…)’

Dispatch loadshape object, If any, for Dutycycle solution mode.

DSS property name: Duty, DSS property index: 26.

Element: List[altdss.DSSObj.DSSObj]#

‘property(…)’

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.

ElementList: List[List[str]]#

‘property(…)’

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.

Element_str: List[str]#

‘property(…)’

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.

Enabled: List[bool]#

‘property(…)’

{Yes|No or True|False} Indicates whether this element is enabled.

DSS property name: Enabled, DSS property index: 39.

EventLog: List[bool]#

‘property(…)’

{Yes/True | No/False} Default is No. Log control actions to Eventlog.

DSS property name: EventLog, DSS property index: 27.

FullName() List[str]#

Returns the full name (including object type) for all objects in this batch

GUID() List[str]#

GUID/UUID for each object. Currently used only in the CIM-related methods.

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

Handle() altdss.types.Int32Array#

Index of each element into the circuit’s element list.

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

HasOCPDevice() altdss.types.BoolArray#

For each element in the batch: returns true if a recloser, relay, or fuse controlling the circuit element.

OCP = Overcurrent Protection

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

HasSwitchControl() altdss.types.BoolArray#

For each element in the batch: returns true if the element has a SwtControl attached.

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

HasVoltControl() altdss.types.BoolArray#

For each element in the batch: returns true if the element has a CapControl or RegControl attached.

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

InhibitTime: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

Hours (integer) to inhibit Discharging after going into Charge mode. Default is 5.

DSS property name: InhibitTime, DSS property index: 28.

IsIsolated() altdss.types.BoolArray#

For each element in the batch: returns true if the element is isolated. Note that this only fetches the current value. See also the Topology interface.

Like(value: AnyStr, flags: altdss.enums.SetterFlags = 0)#

Make like another object, e.g.:

New Capacitor.C2 like=c1 …

DSS property name: Like, DSS property index: 40.

Losses() altdss.types.ComplexArray#

For each element in the batch: total losses in the element, in VA (watts, vars).

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

MaxCurrent(terminal: int) altdss.types.Float64Array#

Returns the maximum current (magnitude) at the specified terminal for each element in this batch. Use -1 as terminal to get the value across all terminals.

ModeCharge: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

{Loadshape | Time* | PeakShaveLow | I-PeakShaveLow} 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 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.

ModeCharge_str: List[str]#

‘property(…)’

{Loadshape | Time* | PeakShaveLow | I-PeakShaveLow} 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 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.

ModeDischarge: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

{PeakShave* | Follow | Support | Loadshape | Time | Schedule | I-PeakShave} 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.

In Follow mode, the control is triggered by time and resets the kWTarget value to the present monitored element power. It then attempts to discharge Storage to keep power in the monitored element below the new kWTarget. See TimeDischargeTrigger.

In Support mode, the control operates oppositely of PeakShave mode: Storage is discharged to keep kW power output up near the target.

In Loadshape mode, both charging and discharging precisely follows the per unit loadshape. Storage is discharged when the loadshape value is positive.

In Time mode, the Storage discharge is turned on at the specified %RatekW at the specified discharge trigger time in fractional hours.

In Schedule mode, the Tup, TFlat, and Tdn properties specify the up ramp duration, flat duration, and down ramp duration for the schedule. The schedule start time is set by TimeDischargeTrigger and the rate of discharge for the flat part is determined by %RatekW.

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.

ModeDischarge_str: List[str]#

‘property(…)’

{PeakShave* | Follow | Support | Loadshape | Time | Schedule | I-PeakShave} 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.

In Follow mode, the control is triggered by time and resets the kWTarget value to the present monitored element power. It then attempts to discharge Storage to keep power in the monitored element below the new kWTarget. See TimeDischargeTrigger.

In Support mode, the control operates oppositely of PeakShave mode: Storage is discharged to keep kW power output up near the target.

In Loadshape mode, both charging and discharging precisely follows the per unit loadshape. Storage is discharged when the loadshape value is positive.

In Time mode, the Storage discharge is turned on at the specified %RatekW at the specified discharge trigger time in fractional hours.

In Schedule mode, the Tup, TFlat, and Tdn properties specify the up ramp duration, flat duration, and down ramp duration for the schedule. The schedule start time is set by TimeDischargeTrigger and the rate of discharge for the flat part is determined by %RatekW.

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.

MonPhase: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

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.

MonPhase_str: List[str]#

‘property(…)’

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.

property Name: List[str]#
NumConductors() altdss.types.Int32Array#

Number of conductors per terminal for each element in the batch.

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

NumControllers() altdss.types.Int32Array#

Number of controllers connected to each device in the batch.

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

NumPhases() altdss.types.Int32Array#

Number of Phases for each element in this batch.

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

NumTerminals() altdss.types.Int32Array#

Number of terminals for each Circuit Element in the batch.

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

OCPDevice() List[Union[altdss.DSSObj.DSSObj, None]]#

Returns (as a list of Python objects) the OCP device controlling each element.

OCPDeviceIndex() altdss.types.Int32Array#

For each element in the batch: index into each controller list of the OCP Device controlling each circuit element

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

OCPDeviceType() List[dss.enums.OCPDevType]#

For each element in the batch: type of OCP controller device

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

PhaseLosses() altdss.types.ComplexArray#

Complex array of losses (kVA) by phase

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

Powers() altdss.types.ComplexArray#

Complex array of powers (kVA) into each conductor of each terminal, of each element in the batch.

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

ResetLevel: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

SeasonTargets: List[altdss.types.Float64Array]#

‘property(…)’

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.

SeasonTargetsLow: List[altdss.types.Float64Array]#

‘property(…)’

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.

Seasons: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

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.

SeqCurrents() altdss.types.Float64Array#

Array of symmetrical component currents (magnitudes only) into each 3-phase terminal of each element

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

SeqPowers() altdss.types.ComplexArray#

Complex array of sequence powers (kW, kvar) into each 3-phase terminal of each element

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

SeqVoltages() altdss.types.Float64Array#

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

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

TDn: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

Duration, hrs, of downramp part for SCHEDULE mode. Default is 0.25.

DSS property name: TDn, DSS property index: 31.

TFlat: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

Duration, hrs, of flat part for SCHEDULE mode. Default is 2.0.

DSS property name: TFlat, DSS property index: 30.

TUp: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

Duration, hrs, of upramp part for SCHEDULE mode. Default is 0.25.

DSS property name: TUp, DSS property index: 29.

Terminal: altdss.ArrayProxy.BatchInt32ArrayProxy#

‘property(…)’

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.

TimeChargeTrigger: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

TimeDischargeTrigger: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

TotalPowers() altdss.types.ComplexArray#

Returns an array with the total powers (complex, kVA) at all terminals of the circuit elements in this batch.

The resulting array is equivalent to concatenating the TotalPowers for each element.

Voltages() altdss.types.ComplexArray#

Complex array of voltages at terminals

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

VoltagesMagAng() altdss.types.Float64Array#

Voltages at each conductor in magnitude, angle form as array of doubles.

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

Weights: List[altdss.types.Float64Array]#

‘property(…)’

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.

Yearly: List[altdss.LoadShape.LoadShape]#

‘property(…)’

Dispatch loadshape object, If any, for Yearly solution Mode.

DSS property name: Yearly, DSS property index: 24.

Yearly_str: List[str]#

‘property(…)’

Dispatch loadshape object, If any, for Yearly solution Mode.

DSS property name: Yearly, DSS property index: 24.

__call__()#
__getitem__(idx0) altdss.DSSObj.DSSObj#

Get element at 0-based index of the batch pointer array

__init__(api_util, **kwargs)#
__iter__()#
__len__() int#
batch(**kwargs) altdss.Batch.DSSBatch#

Filter a batch using integer or float DSS properties, returning a new batch.

For integers, provide a single value to match.

For floats, provide a range as a 2-valued tuple/list (min value, max value), or an exact value to value (not recommended).

Multiple properties can be listed to allow filtering various conditions.

Example for loads:

    # Create an initial batch using a regular expression
    abc_loads = altdss.Load.batch(re=r'^abc.*$') # a batch of all loads with names starting with "abc"
    abc_loads_filtered = abc_loads.batch(Class=1, Phases=1, kV=(0.1, 1.0))

    # Create an initial batch, already filtered
    abc_loads_filtered = altdss.Load.batch(re=r'^abc.*$', Class=1, Phases=1, kV=(0.1, 1.0))
begin_edit() None#

Marks for editing all DSS objects in the batch

In the editing mode, some final side-effects of changing properties are postponed until end_edit is called. This side-effects can be somewhat costly, like updating the model parameters or internal matrices.

If you don’t have any performance constraint, you may edit each property individually without worrying about using begin_edit and end_edit. For convenience, those are emitted automatically when editing single properties outside an edit block.

edit(**kwargs: typing_extensions.Unpack[altdss.StorageController.StorageControllerBatchProperties]) altdss.StorageController.StorageControllerBatch#

Edit this StorageController batch.

This method will try to open a new edit context (if not already open), edit the properties, and finalize the edit context for objects in the batch. It can be seen as a shortcut to manually setting each property, or a Pythonic analogous (but extended) to the DSS BatchEdit command.

Parameters:

**kwargs – Pass keyword arguments equivalent to the DSS properties of the objects.

Returns:

Returns itself to allow call chaining.

end_edit(num_changes: int = 1) None#

Leaves the editing states of all DSS objects in the batch

num_changes is required for a few classes to correctly match the official OpenDSS behavior and must be the number of properties modified in the current editing block. As of DSS C-API v0.13, this is only required for the Monitor class, when the Action property is used with the Process value.

kWActual: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

(Read only). Actual kW output of all controlled Storage elements.

DSS property name: kWActual, DSS property index: 22.

kWBand: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

kWBandLow: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

kWNeed: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

(Read only). KW needed to meet target.

DSS property name: kWNeed, DSS property index: 23.

kWTarget: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

kWTargetLow: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

kWThreshold: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

kWTotal: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

(Read only). Total rated kW power capacity of Storage elements controlled by this controller.

DSS property name: kWTotal, DSS property index: 20.

kWhActual: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

(Read only). Actual kWh stored of all controlled Storage elements.

DSS property name: kWhActual, DSS property index: 21.

kWhTotal: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

(Read only). Total rated kWh energy Storage capacity of Storage elements controlled by this controller.

DSS property name: kWhTotal, DSS property index: 19.

pctRateCharge: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

pctRatekW: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

pctReserve: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

pctkWBand: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

pctkWBandLow: altdss.ArrayProxy.BatchFloat64ArrayProxy#

‘property(…)’

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.

to_json(options: Union[int, dss.enums.DSSJSONFlags] = 0)#

Returns the data (as a list) of the elements in a batch as a JSON-encoded string.

The options parameter contains bit-flags to toggle specific features. See Obj_ToJSON (C-API) for more, or DSSObj.to_json in Python.

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

to_list()#
class altdss.StorageController.StorageControllerBatchProperties#

Bases: typing_extensions.TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

BaseFreq: Union[float, altdss.types.Float64Array]#

None

Daily: Union[AnyStr, altdss.LoadShape.LoadShape, List[AnyStr], List[altdss.LoadShape.LoadShape]]#

None

DispFactor: Union[float, altdss.types.Float64Array]#

None

Duty: Union[AnyStr, altdss.LoadShape.LoadShape, List[AnyStr], List[altdss.LoadShape.LoadShape]]#

None

Element: Union[AnyStr, altdss.DSSObj.DSSObj, List[AnyStr], List[altdss.DSSObj.DSSObj]]#

None

ElementList: List[AnyStr]#

None

Enabled: bool#

None

EventLog: bool#

None

InhibitTime: Union[int, altdss.types.Int32Array]#

None

Like: AnyStr#

None

ModeCharge: Union[AnyStr, int, altdss.enums.StorageControllerChargeMode, List[AnyStr], List[int], List[altdss.enums.StorageControllerChargeMode], altdss.types.Int32Array]#

None

ModeDischarge: Union[AnyStr, int, altdss.enums.StorageControllerDischargeMode, List[AnyStr], List[int], List[altdss.enums.StorageControllerDischargeMode], altdss.types.Int32Array]#

None

MonPhase: Union[AnyStr, int, altdss.enums.MonitoredPhase, List[AnyStr], List[int], List[altdss.enums.MonitoredPhase], altdss.types.Int32Array]#

None

ResetLevel: Union[float, altdss.types.Float64Array]#

None

SeasonTargets: altdss.types.Float64Array#

None

SeasonTargetsLow: altdss.types.Float64Array#

None

Seasons: Union[int, altdss.types.Int32Array]#

None

TDn: Union[float, altdss.types.Float64Array]#

None

TFlat: Union[float, altdss.types.Float64Array]#

None

TUp: Union[float, altdss.types.Float64Array]#

None

Terminal: Union[int, altdss.types.Int32Array]#

None

TimeChargeTrigger: Union[float, altdss.types.Float64Array]#

None

TimeDischargeTrigger: Union[float, altdss.types.Float64Array]#

None

Weights: altdss.types.Float64Array#

None

Yearly: Union[AnyStr, altdss.LoadShape.LoadShape, List[AnyStr], List[altdss.LoadShape.LoadShape]]#

None

__contains__()#

True if the dictionary has the specified key, else False.

__delattr__()#

Implement delattr(self, name).

__delitem__()#

Delete self[key].

__dir__()#

Default dir() implementation.

__format__()#

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__ge__()#

Return self>=value.

__getattribute__()#

Return getattr(self, name).

__getitem__()#

Return self[key].

__getstate__()#

Helper for pickle.

__gt__()#

Return self>value.

__init__()#

Initialize self. See help(type(self)) for accurate signature.

__ior__()#

Return self|=value.

__iter__()#

Implement iter(self).

__le__()#

Return self<=value.

__len__()#

Return len(self).

__lt__()#

Return self<value.

__ne__()#

Return self!=value.

__new__()#

Create and return a new object. See help(type) for accurate signature.

__or__()#

Return self|value.

__reduce__()#

Helper for pickle.

__reduce_ex__()#

Helper for pickle.

__repr__()#

Return repr(self).

__reversed__()#

Return a reverse iterator over the dict keys.

__ror__()#

Return value|self.

__setitem__()#

Set self[key] to value.

__sizeof__()#

D.sizeof() -> size of D in memory, in bytes

__str__()#

Return str(self).

__subclasshook__()#

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.subclasscheck(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

clear()#

D.clear() -> None. Remove all items from D.

copy()#

D.copy() -> a shallow copy of D

get()#

Return the value for key if key is in the dictionary, else default.

items()#

D.items() -> a set-like object providing a view on D’s items

kWActual: Union[float, altdss.types.Float64Array]#

None

kWBand: Union[float, altdss.types.Float64Array]#

None

kWBandLow: Union[float, altdss.types.Float64Array]#

None

kWNeed: Union[float, altdss.types.Float64Array]#

None

kWTarget: Union[float, altdss.types.Float64Array]#

None

kWTargetLow: Union[float, altdss.types.Float64Array]#

None

kWThreshold: Union[float, altdss.types.Float64Array]#

None

kWTotal: Union[float, altdss.types.Float64Array]#

None

kWhActual: Union[float, altdss.types.Float64Array]#

None

kWhTotal: Union[float, altdss.types.Float64Array]#

None

keys()#

D.keys() -> a set-like object providing a view on D’s keys

pctRateCharge: Union[float, altdss.types.Float64Array]#

None

pctRatekW: Union[float, altdss.types.Float64Array]#

None

pctReserve: Union[float, altdss.types.Float64Array]#

None

pctkWBand: Union[float, altdss.types.Float64Array]#

None

pctkWBandLow: Union[float, altdss.types.Float64Array]#

None

pop()#

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()#

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault()#

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update()#

D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()#

D.values() -> an object providing a view on D’s values

class altdss.StorageController.StorageControllerProperties#

Bases: typing_extensions.TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

BaseFreq: float#

None

Daily: Union[AnyStr, altdss.LoadShape.LoadShape]#

None

DispFactor: float#

None

Duty: Union[AnyStr, altdss.LoadShape.LoadShape]#

None

Element: Union[AnyStr, altdss.DSSObj.DSSObj]#

None

ElementList: List[AnyStr]#

None

Enabled: bool#

None

EventLog: bool#

None

InhibitTime: int#

None

Like: AnyStr#

None

ModeCharge: Union[AnyStr, int, altdss.enums.StorageControllerChargeMode]#

None

ModeDischarge: Union[AnyStr, int, altdss.enums.StorageControllerDischargeMode]#

None

MonPhase: Union[AnyStr, int, altdss.enums.MonitoredPhase]#

None

ResetLevel: float#

None

SeasonTargets: altdss.types.Float64Array#

None

SeasonTargetsLow: altdss.types.Float64Array#

None

Seasons: int#

None

TDn: float#

None

TFlat: float#

None

TUp: float#

None

Terminal: int#

None

TimeChargeTrigger: float#

None

TimeDischargeTrigger: float#

None

Weights: altdss.types.Float64Array#

None

Yearly: Union[AnyStr, altdss.LoadShape.LoadShape]#

None

__contains__()#

True if the dictionary has the specified key, else False.

__delattr__()#

Implement delattr(self, name).

__delitem__()#

Delete self[key].

__dir__()#

Default dir() implementation.

__format__()#

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__ge__()#

Return self>=value.

__getattribute__()#

Return getattr(self, name).

__getitem__()#

Return self[key].

__getstate__()#

Helper for pickle.

__gt__()#

Return self>value.

__init__()#

Initialize self. See help(type(self)) for accurate signature.

__ior__()#

Return self|=value.

__iter__()#

Implement iter(self).

__le__()#

Return self<=value.

__len__()#

Return len(self).

__lt__()#

Return self<value.

__ne__()#

Return self!=value.

__new__()#

Create and return a new object. See help(type) for accurate signature.

__or__()#

Return self|value.

__reduce__()#

Helper for pickle.

__reduce_ex__()#

Helper for pickle.

__repr__()#

Return repr(self).

__reversed__()#

Return a reverse iterator over the dict keys.

__ror__()#

Return value|self.

__setitem__()#

Set self[key] to value.

__sizeof__()#

D.sizeof() -> size of D in memory, in bytes

__str__()#

Return str(self).

__subclasshook__()#

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.subclasscheck(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

clear()#

D.clear() -> None. Remove all items from D.

copy()#

D.copy() -> a shallow copy of D

get()#

Return the value for key if key is in the dictionary, else default.

items()#

D.items() -> a set-like object providing a view on D’s items

kWActual: float#

None

kWBand: float#

None

kWBandLow: float#

None

kWNeed: float#

None

kWTarget: float#

None

kWTargetLow: float#

None

kWThreshold: float#

None

kWTotal: float#

None

kWhActual: float#

None

kWhTotal: float#

None

keys()#

D.keys() -> a set-like object providing a view on D’s keys

pctRateCharge: float#

None

pctRatekW: float#

None

pctReserve: float#

None

pctkWBand: float#

None

pctkWBandLow: float#

None

pop()#

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()#

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault()#

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update()#

D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()#

D.values() -> an object providing a view on D’s values