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

Classes

struct  Properties
 

Public Member Functions

 Capacitor (APIUtil *util=nullptr, void *ptr_=nullptr)
 Create wrapper directly by a given object handle/pointer.
 
 Capacitor (APIUtil *util, int32_t idx)
 Create a wrapper for an element given by the integer index "idx".
 
 Capacitor (APIUtil *util, char *name)
 Create a wrapper for an element given its name.
 
const char * name ()
 Returns the object's name.
 
Capacitorbegin_edit ()
 Marks an object for edition. More...
 
Capacitorend_edit (int32_t num_edits=1)
 Finalizes an object edition. More...
 
string bus1 ()
 Name of first bus of 2-terminal capacitor. More...
 
Capacitorbus1 (const string &value)
 
Capacitorbus1 (const char *value)
 
string bus2 ()
 Name of 2nd bus. More...
 
Capacitorbus2 (const string &value)
 
Capacitorbus2 (const char *value)
 
int32_t phases ()
 Number of phases. More...
 
Capacitorphases (int32_t value)
 
VectorXd kvar ()
 Total kvar, if one step, or ARRAY of kvar ratings for each step. More...
 
Capacitorkvar (VectorXd &value)
 
double kv ()
 For 2, 3-phase, kV phase-phase. More...
 
Capacitorkv (double value)
 
Connection conn ()
 ={wye | delta |LN |LL} Default is wye, which is equivalent to LN More...
 
Capacitorconn (int32_t value)
 
Capacitorconn (Connection value)
 
Capacitorconn (const string &value)
 
Capacitorconn (const char *value)
 
string conn_str ()
 ={wye | delta |LN |LL} Default is wye, which is equivalent to LN More...
 
Capacitorconn_str (const string &value)
 ={wye | delta |LN |LL} Default is wye, which is equivalent to LN More...
 
VectorXd cmatrix ()
 Nodal cap. More...
 
Capacitorcmatrix (VectorXd &value)
 
VectorXd cuf ()
 ARRAY of Capacitance, each phase, for each step, microfarads. More...
 
Capacitorcuf (VectorXd &value)
 
VectorXd R ()
 ARRAY of series resistance in each phase (line), ohms. More...
 
CapacitorR (VectorXd &value)
 
VectorXd XL ()
 ARRAY of series inductive reactance(s) in each phase (line) for filter, ohms at base frequency. More...
 
CapacitorXL (VectorXd &value)
 
VectorXd Harm ()
 ARRAY of harmonics to which each step is tuned. More...
 
CapacitorHarm (VectorXd &value)
 
int32_t Numsteps ()
 Number of steps in this capacitor bank. More...
 
CapacitorNumsteps (int32_t value)
 
VectorXi states ()
 ARRAY of integers {1|0} states representing the state of each step (on|off). More...
 
Capacitorstates (VectorXi &value)
 
double normamps ()
 Normal rated current. More...
 
Capacitornormamps (double value)
 
double emergamps ()
 Maximum or emerg current. More...
 
Capacitoremergamps (double value)
 
double faultrate ()
 Failure rate per year. More...
 
Capacitorfaultrate (double value)
 
double pctperm ()
 Percent of failures that become permanent. More...
 
Capacitorpctperm (double value)
 
double repair ()
 Hours to repair. More...
 
Capacitorrepair (double value)
 
double basefreq ()
 Base Frequency for ratings. More...
 
Capacitorbasefreq (double value)
 
bool enabled ()
 {Yes|No or True|False} Indicates whether this element is enabled. More...
 
Capacitorenabled (bool value)
 
Capacitorlike (const string &value)
 Make like another object, e.g. More...
 
Capacitorlike (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 [] = "Capacitor"
 
static const int32_t dss_cls_idx = 22
 

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 Function Documentation

◆ basefreq()

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

Base Frequency for ratings.

DSS property name: basefreq, DSS property index: 19

◆ begin_edit()

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

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ bus1()

string dss::obj::Capacitor::bus1 ( )
inline

Name of first bus of 2-terminal capacitor.

Examples: bus1=busname bus1=busname.1.2.3

If only one bus specified, Bus2 will default to this bus, Node 0, and the capacitor will be a Yg shunt bank.

DSS property name: bus1, DSS property index: 1

◆ bus2()

string dss::obj::Capacitor::bus2 ( )
inline

Name of 2nd bus.

Defaults to all phases connected to first bus, node 0, (Shunt Wye Connection) except when Bus2 explicitly specified.

Not necessary to specify for delta (LL) connection.

DSS property name: bus2, DSS property index: 2

◆ cmatrix()

VectorXd dss::obj::Capacitor::cmatrix ( )
inline

Nodal cap.

matrix, lower triangle, microfarads, of the following form:

cmatrix="c11 | -c21 c22 | -c31 -c32 c33"

All steps are assumed the same if this property is used.

DSS property name: cmatrix, DSS property index: 7

◆ conn()

Connection dss::obj::Capacitor::conn ( )
inline

={wye | delta |LN |LL} Default is wye, which is equivalent to LN

DSS property name: conn, DSS property index: 6

◆ conn_str() [1/2]

string dss::obj::Capacitor::conn_str ( )
inline

={wye | delta |LN |LL} Default is wye, which is equivalent to LN

DSS property name: conn, DSS property index: 6

◆ conn_str() [2/2]

Capacitor & dss::obj::Capacitor::conn_str ( const string &  value)
inline

={wye | delta |LN |LL} Default is wye, which is equivalent to LN

DSS property name: conn, DSS property index: 6

◆ cuf()

VectorXd dss::obj::Capacitor::cuf ( )
inline

ARRAY of Capacitance, each phase, for each step, microfarads.

See Rules for NumSteps.

DSS property name: cuf, DSS property index: 8

◆ emergamps()

double dss::obj::Capacitor::emergamps ( )
inline

Maximum or emerg current.

DSS property name: emergamps, DSS property index: 15

◆ enabled()

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

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

DSS property name: enabled, DSS property index: 20

◆ end_edit()

Capacitor & dss::obj::Capacitor::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.

◆ faultrate()

double dss::obj::Capacitor::faultrate ( )
inline

Failure rate per year.

DSS property name: faultrate, DSS property index: 16

◆ Harm()

VectorXd dss::obj::Capacitor::Harm ( )
inline

ARRAY of harmonics to which each step is tuned.

Zero is interpreted as meaning zero reactance (no filter). Default is zero.

DSS property name: Harm, DSS property index: 11

◆ kv()

double dss::obj::Capacitor::kv ( )
inline

For 2, 3-phase, kV phase-phase.

Otherwise specify actual can rating.

DSS property name: kv, DSS property index: 5

◆ kvar()

VectorXd dss::obj::Capacitor::kvar ( )
inline

Total kvar, if one step, or ARRAY of kvar ratings for each step.

Evenly divided among phases. See rules for NUMSTEPS.

DSS property name: kvar, DSS property index: 4

◆ like() [1/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 21

◆ like() [2/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 21

◆ normamps()

double dss::obj::Capacitor::normamps ( )
inline

Normal rated current.

DSS property name: normamps, DSS property index: 14

◆ Numsteps()

int32_t dss::obj::Capacitor::Numsteps ( )
inline

Number of steps in this capacitor bank.

Default = 1. Forces reallocation of the capacitance, reactor, and states array. Rules: If this property was previously =1, the value in the kvar property is divided equally among the steps. The kvar property does not need to be reset if that is accurate. If the Cuf or Cmatrix property was used previously, all steps are set to the value of the first step. The states property is set to all steps on. All filter steps are set to the same harmonic. If this property was previously >1, the arrays are reallocated, but no values are altered. You must SUBSEQUENTLY assign all array properties.

DSS property name: Numsteps, DSS property index: 12

◆ pctperm()

double dss::obj::Capacitor::pctperm ( )
inline

Percent of failures that become permanent.

DSS property name: pctperm, DSS property index: 17

◆ phases()

int32_t dss::obj::Capacitor::phases ( )
inline

Number of phases.

DSS property name: phases, DSS property index: 3

◆ R()

VectorXd dss::obj::Capacitor::R ( )
inline

ARRAY of series resistance in each phase (line), ohms.

Default is 0.0

DSS property name: R, DSS property index: 9

◆ repair()

double dss::obj::Capacitor::repair ( )
inline

Hours to repair.

DSS property name: repair, DSS property index: 18

◆ states()

VectorXi dss::obj::Capacitor::states ( )
inline

ARRAY of integers {1|0} states representing the state of each step (on|off).

Defaults to 1 when reallocated (on). Capcontrol will modify this array as it turns steps on or off.

DSS property name: states, DSS property index: 13

◆ XL()

VectorXd dss::obj::Capacitor::XL ( )
inline

ARRAY of series inductive reactance(s) in each phase (line) for filter, ohms at base frequency.

Use this OR "h" property to define filter. Default is 0.0.

DSS property name: XL, DSS property index: 10


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