DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
dss::obj::RegControl Class Reference
Inheritance diagram for dss::obj::RegControl:
[legend]
Collaboration diagram for dss::obj::RegControl:
[legend]

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.
 
RegControlbegin_edit ()
 Marks an object for edition. More...
 
RegControlend_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...
 
RegControltransformer (const string &value)
 
RegControltransformer (dss::obj::DSSObj &value)
 
dss::obj::DSSObj transformer_obj ()
 Name of Transformer or AutoTrans element to which the RegControl is connected. More...
 
RegControltransformer_obj (dss::obj::DSSObj &value)
 
int32_t winding ()
 Number of the winding of the transformer element that the RegControl is monitoring. More...
 
RegControlwinding (int32_t value)
 
double vreg ()
 Voltage regulator setting, in VOLTS, for the winding being controlled. More...
 
RegControlvreg (double value)
 
double band ()
 Bandwidth in VOLTS for the controlled bus (see help for ptratio property). More...
 
RegControlband (double value)
 
double ptratio ()
 Ratio of the PT that converts the controlled winding voltage to the regulator control voltage. More...
 
RegControlptratio (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...
 
RegControlCTprim (double value)
 
double R ()
 R setting on the line drop compensator in the regulator, expressed in VOLTS. More...
 
RegControlR (double value)
 
double X ()
 X setting on the line drop compensator in the regulator, expressed in VOLTS. More...
 
RegControlX (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...
 
RegControlbus (const string &value)
 
RegControlbus (const char *value)
 
double delay ()
 Time delay, in seconds, from when the voltage goes out of band to when the tap changing begins. More...
 
RegControldelay (double value)
 
bool reversible ()
 {Yes |No*} Indicates whether or not the regulator can be switched to regulate in the reverse direction. More...
 
RegControlreversible (bool value)
 
double revvreg ()
 Voltage setting in volts for operation in the reverse direction. More...
 
RegControlrevvreg (double value)
 
double revband ()
 Bandwidth for operating in the reverse direction. More...
 
RegControlrevband (double value)
 
double revR ()
 R line drop compensator setting for reverse direction. More...
 
RegControlrevR (double value)
 
double revX ()
 X line drop compensator setting for reverse direction. More...
 
RegControlrevX (double value)
 
double tapdelay ()
 Delay in sec between tap changes. More...
 
RegControltapdelay (double value)
 
bool debugtrace ()
 {Yes | No* } Default is no. More...
 
RegControldebugtrace (bool value)
 
int32_t maxtapchange ()
 Maximum allowable tap change per control iteration in STATIC control mode. More...
 
RegControlmaxtapchange (int32_t value)
 
bool inversetime ()
 {Yes | No* } Default is no. More...
 
RegControlinversetime (bool value)
 
int32_t tapwinding ()
 Winding containing the actual taps, if different than the WINDING property. More...
 
RegControltapwinding (int32_t value)
 
double vlimit ()
 Voltage Limit for bus to which regulated winding is connected (e.g. More...
 
RegControlvlimit (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...
 
RegControlPTphase (int32_t value)
 
RegControlPTphase (RegControlPhaseSelection value)
 
RegControlPTphase (const string &value)
 
RegControlPTphase (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...
 
RegControlPTphase_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...
 
RegControlrevThreshold (double value)
 
double revDelay ()
 Time Delay in seconds (s) for executing the reversing action once the threshold for reversing has been exceeded. More...
 
RegControlrevDelay (double value)
 
bool revNeutral ()
 {Yes | No*} Default is no. More...
 
RegControlrevNeutral (bool value)
 
bool EventLog ()
 {Yes/True* | No/False} Default is YES for regulator control. More...
 
RegControlEventLog (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...
 
RegControlRemotePTRatio (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...
 
RegControlTapNum (int32_t value)
 
RegControlReset (bool value)
 {Yes | No} If Yes, forces Reset of this RegControl. More...
 
double LDC_Z ()
 Z value for Beckwith LDC_Z control option. More...
 
RegControlLDC_Z (double value)
 
double rev_Z ()
 Reverse Z value for Beckwith LDC_Z control option. More...
 
RegControlrev_Z (double value)
 
bool Cogen ()
 {Yes|No*} Default is No. More...
 
RegControlCogen (bool value)
 
double basefreq ()
 Base Frequency for ratings. More...
 
RegControlbasefreq (double value)
 
bool enabled ()
 {Yes|No or True|False} Indicates whether this element is enabled. More...
 
RegControlenabled (bool value)
 
RegControllike (const string &value)
 Make like another object, e.g. More...
 
RegControllike (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
APIUtilapi_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 >
get_obj (int32_t index)
 
template<typename T = VectorXd>
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
 

Member Enumeration Documentation

◆ RegControlPhaseSelection

RegControl: Phase Selection (DSS enumeration for RegControl)

Enumerator
min 

min

max 

max

Member Function Documentation

◆ band()

double dss::obj::RegControl::band ( )
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

◆ basefreq()

double dss::obj::RegControl::basefreq ( )
inline

Base Frequency for ratings.

DSS property name: basefreq, DSS property index: 33

◆ begin_edit()

RegControl & dss::obj::RegControl::begin_edit ( )
inline

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ bus()

string dss::obj::RegControl::bus ( )
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

◆ Cogen()

bool dss::obj::RegControl::Cogen ( )
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

◆ CTprim()

double dss::obj::RegControl::CTprim ( )
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

◆ debugtrace()

bool dss::obj::RegControl::debugtrace ( )
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

◆ delay()

double dss::obj::RegControl::delay ( )
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

◆ enabled()

bool dss::obj::RegControl::enabled ( )
inline

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

DSS property name: enabled, DSS property index: 34

◆ end_edit()

RegControl & dss::obj::RegControl::end_edit ( int32_t  num_edits = 1)
inline

Finalizes an object edition.

This will result more compelx side-effects like Yprim and other internal data recalculation, for example.

◆ EventLog()

bool dss::obj::RegControl::EventLog ( )
inline

{Yes/True* | No/False} Default is YES for regulator control.

Log control actions to Eventlog.

DSS property name: EventLog, DSS property index: 26

◆ inversetime()

bool dss::obj::RegControl::inversetime ( )
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

◆ LDC_Z()

double dss::obj::RegControl::LDC_Z ( )
inline

Z value for Beckwith LDC_Z control option.

Volts adjustment at rated control current.

DSS property name: LDC_Z, DSS property index: 30

◆ like() [1/2]

RegControl & dss::obj::RegControl::like ( const char *  value)
inline

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 35

◆ like() [2/2]

RegControl & dss::obj::RegControl::like ( const string &  value)
inline

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 35

◆ maxtapchange()

int32_t dss::obj::RegControl::maxtapchange ( )
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

◆ PTphase()

int32_t dss::obj::RegControl::PTphase ( )
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

◆ PTphase_str() [1/2]

string dss::obj::RegControl::PTphase_str ( )
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

◆ PTphase_str() [2/2]

RegControl & dss::obj::RegControl::PTphase_str ( const string &  value)
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

◆ ptratio()

double dss::obj::RegControl::ptratio ( )
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

◆ R()

double dss::obj::RegControl::R ( )
inline

R setting on the line drop compensator in the regulator, expressed in VOLTS.

DSS property name: R, DSS property index: 7

◆ RemotePTRatio()

double dss::obj::RegControl::RemotePTRatio ( )
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

◆ Reset()

RegControl & dss::obj::RegControl::Reset ( bool  value)
inline

{Yes | No} If Yes, forces Reset of this RegControl.

DSS property name: Reset, DSS property index: 29

◆ rev_Z()

double dss::obj::RegControl::rev_Z ( )
inline

Reverse Z value for Beckwith LDC_Z control option.

DSS property name: rev_Z, DSS property index: 31

◆ revband()

double dss::obj::RegControl::revband ( )
inline

Bandwidth for operating in the reverse direction.

DSS property name: revband, DSS property index: 13

◆ revDelay()

double dss::obj::RegControl::revDelay ( )
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

◆ reversible()

bool dss::obj::RegControl::reversible ( )
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

◆ revNeutral()

bool dss::obj::RegControl::revNeutral ( )
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

◆ revR()

double dss::obj::RegControl::revR ( )
inline

R line drop compensator setting for reverse direction.

DSS property name: revR, DSS property index: 14

◆ revThreshold()

double dss::obj::RegControl::revThreshold ( )
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

◆ revvreg()

double dss::obj::RegControl::revvreg ( )
inline

Voltage setting in volts for operation in the reverse direction.

DSS property name: revvreg, DSS property index: 12

◆ revX()

double dss::obj::RegControl::revX ( )
inline

X line drop compensator setting for reverse direction.

DSS property name: revX, DSS property index: 15

◆ tapdelay()

double dss::obj::RegControl::tapdelay ( )
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

◆ TapNum()

int32_t dss::obj::RegControl::TapNum ( )
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

◆ tapwinding()

int32_t dss::obj::RegControl::tapwinding ( )
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

◆ transformer()

string dss::obj::RegControl::transformer ( )
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

◆ transformer_obj()

dss::obj::DSSObj dss::obj::RegControl::transformer_obj ( )
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

◆ vlimit()

double dss::obj::RegControl::vlimit ( )
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

◆ vreg()

double dss::obj::RegControl::vreg ( )
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

◆ winding()

int32_t dss::obj::RegControl::winding ( )
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

◆ X()

double dss::obj::RegControl::X ( )
inline

X setting on the line drop compensator in the regulator, expressed in VOLTS.

DSS property name: X, DSS property index: 8


The documentation for this class was generated from the following file: