DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
|
Public Types | |
typedef CapControl::Properties | Properties |
typedef CapControl | BatchElementClass |
typedef CapControl::CapControlType | CapControlType |
Public Member Functions | |
CapControlBatch (APIUtil *util) | |
Create a batch of all CapControl elements. | |
CapControlBatch (APIUtil *util, int32_t prop_idx, int32_t prop_value) | |
Create a batch of all CapControl elements that match an integer property value. | |
CapControlBatch (APIUtil *util, const char *regexp) | |
Create a batch of all CapControl elements that match a regular expression. | |
CapControlBatch & | begin_edit () |
CapControlBatch & | end_edit (int32_t num_edits=1) |
strings | element () |
Full object name of the circuit element, typically a line or transformer, to which the capacitor control's PT and/or CT are connected.There is no default; must be specified. More... | |
CapControlBatch & | element (dss::obj::DSSObj &value) |
CapControlBatch & | element (const string &value) |
std::vector< dss::obj::DSSObj > | element_obj () |
Full object name of the circuit element, typically a line or transformer, to which the capacitor control's PT and/or CT are connected.There is no default; must be specified. More... | |
CapControlBatch & | element_obj (dss::obj::DSSObj &value) |
BatchInt32ArrayProxy | terminal () |
Number of the terminal of the circuit element to which the CapControl is connected. More... | |
CapControlBatch & | terminal (int32_t value) |
template<typename T > | |
CapControlBatch & | terminal (T &value) |
template<typename T > | |
CapControlBatch & | terminal (typename T::iterator it_begin, typename T::iterator it_end) |
strings | capacitor () |
Name of Capacitor element which the CapControl controls. More... | |
CapControlBatch & | capacitor (dss::obj::Capacitor &value) |
CapControlBatch & | capacitor (const string &value) |
std::vector< dss::obj::Capacitor > | capacitor_obj () |
Name of Capacitor element which the CapControl controls. More... | |
CapControlBatch & | capacitor_obj (dss::obj::Capacitor &value) |
BatchInt32ArrayProxy | type () |
{Current | voltage | kvar | PF | time } Control type. More... | |
CapControlBatch & | type (string &value) |
CapControlBatch & | type (int32_t value) |
CapControlBatch & | type (CapControl::CapControlType value) |
CapControlBatch & | type (strings &value) |
CapControlBatch & | type (std::vector< int32_t > &value) |
CapControlBatch & | type (std::vector< CapControl::CapControlType > &value) |
strings | type_str () |
{Current | voltage | kvar | PF | time } Control type. More... | |
CapControlBatch & | type_str (string &value) |
CapControlBatch & | type_str (strings &value) |
BatchFloat64ArrayProxy | PTratio () |
Ratio of the PT that converts the monitored voltage to the control voltage. More... | |
CapControlBatch & | PTratio (double value) |
template<typename T > | |
CapControlBatch & | PTratio (T &value) |
template<typename T > | |
CapControlBatch & | PTratio (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | CTratio () |
Ratio of the CT from line amps to control ampere setting for current and kvar control types. More... | |
CapControlBatch & | CTratio (double value) |
template<typename T > | |
CapControlBatch & | CTratio (T &value) |
template<typename T > | |
CapControlBatch & | CTratio (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | ONsetting () |
Value at which the control arms to switch the capacitor ON (or ratchet up a step). More... | |
CapControlBatch & | ONsetting (double value) |
template<typename T > | |
CapControlBatch & | ONsetting (T &value) |
template<typename T > | |
CapControlBatch & | ONsetting (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | OFFsetting () |
Value at which the control arms to switch the capacitor OFF. More... | |
CapControlBatch & | OFFsetting (double value) |
template<typename T > | |
CapControlBatch & | OFFsetting (T &value) |
template<typename T > | |
CapControlBatch & | OFFsetting (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | Delay () |
Time delay, in seconds, from when the control is armed before it sends out the switching command to turn ON. More... | |
CapControlBatch & | Delay (double value) |
template<typename T > | |
CapControlBatch & | Delay (T &value) |
template<typename T > | |
CapControlBatch & | Delay (typename T::iterator it_begin, typename T::iterator it_end) |
bools | VoltOverride () |
{Yes | No} Default is No. More... | |
CapControlBatch & | VoltOverride (bool value) |
CapControlBatch & | VoltOverride (bools &value) |
BatchFloat64ArrayProxy | Vmax () |
Maximum voltage, in volts. More... | |
CapControlBatch & | Vmax (double value) |
template<typename T > | |
CapControlBatch & | Vmax (T &value) |
template<typename T > | |
CapControlBatch & | Vmax (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | Vmin () |
Minimum voltage, in volts. More... | |
CapControlBatch & | Vmin (double value) |
template<typename T > | |
CapControlBatch & | Vmin (T &value) |
template<typename T > | |
CapControlBatch & | Vmin (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | DelayOFF () |
Time delay, in seconds, for control to turn OFF when present state is ON. More... | |
CapControlBatch & | DelayOFF (double value) |
template<typename T > | |
CapControlBatch & | DelayOFF (T &value) |
template<typename T > | |
CapControlBatch & | DelayOFF (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | DeadTime () |
Dead time after capacitor is turned OFF before it can be turned back ON. More... | |
CapControlBatch & | DeadTime (double value) |
template<typename T > | |
CapControlBatch & | DeadTime (T &value) |
template<typename T > | |
CapControlBatch & | DeadTime (typename T::iterator it_begin, typename T::iterator it_end) |
BatchInt32ArrayProxy | CTPhase () |
Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. More... | |
CapControlBatch & | CTPhase (string &value) |
CapControlBatch & | CTPhase (int32_t value) |
CapControlBatch & | CTPhase (MonitoredPhase value) |
CapControlBatch & | CTPhase (strings &value) |
CapControlBatch & | CTPhase (std::vector< int32_t > &value) |
CapControlBatch & | CTPhase (std::vector< MonitoredPhase > &value) |
strings | CTPhase_str () |
Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. More... | |
CapControlBatch & | CTPhase_str (string &value) |
CapControlBatch & | CTPhase_str (strings &value) |
BatchInt32ArrayProxy | PTPhase () |
Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. More... | |
CapControlBatch & | PTPhase (string &value) |
CapControlBatch & | PTPhase (int32_t value) |
CapControlBatch & | PTPhase (MonitoredPhase value) |
CapControlBatch & | PTPhase (strings &value) |
CapControlBatch & | PTPhase (std::vector< int32_t > &value) |
CapControlBatch & | PTPhase (std::vector< MonitoredPhase > &value) |
strings | PTPhase_str () |
Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. More... | |
CapControlBatch & | PTPhase_str (string &value) |
CapControlBatch & | PTPhase_str (strings &value) |
strings | VBus () |
Name of bus to use for voltage override function. More... | |
CapControlBatch & | VBus (const string &value) |
CapControlBatch & | VBus (strings &value) |
bools | EventLog () |
{Yes/True* | No/False} Default is YES for CapControl. More... | |
CapControlBatch & | EventLog (bool value) |
CapControlBatch & | EventLog (bools &value) |
strings | UserModel () |
Name of DLL containing user-written CapControl model, overriding the default model. More... | |
CapControlBatch & | UserModel (const string &value) |
CapControlBatch & | UserModel (strings &value) |
strings | UserData () |
String (in quotes or parentheses if necessary) that gets passed to the user-written CapControl model Edit function for defining the data required for that model. More... | |
CapControlBatch & | UserData (const string &value) |
CapControlBatch & | UserData (strings &value) |
BatchFloat64ArrayProxy | pctMinkvar () |
For PF control option, min percent of total bank kvar at which control will close capacitor switch. More... | |
CapControlBatch & | pctMinkvar (double value) |
template<typename T > | |
CapControlBatch & | pctMinkvar (T &value) |
template<typename T > | |
CapControlBatch & | pctMinkvar (typename T::iterator it_begin, typename T::iterator it_end) |
CapControlBatch & | Reset (bool value) |
{Yes | No} If Yes, forces Reset of this CapControl. More... | |
BatchFloat64ArrayProxy | basefreq () |
Base Frequency for ratings. More... | |
CapControlBatch & | basefreq (double value) |
template<typename T > | |
CapControlBatch & | basefreq (T &value) |
template<typename T > | |
CapControlBatch & | basefreq (typename T::iterator it_begin, typename T::iterator it_end) |
bools | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
CapControlBatch & | enabled (bool value) |
CapControlBatch & | enabled (bools &value) |
CapControlBatch & | like (const string &value) |
Make like another object, e.g. More... | |
CapControlBatch & | like (const char *value) |
Make like another object, e.g. More... | |
Public Member Functions inherited from dss::obj::DSSBatch | |
DSSBatch (APIUtil *util, int32_t cls_idx) | |
Create a batch of all elements in the DSS class. | |
DSSBatch (APIUtil *util, int32_t cls_idx, int32_t prop_idx, int32_t prop_value) | |
Create a batch of all elements that match an integer property value. | |
DSSBatch (APIUtil *util, int32_t cls_idx, const char *regexp) | |
Create a batch of all elements that match a regular expression. | |
DSSBatch (APIUtil *util) | |
Create an uninitialized batch instance. | |
strings | name () |
Additional Inherited Members | |
Public Attributes inherited from dss::obj::DSSBatch | |
APIUtil * | api_util |
void ** | pointer |
int32_t | count [2] |
Protected Member Functions inherited from dss::obj::DSSBatch | |
void | check_for_error () |
bools | get_batch_bool (int32_t index) |
std::vector< complex > | get_batch_complex (int32_t index) |
template<typename T = VectorXd> | |
std::vector< T > | get_batch_valarray (int32_t index) |
void | set_batch_complex_for_each (int32_t index, std::vector< complex > &values) |
template<typename T > | |
void | set_batch_val (int32_t index, const T &value) |
template<typename T = VectorXd> | |
T | get_batch_val (int32_t index) |
template<typename T > | |
void | set_batch_val_for_each (int32_t index, typename T::iterator v, typename T::iterator v_end) |
Static Protected Member Functions inherited from dss::obj::DSSBatch | |
template<typename T = VectorXd> | |
static T | get_batch_val (int32_t index, DSSBatch &batch) |
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 23
|
inline |
Name of Capacitor element which the CapControl controls.
No Default; Must be specified.Do not specify the full object name; "Capacitor" is assumed for the object class. Example:
Capacitor=cap1
DSS property name: capacitor, DSS property index: 3
|
inline |
Name of Capacitor element which the CapControl controls.
No Default; Must be specified.Do not specify the full object name; "Capacitor" is assumed for the object class. Example:
Capacitor=cap1
DSS property name: capacitor, DSS property index: 3
|
inline |
Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases.
Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default.
DSS property name: CTPhase, DSS property index: 15
|
inline |
Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases.
Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default.
DSS property name: CTPhase, DSS property index: 15
|
inline |
Ratio of the CT from line amps to control ampere setting for current and kvar control types.
DSS property name: CTratio, DSS property index: 6
|
inline |
Dead time after capacitor is turned OFF before it can be turned back ON.
Default is 300 sec.
DSS property name: DeadTime, DSS property index: 14
|
inline |
Time delay, in seconds, from when the control is armed before it sends out the switching command to turn ON.
The control may reset before the action actually occurs. This is used to determine which capacity control will act first. Default is 15. You may specify any floating point number to achieve a model of whatever condition is necessary.
DSS property name: Delay, DSS property index: 9
|
inline |
Time delay, in seconds, for control to turn OFF when present state is ON.
Default is 15.
DSS property name: DelayOFF, DSS property index: 13
|
inline |
Full object name of the circuit element, typically a line or transformer, to which the capacitor control's PT and/or CT are connected.There is no default; must be specified.
DSS property name: element, DSS property index: 1
|
inline |
Full object name of the circuit element, typically a line or transformer, to which the capacitor control's PT and/or CT are connected.There is no default; must be specified.
DSS property name: element, DSS property index: 1
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 24
|
inline |
{Yes/True* | No/False} Default is YES for CapControl.
Log control actions to Eventlog.
DSS property name: EventLog, DSS property index: 18
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 25
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 25
|
inline |
Value at which the control arms to switch the capacitor OFF.
(See help for ONsetting)For Time control, is OK to have Off time the next day ( < On time)
DSS property name: OFFsetting, DSS property index: 8
|
inline |
Value at which the control arms to switch the capacitor ON (or ratchet up a step).
Type of Control:
Current: Line Amps / CTratio Voltage: Line-Neutral (or Line-Line for delta) Volts / PTratio kvar: Total kvar, all phases (3-phase for pos seq model). This is directional. PF: Power Factor, Total power in monitored terminal. Negative for Leading. Time: Hrs from Midnight as a floating point number (decimal). 7:30am would be entered as 7.5.
DSS property name: ONsetting, DSS property index: 7
|
inline |
For PF control option, min percent of total bank kvar at which control will close capacitor switch.
Default = 50.
DSS property name: pctMinkvar, DSS property index: 21
|
inline |
Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases.
Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default.
DSS property name: PTPhase, DSS property index: 16
|
inline |
Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases.
Default=1. If delta or L-L connection, enter the first or the two phases being monitored [1-2, 2-3, 3-1]. Must be less than the number of phases. Does not apply to kvar control which uses all phases by default.
DSS property name: PTPhase, DSS property index: 16
|
inline |
Ratio of the PT that converts the monitored voltage to the control voltage.
Default is 60. If the capacitor is Wye, the 1st phase line-to-neutral voltage is monitored. Else, the line-to-line voltage (1st - 2nd phase) is monitored.
DSS property name: PTratio, DSS property index: 5
|
inline |
{Yes | No} If Yes, forces Reset of this CapControl.
DSS property name: Reset, DSS property index: 22
|
inline |
Number of the terminal of the circuit element to which the CapControl is connected.
1 or 2, typically. Default is 1.
DSS property name: terminal, DSS property index: 2
|
inline |
{Current | voltage | kvar | PF | time } Control type.
Specify the ONsetting and OFFsetting appropriately with the type of control. (See help for ONsetting)
DSS property name: type, DSS property index: 4
|
inline |
{Current | voltage | kvar | PF | time } Control type.
Specify the ONsetting and OFFsetting appropriately with the type of control. (See help for ONsetting)
DSS property name: type, DSS property index: 4
|
inline |
String (in quotes or parentheses if necessary) that gets passed to the user-written CapControl model Edit function for defining the data required for that model.
DSS property name: UserData, DSS property index: 20
|
inline |
Name of DLL containing user-written CapControl model, overriding the default model.
Set to "none" to negate previous setting.
DSS property name: UserModel, DSS property index: 19
|
inline |
Name of bus to use for voltage override function.
Default is bus at monitored terminal. Sometimes it is useful to monitor a bus in another location to emulate various DMS control algorithms.
DSS property name: VBus, DSS property index: 17
|
inline |
Maximum voltage, in volts.
If the voltage across the capacitor divided by the PTRATIO is greater than this voltage, the capacitor will switch OFF regardless of other control settings. Default is 126 (goes with a PT ratio of 60 for 12.47 kV system).
DSS property name: Vmax, DSS property index: 11
|
inline |
Minimum voltage, in volts.
If the voltage across the capacitor divided by the PTRATIO is less than this voltage, the capacitor will switch ON regardless of other control settings. Default is 115 (goes with a PT ratio of 60 for 12.47 kV system).
DSS property name: Vmin, DSS property index: 12
|
inline |
{Yes | No} Default is No.
Switch to indicate whether VOLTAGE OVERRIDE is to be considered. Vmax and Vmin must be set to reasonable values if this property is Yes.
DSS property name: VoltOverride, DSS property index: 10