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::CapControl Class Reference
Inheritance diagram for dss::obj::CapControl:
[legend]
Collaboration diagram for dss::obj::CapControl:
[legend]

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.
 
CapControlbegin_edit ()
 Marks an object for edition. More...
 
CapControlend_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...
 
CapControlelement (const string &value)
 
CapControlelement (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...
 
CapControlelement_obj (dss::obj::DSSObj &value)
 
int32_t terminal ()
 Number of the terminal of the circuit element to which the CapControl is connected. More...
 
CapControlterminal (int32_t value)
 
string capacitor ()
 Name of Capacitor element which the CapControl controls. More...
 
CapControlcapacitor (const string &value)
 
CapControlcapacitor (dss::obj::Capacitor &value)
 
dss::obj::Capacitor capacitor_obj ()
 Name of Capacitor element which the CapControl controls. More...
 
CapControlcapacitor_obj (dss::obj::Capacitor &value)
 
CapControlType type ()
 {Current | voltage | kvar | PF | time } Control type. More...
 
CapControltype (int32_t value)
 
CapControltype (CapControlType value)
 
CapControltype (const string &value)
 
CapControltype (const char *value)
 
string type_str ()
 {Current | voltage | kvar | PF | time } Control type. More...
 
CapControltype_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...
 
CapControlPTratio (double value)
 
double CTratio ()
 Ratio of the CT from line amps to control ampere setting for current and kvar control types. More...
 
CapControlCTratio (double value)
 
double ONsetting ()
 Value at which the control arms to switch the capacitor ON (or ratchet up a step). More...
 
CapControlONsetting (double value)
 
double OFFsetting ()
 Value at which the control arms to switch the capacitor OFF. More...
 
CapControlOFFsetting (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...
 
CapControlDelay (double value)
 
bool VoltOverride ()
 {Yes | No} Default is No. More...
 
CapControlVoltOverride (bool value)
 
double Vmax ()
 Maximum voltage, in volts. More...
 
CapControlVmax (double value)
 
double Vmin ()
 Minimum voltage, in volts. More...
 
CapControlVmin (double value)
 
double DelayOFF ()
 Time delay, in seconds, for control to turn OFF when present state is ON. More...
 
CapControlDelayOFF (double value)
 
double DeadTime ()
 Dead time after capacitor is turned OFF before it can be turned back ON. More...
 
CapControlDeadTime (double value)
 
int32_t CTPhase ()
 Number of the phase being monitored for CURRENT control or one of {AVG | MAX | MIN} for all phases. More...
 
CapControlCTPhase (int32_t value)
 
CapControlCTPhase (MonitoredPhase value)
 
CapControlCTPhase (const string &value)
 
CapControlCTPhase (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...
 
CapControlCTPhase_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...
 
CapControlPTPhase (int32_t value)
 
CapControlPTPhase (MonitoredPhase value)
 
CapControlPTPhase (const string &value)
 
CapControlPTPhase (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...
 
CapControlPTPhase_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...
 
CapControlVBus (const string &value)
 
CapControlVBus (const char *value)
 
bool EventLog ()
 {Yes/True* | No/False} Default is YES for CapControl. More...
 
CapControlEventLog (bool value)
 
string UserModel ()
 Name of DLL containing user-written CapControl model, overriding the default model. More...
 
CapControlUserModel (const string &value)
 
CapControlUserModel (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...
 
CapControlUserData (const string &value)
 
CapControlUserData (const char *value)
 
double pctMinkvar ()
 For PF control option, min percent of total bank kvar at which control will close capacitor switch. More...
 
CapControlpctMinkvar (double value)
 
CapControlReset (bool value)
 {Yes | No} If Yes, forces Reset of this CapControl. More...
 
double basefreq ()
 Base Frequency for ratings. More...
 
CapControlbasefreq (double value)
 
bool enabled ()
 {Yes|No or True|False} Indicates whether this element is enabled. More...
 
CapControlenabled (bool value)
 
CapControllike (const string &value)
 Make like another object, e.g. More...
 
CapControllike (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
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

◆ CapControlType

enum class dss::obj::CapControl::CapControlType : int32_t
strong

CapControl: Type (DSS enumeration for CapControl)

Enumerator
Current 

Current.

Voltage 

Voltage.

kvar 

kvar

Time 

Time.

PowerFactor 

PowerFactor.

Member Function Documentation

◆ basefreq()

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

Base Frequency for ratings.

DSS property name: basefreq, DSS property index: 23

◆ begin_edit()

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

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ capacitor()

string dss::obj::CapControl::capacitor ( )
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

◆ capacitor_obj()

dss::obj::Capacitor dss::obj::CapControl::capacitor_obj ( )
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

◆ CTPhase()

int32_t dss::obj::CapControl::CTPhase ( )
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

◆ CTPhase_str() [1/2]

string dss::obj::CapControl::CTPhase_str ( )
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

◆ CTPhase_str() [2/2]

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

◆ CTratio()

double dss::obj::CapControl::CTratio ( )
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

◆ DeadTime()

double dss::obj::CapControl::DeadTime ( )
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

◆ Delay()

double dss::obj::CapControl::Delay ( )
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

◆ DelayOFF()

double dss::obj::CapControl::DelayOFF ( )
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

◆ element()

string dss::obj::CapControl::element ( )
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

◆ element_obj()

dss::obj::DSSObj dss::obj::CapControl::element_obj ( )
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

◆ enabled()

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

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

DSS property name: enabled, DSS property index: 24

◆ end_edit()

CapControl & dss::obj::CapControl::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::CapControl::EventLog ( )
inline

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

Log control actions to Eventlog.

DSS property name: EventLog, DSS property index: 18

◆ like() [1/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 25

◆ like() [2/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 25

◆ OFFsetting()

double dss::obj::CapControl::OFFsetting ( )
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

◆ ONsetting()

double dss::obj::CapControl::ONsetting ( )
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

◆ pctMinkvar()

double dss::obj::CapControl::pctMinkvar ( )
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

◆ PTPhase()

int32_t dss::obj::CapControl::PTPhase ( )
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

◆ PTPhase_str() [1/2]

string dss::obj::CapControl::PTPhase_str ( )
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

◆ PTPhase_str() [2/2]

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

◆ PTratio()

double dss::obj::CapControl::PTratio ( )
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

◆ Reset()

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

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

DSS property name: Reset, DSS property index: 22

◆ terminal()

int32_t dss::obj::CapControl::terminal ( )
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

◆ type()

CapControlType dss::obj::CapControl::type ( )
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

◆ type_str() [1/2]

string dss::obj::CapControl::type_str ( )
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

◆ type_str() [2/2]

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

◆ UserData()

string dss::obj::CapControl::UserData ( )
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

◆ UserModel()

string dss::obj::CapControl::UserModel ( )
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

◆ VBus()

string dss::obj::CapControl::VBus ( )
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

◆ Vmax()

double dss::obj::CapControl::Vmax ( )
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

◆ Vmin()

double dss::obj::CapControl::Vmin ( )
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

◆ VoltOverride()

bool dss::obj::CapControl::VoltOverride ( )
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


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