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 LineCode::Properties | Properties |
typedef LineCode | BatchElementClass |
Public Member Functions | |
LineCodeBatch (APIUtil *util) | |
Create a batch of all LineCode elements. | |
LineCodeBatch (APIUtil *util, int32_t prop_idx, int32_t prop_value) | |
Create a batch of all LineCode elements that match an integer property value. | |
LineCodeBatch (APIUtil *util, const char *regexp) | |
Create a batch of all LineCode elements that match a regular expression. | |
LineCodeBatch & | begin_edit () |
LineCodeBatch & | end_edit (int32_t num_edits=1) |
BatchInt32ArrayProxy | nphases () |
Number of phases in the line this line code data represents. More... | |
LineCodeBatch & | nphases (int32_t value) |
template<typename T > | |
LineCodeBatch & | nphases (T &value) |
template<typename T > | |
LineCodeBatch & | nphases (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | r1 () |
Positive-sequence Resistance, ohms per unit length. More... | |
LineCodeBatch & | r1 (double value) |
template<typename T > | |
LineCodeBatch & | r1 (T &value) |
template<typename T > | |
LineCodeBatch & | r1 (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | x1 () |
Positive-sequence Reactance, ohms per unit length. More... | |
LineCodeBatch & | x1 (double value) |
template<typename T > | |
LineCodeBatch & | x1 (T &value) |
template<typename T > | |
LineCodeBatch & | x1 (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | r0 () |
Zero-sequence Resistance, ohms per unit length. More... | |
LineCodeBatch & | r0 (double value) |
template<typename T > | |
LineCodeBatch & | r0 (T &value) |
template<typename T > | |
LineCodeBatch & | r0 (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | x0 () |
Zero-sequence Reactance, ohms per unit length. More... | |
LineCodeBatch & | x0 (double value) |
template<typename T > | |
LineCodeBatch & | x0 (T &value) |
template<typename T > | |
LineCodeBatch & | x0 (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | C1 () |
Positive-sequence capacitance, nf per unit length. More... | |
LineCodeBatch & | C1 (double value) |
template<typename T > | |
LineCodeBatch & | C1 (T &value) |
template<typename T > | |
LineCodeBatch & | C1 (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | C0 () |
Zero-sequence capacitance, nf per unit length. More... | |
LineCodeBatch & | C0 (double value) |
template<typename T > | |
LineCodeBatch & | C0 (T &value) |
template<typename T > | |
LineCodeBatch & | C0 (typename T::iterator it_begin, typename T::iterator it_end) |
BatchInt32ArrayProxy | units () |
One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. More... | |
LineCodeBatch & | units (string &value) |
LineCodeBatch & | units (int32_t value) |
LineCodeBatch & | units (DimensionUnits value) |
LineCodeBatch & | units (strings &value) |
LineCodeBatch & | units (std::vector< int32_t > &value) |
LineCodeBatch & | units (std::vector< DimensionUnits > &value) |
strings | units_str () |
One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. More... | |
LineCodeBatch & | units_str (string &value) |
LineCodeBatch & | units_str (strings &value) |
std::vector< VectorXd > | rmatrix () |
Resistance matrix, lower triangle, ohms per unit length. More... | |
LineCodeBatch & | rmatrix (VectorXd &value) |
std::vector< VectorXd > | xmatrix () |
Reactance matrix, lower triangle, ohms per unit length. More... | |
LineCodeBatch & | xmatrix (VectorXd &value) |
std::vector< VectorXd > | cmatrix () |
Nodal Capacitance matrix, lower triangle, nf per unit length.Order of the matrix is the number of phases. More... | |
LineCodeBatch & | cmatrix (VectorXd &value) |
BatchFloat64ArrayProxy | baseFreq () |
Frequency at which impedances are specified. More... | |
LineCodeBatch & | baseFreq (double value) |
template<typename T > | |
LineCodeBatch & | baseFreq (T &value) |
template<typename T > | |
LineCodeBatch & | baseFreq (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | normamps () |
Normal ampere limit on line. More... | |
LineCodeBatch & | normamps (double value) |
template<typename T > | |
LineCodeBatch & | normamps (T &value) |
template<typename T > | |
LineCodeBatch & | normamps (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | emergamps () |
Emergency ampere limit on line (usually one-hour rating). More... | |
LineCodeBatch & | emergamps (double value) |
template<typename T > | |
LineCodeBatch & | emergamps (T &value) |
template<typename T > | |
LineCodeBatch & | emergamps (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | faultrate () |
Number of faults per unit length per year. More... | |
LineCodeBatch & | faultrate (double value) |
template<typename T > | |
LineCodeBatch & | faultrate (T &value) |
template<typename T > | |
LineCodeBatch & | faultrate (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | pctperm () |
Percentage of the faults that become permanent. More... | |
LineCodeBatch & | pctperm (double value) |
template<typename T > | |
LineCodeBatch & | pctperm (T &value) |
template<typename T > | |
LineCodeBatch & | pctperm (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | repair () |
Hours to repair. More... | |
LineCodeBatch & | repair (double value) |
template<typename T > | |
LineCodeBatch & | repair (T &value) |
template<typename T > | |
LineCodeBatch & | repair (typename T::iterator it_begin, typename T::iterator it_end) |
LineCodeBatch & | Kron (bool value) |
Kron = Y/N. More... | |
BatchFloat64ArrayProxy | Rg () |
Carson earth return resistance per unit length used to compute impedance values at base frequency. More... | |
LineCodeBatch & | Rg (double value) |
template<typename T > | |
LineCodeBatch & | Rg (T &value) |
template<typename T > | |
LineCodeBatch & | Rg (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | Xg () |
Carson earth return reactance per unit length used to compute impedance values at base frequency. More... | |
LineCodeBatch & | Xg (double value) |
template<typename T > | |
LineCodeBatch & | Xg (T &value) |
template<typename T > | |
LineCodeBatch & | Xg (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | rho () |
Default=100 meter ohms. More... | |
LineCodeBatch & | rho (double value) |
template<typename T > | |
LineCodeBatch & | rho (T &value) |
template<typename T > | |
LineCodeBatch & | rho (typename T::iterator it_begin, typename T::iterator it_end) |
BatchInt32ArrayProxy | neutral () |
Designates which conductor is the "neutral" conductor that will be eliminated by Kron reduction. More... | |
LineCodeBatch & | neutral (int32_t value) |
template<typename T > | |
LineCodeBatch & | neutral (T &value) |
template<typename T > | |
LineCodeBatch & | neutral (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | B1 () |
Alternate way to specify C1. More... | |
LineCodeBatch & | B1 (double value) |
template<typename T > | |
LineCodeBatch & | B1 (T &value) |
template<typename T > | |
LineCodeBatch & | B1 (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | B0 () |
Alternate way to specify C0. More... | |
LineCodeBatch & | B0 (double value) |
template<typename T > | |
LineCodeBatch & | B0 (T &value) |
template<typename T > | |
LineCodeBatch & | B0 (typename T::iterator it_begin, typename T::iterator it_end) |
BatchInt32ArrayProxy | Seasons () |
Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property. More... | |
LineCodeBatch & | Seasons (int32_t value) |
template<typename T > | |
LineCodeBatch & | Seasons (T &value) |
template<typename T > | |
LineCodeBatch & | Seasons (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< VectorXd > | Ratings () |
An array of ratings to be used when the seasonal ratings flag is True. More... | |
LineCodeBatch & | Ratings (VectorXd &value) |
BatchInt32ArrayProxy | linetype () |
Code designating the type of line. More... | |
LineCodeBatch & | linetype (string &value) |
LineCodeBatch & | linetype (int32_t value) |
LineCodeBatch & | linetype (LineType value) |
LineCodeBatch & | linetype (strings &value) |
LineCodeBatch & | linetype (std::vector< int32_t > &value) |
LineCodeBatch & | linetype (std::vector< LineType > &value) |
strings | linetype_str () |
Code designating the type of line. More... | |
LineCodeBatch & | linetype_str (string &value) |
LineCodeBatch & | linetype_str (strings &value) |
LineCodeBatch & | like (const string &value) |
Make like another object, e.g. More... | |
LineCodeBatch & | 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 |
Alternate way to specify C0.
MicroS per unit length
DSS property name: B0, DSS property index: 24
|
inline |
Alternate way to specify C1.
MicroS per unit length
DSS property name: B1, DSS property index: 23
|
inline |
Frequency at which impedances are specified.
DSS property name: baseFreq, DSS property index: 12
|
inline |
Zero-sequence capacitance, nf per unit length.
Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also B0.
DSS property name: C0, DSS property index: 7
|
inline |
Positive-sequence capacitance, nf per unit length.
Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Cmatrix and B1.
DSS property name: C1, DSS property index: 6
|
inline |
Nodal Capacitance matrix, lower triangle, nf per unit length.Order of the matrix is the number of phases.
May be used to specify the shunt capacitance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead.
DSS property name: cmatrix, DSS property index: 11
|
inline |
Emergency ampere limit on line (usually one-hour rating).
DSS property name: emergamps, DSS property index: 14
|
inline |
Number of faults per unit length per year.
DSS property name: faultrate, DSS property index: 15
|
inline |
Kron = Y/N.
Default=N. Perform Kron reduction on the impedance matrix after it is formed, reducing order by 1. Eliminates the conductor designated by the "Neutral=" property. Do this after the R, X, and C matrices are defined. Ignored for symmetrical components. May be issued more than once to eliminate more than one conductor by resetting the Neutral property after the previous invoking of this property. Generally, you do not want to do a Kron reduction on the matrix if you intend to solve at a frequency other than the base frequency and exploit the Rg and Xg values.
DSS property name: Kron, DSS property index: 18
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 28
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 28
|
inline |
Code designating the type of line.
One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW
OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH.
DSS property name: LineType, DSS property index: 27
|
inline |
Code designating the type of line.
One of: OH, UG, UG_TS, UG_CN, SWT_LDBRK, SWT_FUSE, SWT_SECT, SWT_REC, SWT_DISC, SWT_BRK, SWT_ELBOW
OpenDSS currently does not use this internally. For whatever purpose the user defines. Default is OH.
DSS property name: LineType, DSS property index: 27
|
inline |
Designates which conductor is the "neutral" conductor that will be eliminated by Kron reduction.
Default is the last conductor (nphases value). After Kron reduction is set to 0. Subsequent issuing of Kron=Yes will not do anything until this property is set to a legal value. Applies only to LineCodes defined by R, X, and C matrix.
DSS property name: neutral, DSS property index: 22
|
inline |
Normal ampere limit on line.
This is the so-called Planning Limit. It may also be the value above which load will have to be dropped in a contingency. Usually about 75% - 80% of the emergency (one-hour) rating.
DSS property name: normamps, DSS property index: 13
|
inline |
Number of phases in the line this line code data represents.
Setting this property reinitializes the line code. Impedance matrix is reset for default symmetrical component.
DSS property name: nphases, DSS property index: 1
|
inline |
Percentage of the faults that become permanent.
DSS property name: pctperm, DSS property index: 16
|
inline |
Zero-sequence Resistance, ohms per unit length.
Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition.
DSS property name: r0, DSS property index: 4
|
inline |
Positive-sequence Resistance, ohms per unit length.
Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Rmatrix.
DSS property name: r1, DSS property index: 2
|
inline |
An array of ratings to be used when the seasonal ratings flag is True.
It can be used to insert multiple ratings to change during a QSTS simulation to evaluate different ratings in lines.
DSS property name: Ratings, DSS property index: 26
|
inline |
Hours to repair.
DSS property name: repair, DSS property index: 17
|
inline |
Carson earth return resistance per unit length used to compute impedance values at base frequency.
For making better frequency adjustments. Default is 0.01805 = 60 Hz value in ohms per kft (matches default line impedances). This value is required for harmonic solutions if you wish to adjust the earth return impedances for frequency. If not, set both Rg and Xg = 0.
DSS property name: Rg, DSS property index: 19
|
inline |
Default=100 meter ohms.
Earth resitivity used to compute earth correction factor.
DSS property name: rho, DSS property index: 21
|
inline |
Resistance matrix, lower triangle, ohms per unit length.
Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead.
DSS property name: rmatrix, DSS property index: 9
|
inline |
Defines the number of ratings to be defined for the wire, to be used only when defining seasonal ratings using the "Ratings" property.
DSS property name: Seasons, DSS property index: 25
|
inline |
One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}.
Default is none; assumes units agree with length unitsgiven in Line object
DSS property name: units, DSS property index: 8
|
inline |
One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}.
Default is none; assumes units agree with length unitsgiven in Line object
DSS property name: units, DSS property index: 8
|
inline |
Zero-sequence Reactance, ohms per unit length.
Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition.
DSS property name: x0, DSS property index: 5
|
inline |
Positive-sequence Reactance, ohms per unit length.
Setting any of R1, R0, X1, X0, C1, C0 forces the program to use the symmetrical component line definition. See also Xmatrix
DSS property name: x1, DSS property index: 3
|
inline |
Carson earth return reactance per unit length used to compute impedance values at base frequency.
For making better frequency adjustments. Default value is 0.155081 = 60 Hz value in ohms per kft (matches default line impedances). This value is required for harmonic solutions if you wish to adjust the earth return impedances for frequency. If not, set both Rg and Xg = 0.
DSS property name: Xg, DSS property index: 20
|
inline |
Reactance matrix, lower triangle, ohms per unit length.
Order of the matrix is the number of phases. May be used to specify the impedance of any line configuration. For balanced line models, you may use the standard symmetrical component data definition instead.
DSS property name: xmatrix, DSS property index: 10