DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
|
Public Types | |
typedef Reactor::Properties | Properties |
typedef Reactor | BatchElementClass |
Public Member Functions | |
ReactorBatch (APIUtil *util) | |
Create a batch of all Reactor elements. | |
ReactorBatch (APIUtil *util, int32_t prop_idx, int32_t prop_value) | |
Create a batch of all Reactor elements that match an integer property value. | |
ReactorBatch (APIUtil *util, const char *regexp) | |
Create a batch of all Reactor elements that match a regular expression. | |
ReactorBatch & | begin_edit () |
ReactorBatch & | end_edit (int32_t num_edits=1) |
strings | bus1 () |
Name of first bus. More... | |
ReactorBatch & | bus1 (const string &value) |
ReactorBatch & | bus1 (strings &value) |
strings | bus2 () |
Name of 2nd bus. More... | |
ReactorBatch & | bus2 (const string &value) |
ReactorBatch & | bus2 (strings &value) |
BatchInt32ArrayProxy | phases () |
Number of phases. More... | |
ReactorBatch & | phases (int32_t value) |
template<typename T > | |
ReactorBatch & | phases (T &value) |
template<typename T > | |
ReactorBatch & | phases (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | kvar () |
Total kvar, all phases. More... | |
ReactorBatch & | kvar (double value) |
template<typename T > | |
ReactorBatch & | kvar (T &value) |
template<typename T > | |
ReactorBatch & | kvar (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | kv () |
For 2, 3-phase, kV phase-phase. More... | |
ReactorBatch & | kv (double value) |
template<typename T > | |
ReactorBatch & | kv (T &value) |
template<typename T > | |
ReactorBatch & | kv (typename T::iterator it_begin, typename T::iterator it_end) |
BatchInt32ArrayProxy | conn () |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN. More... | |
ReactorBatch & | conn (string &value) |
ReactorBatch & | conn (int32_t value) |
ReactorBatch & | conn (Connection value) |
ReactorBatch & | conn (strings &value) |
ReactorBatch & | conn (std::vector< int32_t > &value) |
ReactorBatch & | conn (std::vector< Connection > &value) |
strings | conn_str () |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN. More... | |
ReactorBatch & | conn_str (string &value) |
ReactorBatch & | conn_str (strings &value) |
std::vector< VectorXd > | Rmatrix () |
Resistance matrix, lower triangle, ohms at base frequency. More... | |
ReactorBatch & | Rmatrix (VectorXd &value) |
std::vector< VectorXd > | Xmatrix () |
Reactance matrix, lower triangle, ohms at base frequency. More... | |
ReactorBatch & | Xmatrix (VectorXd &value) |
bools | Parallel () |
{Yes | No} Default=No. More... | |
ReactorBatch & | Parallel (bool value) |
ReactorBatch & | Parallel (bools &value) |
BatchFloat64ArrayProxy | R () |
Resistance (in series with reactance), each phase, ohms. More... | |
ReactorBatch & | R (double value) |
template<typename T > | |
ReactorBatch & | R (T &value) |
template<typename T > | |
ReactorBatch & | R (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | X () |
Reactance, each phase, ohms at base frequency. More... | |
ReactorBatch & | X (double value) |
template<typename T > | |
ReactorBatch & | X (T &value) |
template<typename T > | |
ReactorBatch & | X (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | Rp () |
Resistance in parallel with R and X (the entire branch). More... | |
ReactorBatch & | Rp (double value) |
template<typename T > | |
ReactorBatch & | Rp (T &value) |
template<typename T > | |
ReactorBatch & | Rp (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< complex > | Z1 () |
Positive-sequence impedance, ohms, as a 2-element array representing a complex number. More... | |
ReactorBatch & | Z1 (complex value) |
ReactorBatch & | Z1 (std::vector< complex > &values) |
std::vector< complex > | Z2 () |
Negative-sequence impedance, ohms, as a 2-element array representing a complex number. More... | |
ReactorBatch & | Z2 (complex value) |
ReactorBatch & | Z2 (std::vector< complex > &values) |
std::vector< complex > | Z0 () |
Zer0-sequence impedance, ohms, as a 2-element array representing a complex number. More... | |
ReactorBatch & | Z0 (complex value) |
ReactorBatch & | Z0 (std::vector< complex > &values) |
std::vector< complex > | Z () |
Alternative way of defining R and X properties. More... | |
ReactorBatch & | Z (complex value) |
ReactorBatch & | Z (std::vector< complex > &values) |
strings | RCurve () |
Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs. More... | |
ReactorBatch & | RCurve (dss::obj::XYcurve &value) |
ReactorBatch & | RCurve (const string &value) |
std::vector< dss::obj::XYcurve > | RCurve_obj () |
Name of XYCurve object, previously defined, describing per-unit variation of phase resistance, R, vs. More... | |
ReactorBatch & | RCurve_obj (dss::obj::XYcurve &value) |
strings | LCurve () |
Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs. More... | |
ReactorBatch & | LCurve (dss::obj::XYcurve &value) |
ReactorBatch & | LCurve (const string &value) |
std::vector< dss::obj::XYcurve > | LCurve_obj () |
Name of XYCurve object, previously defined, describing per-unit variation of phase inductance, L=X/w, vs. More... | |
ReactorBatch & | LCurve_obj (dss::obj::XYcurve &value) |
BatchFloat64ArrayProxy | LmH () |
Inductance, mH. More... | |
ReactorBatch & | LmH (double value) |
template<typename T > | |
ReactorBatch & | LmH (T &value) |
template<typename T > | |
ReactorBatch & | LmH (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | normamps () |
Normal rated current. More... | |
ReactorBatch & | normamps (double value) |
template<typename T > | |
ReactorBatch & | normamps (T &value) |
template<typename T > | |
ReactorBatch & | normamps (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | emergamps () |
Maximum or emerg current. More... | |
ReactorBatch & | emergamps (double value) |
template<typename T > | |
ReactorBatch & | emergamps (T &value) |
template<typename T > | |
ReactorBatch & | emergamps (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | faultrate () |
Failure rate per year. More... | |
ReactorBatch & | faultrate (double value) |
template<typename T > | |
ReactorBatch & | faultrate (T &value) |
template<typename T > | |
ReactorBatch & | faultrate (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | pctperm () |
Percent of failures that become permanent. More... | |
ReactorBatch & | pctperm (double value) |
template<typename T > | |
ReactorBatch & | pctperm (T &value) |
template<typename T > | |
ReactorBatch & | pctperm (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | repair () |
Hours to repair. More... | |
ReactorBatch & | repair (double value) |
template<typename T > | |
ReactorBatch & | repair (T &value) |
template<typename T > | |
ReactorBatch & | repair (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | basefreq () |
Base Frequency for ratings. More... | |
ReactorBatch & | basefreq (double value) |
template<typename T > | |
ReactorBatch & | basefreq (T &value) |
template<typename T > | |
ReactorBatch & | basefreq (typename T::iterator it_begin, typename T::iterator it_end) |
bools | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
ReactorBatch & | enabled (bool value) |
ReactorBatch & | enabled (bools &value) |
ReactorBatch & | like (const string &value) |
Make like another object, e.g. More... | |
ReactorBatch & | like (const char *value) |
Make like another object, e.g. More... | |
Public Member Functions inherited from dss::obj::DSSBatch | |
DSSBatch (APIUtil *util, int32_t cls_idx) | |
Create a batch of all elements in the DSS class. | |
DSSBatch (APIUtil *util, int32_t cls_idx, int32_t prop_idx, int32_t prop_value) | |
Create a batch of all elements that match an integer property value. | |
DSSBatch (APIUtil *util, int32_t cls_idx, const char *regexp) | |
Create a batch of all elements that match a regular expression. | |
DSSBatch (APIUtil *util) | |
Create an uninitialized batch instance. | |
strings | name () |
Additional Inherited Members | |
Public Attributes inherited from dss::obj::DSSBatch | |
APIUtil * | api_util |
void ** | pointer |
int32_t | count [2] |
Protected Member Functions inherited from dss::obj::DSSBatch | |
void | check_for_error () |
bools | get_batch_bool (int32_t index) |
std::vector< complex > | get_batch_complex (int32_t index) |
template<typename T = VectorXd> | |
std::vector< T > | get_batch_valarray (int32_t index) |
void | set_batch_complex_for_each (int32_t index, std::vector< complex > &values) |
template<typename T > | |
void | set_batch_val (int32_t index, const T &value) |
template<typename T = VectorXd> | |
T | get_batch_val (int32_t index) |
template<typename T > | |
void | set_batch_val_for_each (int32_t index, typename T::iterator v, typename T::iterator v_end) |
Static Protected Member Functions inherited from dss::obj::DSSBatch | |
template<typename T = VectorXd> | |
static T | get_batch_val (int32_t index, DSSBatch &batch) |
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 25
|
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 |
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 |
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