DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
|
Classes | |
struct | Properties |
Public Types | |
enum class | CapControlType : int32_t { Current = 0 , Voltage = 1 , kvar = 2 , Time = 3 , PowerFactor = 4 } |
CapControl: Type (DSS enumeration for CapControl) More... | |
Public Member Functions | |
CapControl (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
CapControl (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
CapControl (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
CapControl & | begin_edit () |
Marks an object for edition. More... | |
CapControl & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
string | 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... | |
CapControl & | element (const string &value) |
CapControl & | element (dss::obj::DSSObj &value) |
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... | |
CapControl & | element_obj (dss::obj::DSSObj &value) |
int32_t | terminal () |
Number of the terminal of the circuit element to which the CapControl is connected. More... | |
CapControl & | terminal (int32_t value) |
string | capacitor () |
Name of Capacitor element which the CapControl controls. More... | |
CapControl & | capacitor (const string &value) |
CapControl & | capacitor (dss::obj::Capacitor &value) |
dss::obj::Capacitor | capacitor_obj () |
Name of Capacitor element which the CapControl controls. More... | |
CapControl & | capacitor_obj (dss::obj::Capacitor &value) |
CapControlType | type () |
{Current | voltage | kvar | PF | time } Control type. More... | |
CapControl & | type (int32_t value) |
CapControl & | type (CapControlType value) |
CapControl & | type (const string &value) |
CapControl & | type (const char *value) |
string | type_str () |
{Current | voltage | kvar | PF | time } Control type. More... | |
CapControl & | type_str (const string &value) |
{Current | voltage | kvar | PF | time } Control type. More... | |
double | PTratio () |
Ratio of the PT that converts the monitored voltage to the control voltage. More... | |
CapControl & | PTratio (double value) |
double | CTratio () |
Ratio of the CT from line amps to control ampere setting for current and kvar control types. More... | |
CapControl & | CTratio (double value) |
double | ONsetting () |
Value at which the control arms to switch the capacitor ON (or ratchet up a step). More... | |
CapControl & | ONsetting (double value) |
double | OFFsetting () |
Value at which the control arms to switch the capacitor OFF. More... | |
CapControl & | OFFsetting (double value) |
double | Delay () |
Time delay, in seconds, from when the control is armed before it sends out the switching command to turn ON. More... | |
CapControl & | Delay (double value) |
bool | VoltOverride () |
{Yes | No} Default is No. More... | |
CapControl & | VoltOverride (bool value) |
double | Vmax () |
Maximum voltage, in volts. More... | |
CapControl & | Vmax (double value) |
double | Vmin () |
Minimum voltage, in volts. More... | |
CapControl & | Vmin (double value) |
double | DelayOFF () |
Time delay, in seconds, for control to turn OFF when present state is ON. More... | |
CapControl & | DelayOFF (double value) |
double | DeadTime () |
Dead time after capacitor is turned OFF before it can be turned back ON. More... | |
CapControl & | DeadTime (double value) |
int32_t | CTPhase () |
Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. More... | |
CapControl & | CTPhase (int32_t value) |
CapControl & | CTPhase (MonitoredPhase value) |
CapControl & | CTPhase (const string &value) |
CapControl & | CTPhase (const char *value) |
string | CTPhase_str () |
Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. More... | |
CapControl & | CTPhase_str (const string &value) |
Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. More... | |
int32_t | PTPhase () |
Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. More... | |
CapControl & | PTPhase (int32_t value) |
CapControl & | PTPhase (MonitoredPhase value) |
CapControl & | PTPhase (const string &value) |
CapControl & | PTPhase (const char *value) |
string | PTPhase_str () |
Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. More... | |
CapControl & | PTPhase_str (const string &value) |
Number of the phase being monitored for VOLTAGE control or one of {AVG | MAX | MIN} for all phases. More... | |
string | VBus () |
Name of bus to use for voltage override function. More... | |
CapControl & | VBus (const string &value) |
CapControl & | VBus (const char *value) |
bool | EventLog () |
{Yes/True* | No/False} Default is YES for CapControl. More... | |
CapControl & | EventLog (bool value) |
string | UserModel () |
Name of DLL containing user-written CapControl model, overriding the default model. More... | |
CapControl & | UserModel (const string &value) |
CapControl & | UserModel (const char *value) |
string | 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... | |
CapControl & | UserData (const string &value) |
CapControl & | UserData (const char *value) |
double | pctMinkvar () |
For PF control option, min percent of total bank kvar at which control will close capacitor switch. More... | |
CapControl & | pctMinkvar (double value) |
CapControl & | Reset (bool value) |
{Yes | No} If Yes, forces Reset of this CapControl. More... | |
double | basefreq () |
Base Frequency for ratings. More... | |
CapControl & | basefreq (double value) |
bool | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
CapControl & | enabled (bool value) |
CapControl & | like (const string &value) |
Make like another object, e.g. More... | |
CapControl & | like (const char *value) |
Make like another object, e.g. More... | |
Public Member Functions inherited from dss::obj::DSSObj | |
DSSObj (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Static Public Attributes | |
static const char | dss_cls_name [] = "CapControl" |
static const int32_t | dss_cls_idx = 24 |
Additional Inherited Members | |
Public Attributes inherited from dss::obj::DSSObj | |
APIUtil * | api_util |
void * | ptr |
Protected Member Functions inherited from dss::obj::DSSObj | |
void | check_for_error () |
void | set_string (int32_t index, const string &value) |
void | set_string (int32_t index, const char *value) |
string | get_prop_string (int32_t index) |
complex | get_complex (int32_t index) |
void | set_complex (int32_t index, complex value) |
void | set_string_array (int32_t index, strings &value) |
void | set_obj (int32_t index, DSSObj &value) |
template<typename T > | |
T | get_obj (int32_t index) |
template<typename T = VectorXd> | |
T | get_array (int32_t index) |
template<typename T = VectorXd> | |
void | set_array (int32_t index, T value) |
Static Protected Member Functions inherited from dss::obj::DSSObj | |
template<typename T = VectorXd> | |
static void | set_array (void *ptr, int32_t index, T value) |
Protected Attributes inherited from dss::obj::DSSObj | |
friend | DSSBatch |
|
strong |
CapControl: Type (DSS enumeration for CapControl)
Enumerator | |
---|---|
Current | Current. |
Voltage | Voltage. |
kvar | kvar |
Time | Time. |
PowerFactor | PowerFactor. |
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 23
|
inline |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
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 |
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 |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
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 |
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 |
{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