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 | RegControlPhaseSelection : int32_t { min = -3 , max = -2 } |
RegControl: Phase Selection (DSS enumeration for RegControl) More... | |
Public Member Functions | |
RegControl (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
RegControl (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
RegControl (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
RegControl & | begin_edit () |
Marks an object for edition. More... | |
RegControl & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
string | transformer () |
Name of Transformer or AutoTrans element to which the RegControl is connected. More... | |
RegControl & | transformer (const string &value) |
RegControl & | transformer (dss::obj::DSSObj &value) |
dss::obj::DSSObj | transformer_obj () |
Name of Transformer or AutoTrans element to which the RegControl is connected. More... | |
RegControl & | transformer_obj (dss::obj::DSSObj &value) |
int32_t | winding () |
Number of the winding of the transformer element that the RegControl is monitoring. More... | |
RegControl & | winding (int32_t value) |
double | vreg () |
Voltage regulator setting, in VOLTS, for the winding being controlled. More... | |
RegControl & | vreg (double value) |
double | band () |
Bandwidth in VOLTS for the controlled bus (see help for ptratio property). More... | |
RegControl & | band (double value) |
double | ptratio () |
Ratio of the PT that converts the controlled winding voltage to the regulator control voltage. More... | |
RegControl & | ptratio (double value) |
double | CTprim () |
Rating, in Amperes, of the primary CT rating for which the line amps convert to control rated amps.The typical default secondary ampere rating is 0.2 Amps (check with manufacturer specs). More... | |
RegControl & | CTprim (double value) |
double | R () |
R setting on the line drop compensator in the regulator, expressed in VOLTS. More... | |
RegControl & | R (double value) |
double | X () |
X setting on the line drop compensator in the regulator, expressed in VOLTS. More... | |
RegControl & | X (double value) |
string | bus () |
Name of a bus (busname.nodename) in the system to use as the controlled bus instead of the bus to which the transformer winding is connected or the R and X line drop compensator settings. More... | |
RegControl & | bus (const string &value) |
RegControl & | bus (const char *value) |
double | delay () |
Time delay, in seconds, from when the voltage goes out of band to when the tap changing begins. More... | |
RegControl & | delay (double value) |
bool | reversible () |
{Yes |No*} Indicates whether or not the regulator can be switched to regulate in the reverse direction. More... | |
RegControl & | reversible (bool value) |
double | revvreg () |
Voltage setting in volts for operation in the reverse direction. More... | |
RegControl & | revvreg (double value) |
double | revband () |
Bandwidth for operating in the reverse direction. More... | |
RegControl & | revband (double value) |
double | revR () |
R line drop compensator setting for reverse direction. More... | |
RegControl & | revR (double value) |
double | revX () |
X line drop compensator setting for reverse direction. More... | |
RegControl & | revX (double value) |
double | tapdelay () |
Delay in sec between tap changes. More... | |
RegControl & | tapdelay (double value) |
bool | debugtrace () |
{Yes | No* } Default is no. More... | |
RegControl & | debugtrace (bool value) |
int32_t | maxtapchange () |
Maximum allowable tap change per control iteration in STATIC control mode. More... | |
RegControl & | maxtapchange (int32_t value) |
bool | inversetime () |
{Yes | No* } Default is no. More... | |
RegControl & | inversetime (bool value) |
int32_t | tapwinding () |
Winding containing the actual taps, if different than the WINDING property. More... | |
RegControl & | tapwinding (int32_t value) |
double | vlimit () |
Voltage Limit for bus to which regulated winding is connected (e.g. More... | |
RegControl & | vlimit (double value) |
int32_t | PTphase () |
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. More... | |
RegControl & | PTphase (int32_t value) |
RegControl & | PTphase (RegControlPhaseSelection value) |
RegControl & | PTphase (const string &value) |
RegControl & | PTphase (const char *value) |
string | PTphase_str () |
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. More... | |
RegControl & | PTphase_str (const string &value) |
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases. More... | |
double | revThreshold () |
kW reverse power threshold for reversing the direction of the regulator. More... | |
RegControl & | revThreshold (double value) |
double | revDelay () |
Time Delay in seconds (s) for executing the reversing action once the threshold for reversing has been exceeded. More... | |
RegControl & | revDelay (double value) |
bool | revNeutral () |
{Yes | No*} Default is no. More... | |
RegControl & | revNeutral (bool value) |
bool | EventLog () |
{Yes/True* | No/False} Default is YES for regulator control. More... | |
RegControl & | EventLog (bool value) |
double | RemotePTRatio () |
When regulating a bus (the Bus= property is set), the PT ratio required to convert actual voltage at the remote bus to control voltage. More... | |
RegControl & | RemotePTRatio (double value) |
int32_t | TapNum () |
An integer number indicating the tap position that the controlled transformer winding tap position is currently at, or is being set to. More... | |
RegControl & | TapNum (int32_t value) |
RegControl & | Reset (bool value) |
{Yes | No} If Yes, forces Reset of this RegControl. More... | |
double | LDC_Z () |
Z value for Beckwith LDC_Z control option. More... | |
RegControl & | LDC_Z (double value) |
double | rev_Z () |
Reverse Z value for Beckwith LDC_Z control option. More... | |
RegControl & | rev_Z (double value) |
bool | Cogen () |
{Yes|No*} Default is No. More... | |
RegControl & | Cogen (bool value) |
double | basefreq () |
Base Frequency for ratings. More... | |
RegControl & | basefreq (double value) |
bool | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
RegControl & | enabled (bool value) |
RegControl & | like (const string &value) |
Make like another object, e.g. More... | |
RegControl & | 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 [] = "RegControl" |
static const int32_t | dss_cls_idx = 21 |
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 |
RegControl: Phase Selection (DSS enumeration for RegControl)
Enumerator | |
---|---|
min | min |
max | max |
|
inline |
Bandwidth in VOLTS for the controlled bus (see help for ptratio property).
Default is 3.0
DSS property name: band, DSS property index: 4
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 33
|
inline |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
inline |
Name of a bus (busname.nodename) in the system to use as the controlled bus instead of the bus to which the transformer winding is connected or the R and X line drop compensator settings.
Do not specify this value if you wish to use the line drop compensator settings. Default is null string. Assumes the base voltage for this bus is the same as the transformer winding base specified above. Note: This bus (1-phase) WILL BE CREATED by the regulator control upon SOLVE if not defined by some other device. You can specify the node of the bus you wish to sample (defaults to 1). If specified, the RegControl is redefined as a 1-phase device since only one voltage is used.
DSS property name: bus, DSS property index: 9
|
inline |
{Yes|No*} Default is No.
The Cogen feature is activated. Continues looking forward if power reverses, but switches to reverse-mode LDC, vreg and band values.
DSS property name: Cogen, DSS property index: 32
|
inline |
Rating, in Amperes, of the primary CT rating for which the line amps convert to control rated amps.The typical default secondary ampere rating is 0.2 Amps (check with manufacturer specs).
Current at which the LDC voltages match the R and X settings.
DSS property name: CTprim, DSS property index: 6
|
inline |
{Yes | No* } Default is no.
Turn this on to capture the progress of the regulator model for each control iteration. Creates a separate file for each RegControl named "REG_name.CSV".
DSS property name: debugtrace, DSS property index: 17
|
inline |
Time delay, in seconds, from when the voltage goes out of band to when the tap changing begins.
This is used to determine which regulator control will act first. Default is 15. You may specify any floating point number to achieve a model of whatever condition is necessary.
DSS property name: delay, DSS property index: 10
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 34
|
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 regulator control.
Log control actions to Eventlog.
DSS property name: EventLog, DSS property index: 26
|
inline |
{Yes | No* } Default is no.
The time delay is adjusted inversely proportional to the amount the voltage is outside the band down to 10%.
DSS property name: inversetime, DSS property index: 19
|
inline |
Z value for Beckwith LDC_Z control option.
Volts adjustment at rated control current.
DSS property name: LDC_Z, DSS property index: 30
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 35
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 35
|
inline |
Maximum allowable tap change per control iteration in STATIC control mode.
Default is 16.
Set this to 1 to better approximate actual control action.
Set this to 0 to fix the tap in the current position.
DSS property name: maxtapchange, DSS property index: 18
|
inline |
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases.
Default=1. Must be less than or equal to the number of phases. Ignored for regulated bus.
DSS property name: PTphase, DSS property index: 22
|
inline |
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases.
Default=1. Must be less than or equal to the number of phases. Ignored for regulated bus.
DSS property name: PTphase, DSS property index: 22
|
inline |
For multi-phase transformers, the number of the phase being monitored or one of { MAX | MIN} for all phases.
Default=1. Must be less than or equal to the number of phases. Ignored for regulated bus.
DSS property name: PTphase, DSS property index: 22
|
inline |
Ratio of the PT that converts the controlled winding voltage to the regulator control voltage.
Default is 60. If the winding is Wye, the line-to-neutral voltage is used. Else, the line-to-line voltage is used. SIDE EFFECT: Also sets RemotePTRatio property.
DSS property name: ptratio, DSS property index: 5
|
inline |
R setting on the line drop compensator in the regulator, expressed in VOLTS.
DSS property name: R, DSS property index: 7
|
inline |
When regulating a bus (the Bus= property is set), the PT ratio required to convert actual voltage at the remote bus to control voltage.
Is initialized to PTratio property. Set this property after setting PTratio.
DSS property name: RemotePTRatio, DSS property index: 27
|
inline |
{Yes | No} If Yes, forces Reset of this RegControl.
DSS property name: Reset, DSS property index: 29
|
inline |
Reverse Z value for Beckwith LDC_Z control option.
DSS property name: rev_Z, DSS property index: 31
|
inline |
Bandwidth for operating in the reverse direction.
DSS property name: revband, DSS property index: 13
|
inline |
Time Delay in seconds (s) for executing the reversing action once the threshold for reversing has been exceeded.
Default is 60 s.
DSS property name: revDelay, DSS property index: 24
|
inline |
{Yes |No*} Indicates whether or not the regulator can be switched to regulate in the reverse direction.
Default is No.Typically applies only to line regulators and not to LTC on a substation transformer.
DSS property name: reversible, DSS property index: 11
|
inline |
{Yes | No*} Default is no.
Set this to Yes if you want the regulator to go to neutral in the reverse direction or in cogen operation.
DSS property name: revNeutral, DSS property index: 25
|
inline |
R line drop compensator setting for reverse direction.
DSS property name: revR, DSS property index: 14
|
inline |
kW reverse power threshold for reversing the direction of the regulator.
Default is 100.0 kw.
DSS property name: revThreshold, DSS property index: 23
|
inline |
Voltage setting in volts for operation in the reverse direction.
DSS property name: revvreg, DSS property index: 12
|
inline |
X line drop compensator setting for reverse direction.
DSS property name: revX, DSS property index: 15
|
inline |
Delay in sec between tap changes.
Default is 2. This is how long it takes between changes after the first change.
DSS property name: tapdelay, DSS property index: 16
|
inline |
An integer number indicating the tap position that the controlled transformer winding tap position is currently at, or is being set to.
If being set, and the value is outside the range of the transformer min or max tap, then set to the min or max tap position as appropriate. Default is 0
DSS property name: TapNum, DSS property index: 28
|
inline |
Winding containing the actual taps, if different than the WINDING property.
Defaults to the same winding as specified by the WINDING property.
DSS property name: tapwinding, DSS property index: 20
|
inline |
Name of Transformer or AutoTrans element to which the RegControl is connected.
Do not specify the full object name; "Transformer" or "AutoTrans" is assumed for the object class. Example:
Transformer=Xfmr1
DSS property name: transformer, DSS property index: 1
|
inline |
Name of Transformer or AutoTrans element to which the RegControl is connected.
Do not specify the full object name; "Transformer" or "AutoTrans" is assumed for the object class. Example:
Transformer=Xfmr1
DSS property name: transformer, DSS property index: 1
|
inline |
Voltage Limit for bus to which regulated winding is connected (e.g.
first customer). Default is 0.0. Set to a value greater then zero to activate this function.
DSS property name: vlimit, DSS property index: 21
|
inline |
Voltage regulator setting, in VOLTS, for the winding being controlled.
Multiplying this value times the ptratio should yield the voltage across the WINDING of the controlled transformer. Default is 120.0
DSS property name: vreg, DSS property index: 3
|
inline |
Number of the winding of the transformer element that the RegControl is monitoring.
1 or 2, typically. Side Effect: Sets TAPWINDING property to the same winding.
DSS property name: winding, DSS property index: 2
|
inline |
X setting on the line drop compensator in the regulator, expressed in VOLTS.
DSS property name: X, DSS property index: 8