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 | |
Reactor (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
Reactor (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
Reactor (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
Reactor & | begin_edit () |
Marks an object for edition. More... | |
Reactor & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
string | bus1 () |
Name of first bus. More... | |
Reactor & | bus1 (const string &value) |
Reactor & | bus1 (const char *value) |
string | bus2 () |
Name of 2nd bus. More... | |
Reactor & | bus2 (const string &value) |
Reactor & | bus2 (const char *value) |
int32_t | phases () |
Number of phases. More... | |
Reactor & | phases (int32_t value) |
double | kvar () |
Total kvar, all phases. More... | |
Reactor & | kvar (double value) |
double | kv () |
For 2, 3-phase, kV phase-phase. More... | |
Reactor & | kv (double value) |
Connection | conn () |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN. More... | |
Reactor & | conn (int32_t value) |
Reactor & | conn (Connection value) |
Reactor & | conn (const string &value) |
Reactor & | conn (const char *value) |
string | conn_str () |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN. More... | |
Reactor & | conn_str (const string &value) |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN. More... | |
VectorXd | Rmatrix () |
Resistance matrix, lower triangle, ohms at base frequency. More... | |
Reactor & | Rmatrix (VectorXd &value) |
VectorXd | Xmatrix () |
Reactance matrix, lower triangle, ohms at base frequency. More... | |
Reactor & | Xmatrix (VectorXd &value) |
bool | Parallel () |
{Yes | No} Default=No. More... | |
Reactor & | Parallel (bool value) |
double | R () |
Resistance (in series with reactance), each phase, ohms. More... | |
Reactor & | R (double value) |
double | X () |
Reactance, each phase, ohms at base frequency. More... | |
Reactor & | X (double value) |
double | Rp () |
Resistance in parallel with R and X (the entire branch). More... | |
Reactor & | Rp (double value) |
complex | Z1 () |
Positive-sequence impedance, ohms, as a 2-element array representing a complex number. More... | |
Reactor & | Z1 (complex value) |
complex | Z2 () |
Negative-sequence impedance, ohms, as a 2-element array representing a complex number. More... | |
Reactor & | Z2 (complex value) |
complex | Z0 () |
Zer0-sequence impedance, ohms, as a 2-element array representing a complex number. More... | |
Reactor & | Z0 (complex value) |
complex | Z () |
Alternative way of defining R and X properties. More... | |
Reactor & | Z (complex value) |
string | RCurve () |
Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs. More... | |
Reactor & | RCurve (const string &value) |
Reactor & | RCurve (dss::obj::XYcurve &value) |
dss::obj::XYcurve | RCurve_obj () |
Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs. More... | |
Reactor & | RCurve_obj (dss::obj::XYcurve &value) |
string | LCurve () |
Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs. More... | |
Reactor & | LCurve (const string &value) |
Reactor & | LCurve (dss::obj::XYcurve &value) |
dss::obj::XYcurve | LCurve_obj () |
Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs. More... | |
Reactor & | LCurve_obj (dss::obj::XYcurve &value) |
double | LmH () |
Inductance, mH. More... | |
Reactor & | LmH (double value) |
double | normamps () |
Normal rated current. More... | |
Reactor & | normamps (double value) |
double | emergamps () |
Maximum or emerg current. More... | |
Reactor & | emergamps (double value) |
double | faultrate () |
Failure rate per year. More... | |
Reactor & | faultrate (double value) |
double | pctperm () |
Percent of failures that become permanent. More... | |
Reactor & | pctperm (double value) |
double | repair () |
Hours to repair. More... | |
Reactor & | repair (double value) |
double | basefreq () |
Base Frequency for ratings. More... | |
Reactor & | basefreq (double value) |
bool | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
Reactor & | enabled (bool value) |
Reactor & | like (const string &value) |
Make like another object, e.g. More... | |
Reactor & | 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 [] = "Reactor" |
static const int32_t | dss_cls_idx = 23 |
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: 25
|
inline |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
inline |
Name of first bus.
Examples: bus1=busname bus1=busname.1.2.3
Bus2 property will default to this bus, node 0, unless previously specified. Only Bus1 need be specified for a Yg shunt reactor.
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 is specifically defined.
Not necessary to specify for delta (LL) connection
DSS property name: bus2, DSS property index: 2
|
inline |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN.
If Delta, then only one terminal.
DSS property name: conn, DSS property index: 6
|
inline |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN.
If Delta, then only one terminal.
DSS property name: conn, DSS property index: 6
|
inline |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN.
If Delta, then only one terminal.
DSS property name: conn, DSS property index: 6
|
inline |
Maximum or emerg current.
DSS property name: emergamps, DSS property index: 21
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 26
|
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: 22
|
inline |
For 2, 3-phase, kV phase-phase.
Otherwise specify actual coil rating.
DSS property name: kv, DSS property index: 5
|
inline |
Total kvar, all phases.
Evenly divided among phases. Only determines X. Specify R separately
DSS property name: kvar, DSS property index: 4
|
inline |
Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs.
frequency. Applies to reactance specified by X, LmH, Z, or kvar property.L generally decreases somewhat with frequency above the base frequency, approaching a limit at a few kHz.
DSS property name: LCurve, DSS property index: 18
|
inline |
Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs.
frequency. Applies to reactance specified by X, LmH, Z, or kvar property.L generally decreases somewhat with frequency above the base frequency, approaching a limit at a few kHz.
DSS property name: LCurve, DSS property index: 18
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 27
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 27
|
inline |
Inductance, mH.
Alternate way to define the reactance, X, property.
DSS property name: LmH, DSS property index: 19
|
inline |
Normal rated current.
DSS property name: normamps, DSS property index: 20
|
inline |
{Yes | No} Default=No.
Indicates whether Rmatrix and Xmatrix are to be considered in parallel. Default is series. For other models, specify R and Rp.
DSS property name: Parallel, DSS property index: 9
|
inline |
Percent of failures that become permanent.
DSS property name: pctperm, DSS property index: 23
|
inline |
Number of phases.
DSS property name: phases, DSS property index: 3
|
inline |
Resistance (in series with reactance), each phase, ohms.
This property applies to REACTOR specified by either kvar or X. See also help on Z.
DSS property name: R, DSS property index: 10
|
inline |
Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs.
frequency. Applies to resistance specified by R or Z property. If actual values are not known, R often increases by approximately the square root of frequency.
DSS property name: RCurve, DSS property index: 17
|
inline |
Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs.
frequency. Applies to resistance specified by R or Z property. If actual values are not known, R often increases by approximately the square root of frequency.
DSS property name: RCurve, DSS property index: 17
|
inline |
Hours to repair.
DSS property name: repair, DSS property index: 24
|
inline |
Resistance matrix, lower triangle, ohms at base frequency.
Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X.
DSS property name: Rmatrix, DSS property index: 7
|
inline |
Resistance in parallel with R and X (the entire branch).
Assumed infinite if not specified.
DSS property name: Rp, DSS property index: 12
|
inline |
Reactance, each phase, ohms at base frequency.
See also help on Z and LmH properties.
DSS property name: X, DSS property index: 11
|
inline |
Reactance matrix, lower triangle, ohms at base frequency.
Order of the matrix is the number of phases. Mutually exclusive to specifying parameters by kvar or X.
DSS property name: Xmatrix, DSS property index: 8
|
inline |
Alternative way of defining R and X properties.
Enter a 2-element array representing R +jX in ohms. Example:
Z=[5 10] ! equivalent to R=5 X=10
DSS property name: Z, DSS property index: 16
|
inline |
Zer0-sequence impedance, ohms, as a 2-element array representing a complex number.
Example:
Z0=[3, 4] ! represents 3 + j4
Used to define the impedance matrix of the REACTOR if Z1 is also specified.
Note: Z0 defaults to Z1 if it is not specifically defined.
DSS property name: Z0, DSS property index: 15
|
inline |
Positive-sequence impedance, ohms, as a 2-element array representing a complex number.
Example:
Z1=[1, 2] ! represents 1 + j2
If defined, Z1, Z2, and Z0 are used to define the impedance matrix of the REACTOR. Z1 MUST BE DEFINED TO USE THIS OPTION FOR DEFINING THE MATRIX.
Side Effect: Sets Z2 and Z0 to same values unless they were previously defined.
DSS property name: Z1, DSS property index: 13
|
inline |
Negative-sequence impedance, ohms, as a 2-element array representing a complex number.
Example:
Z2=[1, 2] ! represents 1 + j2
Used to define the impedance matrix of the REACTOR if Z1 is also specified.
Note: Z2 defaults to Z1 if it is not specifically defined. If Z2 is not equal to Z1, the impedance matrix is asymmetrical.
DSS property name: Z2, DSS property index: 14