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 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. | |
Capacitor & | begin_edit () |
Marks an object for edition. More... | |
Capacitor & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
string | bus1 () |
Name of first bus of 2-terminal capacitor. More... | |
Capacitor & | bus1 (const string &value) |
Capacitor & | bus1 (const char *value) |
string | bus2 () |
Name of 2nd bus. More... | |
Capacitor & | bus2 (const string &value) |
Capacitor & | bus2 (const char *value) |
int32_t | phases () |
Number of phases. More... | |
Capacitor & | phases (int32_t value) |
VectorXd | kvar () |
Total kvar, if one step, or ARRAY of kvar ratings for each step. More... | |
Capacitor & | kvar (VectorXd &value) |
double | kv () |
For 2, 3-phase, kV phase-phase. More... | |
Capacitor & | kv (double value) |
Connection | conn () |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN More... | |
Capacitor & | conn (int32_t value) |
Capacitor & | conn (Connection value) |
Capacitor & | conn (const string &value) |
Capacitor & | conn (const char *value) |
string | conn_str () |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN More... | |
Capacitor & | conn_str (const string &value) |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN More... | |
VectorXd | cmatrix () |
Nodal cap. More... | |
Capacitor & | cmatrix (VectorXd &value) |
VectorXd | cuf () |
ARRAY of Capacitance, each phase, for each step, microfarads. More... | |
Capacitor & | cuf (VectorXd &value) |
VectorXd | R () |
ARRAY of series resistance in each phase (line), ohms. More... | |
Capacitor & | R (VectorXd &value) |
VectorXd | XL () |
ARRAY of series inductive reactance(s) in each phase (line) for filter, ohms at base frequency. More... | |
Capacitor & | XL (VectorXd &value) |
VectorXd | Harm () |
ARRAY of harmonics to which each step is tuned. More... | |
Capacitor & | Harm (VectorXd &value) |
int32_t | Numsteps () |
Number of steps in this capacitor bank. More... | |
Capacitor & | Numsteps (int32_t value) |
VectorXi | states () |
ARRAY of integers {1|0} states representing the state of each step (on|off). More... | |
Capacitor & | states (VectorXi &value) |
double | normamps () |
Normal rated current. More... | |
Capacitor & | normamps (double value) |
double | emergamps () |
Maximum or emerg current. More... | |
Capacitor & | emergamps (double value) |
double | faultrate () |
Failure rate per year. More... | |
Capacitor & | faultrate (double value) |
double | pctperm () |
Percent of failures that become permanent. More... | |
Capacitor & | pctperm (double value) |
double | repair () |
Hours to repair. More... | |
Capacitor & | repair (double value) |
double | basefreq () |
Base Frequency for ratings. More... | |
Capacitor & | basefreq (double value) |
bool | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
Capacitor & | enabled (bool value) |
Capacitor & | like (const string &value) |
Make like another object, e.g. More... | |
Capacitor & | 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 [] = "Capacitor" |
static const int32_t | dss_cls_idx = 22 |
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 |
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 19
|
inline |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
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
|
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
|
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
|
inline |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN
DSS property name: conn, DSS property index: 6
|
inline |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN
DSS property name: conn, DSS property index: 6
|
inline |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN
DSS property name: conn, DSS property index: 6
|
inline |
ARRAY of Capacitance, each phase, for each step, microfarads.
See Rules for NumSteps.
DSS property name: cuf, DSS property index: 8
|
inline |
Maximum or emerg current.
DSS property name: emergamps, DSS property index: 15
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 20
|
inline |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
inline |
Failure rate per year.
DSS property name: faultrate, DSS property index: 16
|
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
|
inline |
For 2, 3-phase, kV phase-phase.
Otherwise specify actual can rating.
DSS property name: kv, DSS property index: 5
|
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
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 21
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 21
|
inline |
Normal rated current.
DSS property name: normamps, DSS property index: 14
|
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
|
inline |
Percent of failures that become permanent.
DSS property name: pctperm, DSS property index: 17
|
inline |
Number of phases.
DSS property name: phases, DSS property index: 3
|
inline |
ARRAY of series resistance in each phase (line), ohms.
Default is 0.0
DSS property name: R, DSS property index: 9
|
inline |
Hours to repair.
DSS property name: repair, DSS property index: 18
|
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
|
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