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 | |
LineCode (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
LineCode (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
LineCode (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
LineCode & | begin_edit () |
Marks an object for edition. More... | |
LineCode & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
int32_t | nphases () |
Number of phases in the line this line code data represents. More... | |
LineCode & | nphases (int32_t value) |
double | r1 () |
Positive-sequence Resistance, ohms per unit length. More... | |
LineCode & | r1 (double value) |
double | x1 () |
Positive-sequence Reactance, ohms per unit length. More... | |
LineCode & | x1 (double value) |
double | r0 () |
Zero-sequence Resistance, ohms per unit length. More... | |
LineCode & | r0 (double value) |
double | x0 () |
Zero-sequence Reactance, ohms per unit length. More... | |
LineCode & | x0 (double value) |
double | C1 () |
Positive-sequence capacitance, nf per unit length. More... | |
LineCode & | C1 (double value) |
double | C0 () |
Zero-sequence capacitance, nf per unit length. More... | |
LineCode & | C0 (double value) |
DimensionUnits | units () |
One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. More... | |
LineCode & | units (int32_t value) |
LineCode & | units (DimensionUnits value) |
LineCode & | units (const string &value) |
LineCode & | units (const char *value) |
string | units_str () |
One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. More... | |
LineCode & | units_str (const string &value) |
One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. More... | |
VectorXd | rmatrix () |
Resistance matrix, lower triangle, ohms per unit length. More... | |
LineCode & | rmatrix (VectorXd &value) |
VectorXd | xmatrix () |
Reactance matrix, lower triangle, ohms per unit length. More... | |
LineCode & | xmatrix (VectorXd &value) |
VectorXd | cmatrix () |
Nodal Capacitance matrix, lower triangle, nf per unit length.Order of the matrix is the number of phases. More... | |
LineCode & | cmatrix (VectorXd &value) |
double | baseFreq () |
Frequency at which impedances are specified. More... | |
LineCode & | baseFreq (double value) |
double | normamps () |
Normal ampere limit on line. More... | |
LineCode & | normamps (double value) |
double | emergamps () |
Emergency ampere limit on line (usually one-hour rating). More... | |
LineCode & | emergamps (double value) |
double | faultrate () |
Number of faults per unit length per year. More... | |
LineCode & | faultrate (double value) |
double | pctperm () |
Percentage of the faults that become permanent. More... | |
LineCode & | pctperm (double value) |
double | repair () |
Hours to repair. More... | |
LineCode & | repair (double value) |
LineCode & | Kron (bool value) |
Kron = Y/N. More... | |
double | Rg () |
Carson earth return resistance per unit length used to compute impedance values at base frequency. More... | |
LineCode & | Rg (double value) |
double | Xg () |
Carson earth return reactance per unit length used to compute impedance values at base frequency. More... | |
LineCode & | Xg (double value) |
double | rho () |
Default=100 meter ohms. More... | |
LineCode & | rho (double value) |
int32_t | neutral () |
Designates which conductor is the "neutral" conductor that will be eliminated by Kron reduction. More... | |
LineCode & | neutral (int32_t value) |
double | B1 () |
Alternate way to specify C1. More... | |
LineCode & | B1 (double value) |
double | B0 () |
Alternate way to specify C0. More... | |
LineCode & | B0 (double value) |
int32_t | 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... | |
LineCode & | Seasons (int32_t value) |
VectorXd | Ratings () |
An array of ratings to be used when the seasonal ratings flag is True. More... | |
LineCode & | Ratings (VectorXd &value) |
LineType | linetype () |
Code designating the type of line. More... | |
LineCode & | linetype (int32_t value) |
LineCode & | linetype (LineType value) |
LineCode & | linetype (const string &value) |
LineCode & | linetype (const char *value) |
string | linetype_str () |
Code designating the type of line. More... | |
LineCode & | linetype_str (const string &value) |
Code designating the type of line. More... | |
LineCode & | like (const string &value) |
Make like another object, e.g. More... | |
LineCode & | 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 [] = "LineCode" |
static const int32_t | dss_cls_idx = 1 |
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 |
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 |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
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 |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
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 |
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 |
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