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 | |
Line (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
Line (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
Line (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
Line & | begin_edit () |
Marks an object for edition. More... | |
Line & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
string | bus1 () |
Name of bus to which first terminal is connected. More... | |
Line & | bus1 (const string &value) |
Line & | bus1 (const char *value) |
string | bus2 () |
Name of bus to which 2nd terminal is connected. More... | |
Line & | bus2 (const string &value) |
Line & | bus2 (const char *value) |
string | linecode () |
Name of linecode object describing line impedances. More... | |
Line & | linecode (const string &value) |
Line & | linecode (dss::obj::LineCode &value) |
dss::obj::LineCode | linecode_obj () |
Name of linecode object describing line impedances. More... | |
Line & | linecode_obj (dss::obj::LineCode &value) |
double | length () |
Length of line. More... | |
Line & | length (double value) |
int32_t | phases () |
Number of phases, this line. More... | |
Line & | phases (int32_t value) |
double | r1 () |
Positive-sequence Resistance, ohms per unit length. More... | |
Line & | r1 (double value) |
double | x1 () |
Positive-sequence Reactance, ohms per unit length. More... | |
Line & | x1 (double value) |
double | r0 () |
Zero-sequence Resistance, ohms per unit length. More... | |
Line & | r0 (double value) |
double | x0 () |
Zero-sequence Reactance, ohms per unit length. More... | |
Line & | x0 (double value) |
double | C1 () |
Positive-sequence capacitance, nf per unit length. More... | |
Line & | C1 (double value) |
double | C0 () |
Zero-sequence capacitance, nf per unit length. More... | |
Line & | C0 (double value) |
VectorXd | rmatrix () |
Resistance matrix, lower triangle, ohms per unit length. More... | |
Line & | rmatrix (VectorXd &value) |
VectorXd | xmatrix () |
Reactance matrix, lower triangle, ohms per unit length. More... | |
Line & | xmatrix (VectorXd &value) |
VectorXd | cmatrix () |
Nodal Capacitance matrix, lower triangle, nf per unit length.Order of the matrix is the number of phases. More... | |
Line & | cmatrix (VectorXd &value) |
bool | Switch () |
{y/n | T/F} Default= no/false. More... | |
Line & | Switch (bool value) |
double | Rg () |
Carson earth return resistance per unit length used to compute impedance values at base frequency. More... | |
Line & | Rg (double value) |
double | Xg () |
Carson earth return reactance per unit length used to compute impedance values at base frequency. More... | |
Line & | Xg (double value) |
double | rho () |
Default=100 meter ohms. More... | |
Line & | rho (double value) |
string | geometry () |
Geometry code for LineGeometry Object. More... | |
Line & | geometry (const string &value) |
Line & | geometry (dss::obj::LineGeometry &value) |
dss::obj::LineGeometry | geometry_obj () |
Geometry code for LineGeometry Object. More... | |
Line & | geometry_obj (dss::obj::LineGeometry &value) |
DimensionUnits | units () |
Length Units = {none | mi|kft|km|m|Ft|in|cm } Default is None - assumes length units match impedance units. More... | |
Line & | units (int32_t value) |
Line & | units (DimensionUnits value) |
Line & | units (const string &value) |
Line & | units (const char *value) |
string | units_str () |
Length Units = {none | mi|kft|km|m|Ft|in|cm } Default is None - assumes length units match impedance units. More... | |
Line & | units_str (const string &value) |
Length Units = {none | mi|kft|km|m|Ft|in|cm } Default is None - assumes length units match impedance units. More... | |
string | spacing () |
Reference to a LineSpacing for use in a line constants calculation. More... | |
Line & | spacing (const string &value) |
Line & | spacing (dss::obj::LineSpacing &value) |
dss::obj::LineSpacing | spacing_obj () |
Reference to a LineSpacing for use in a line constants calculation. More... | |
Line & | spacing_obj (dss::obj::LineSpacing &value) |
strings | wires () |
Array of WireData names for use in an overhead line constants calculation. More... | |
Line & | wires (strings &value) |
Line & | wires (std::vector< dss::obj::WireData > &value) |
std::vector< dss::obj::WireData > | wires_obj () |
Array of WireData names for use in an overhead line constants calculation. More... | |
Line & | wires_obj (std::vector< dss::obj::WireData > &value) |
EarthModel | earthmodel () |
One of {Carson | FullCarson | Deri}. More... | |
Line & | earthmodel (int32_t value) |
Line & | earthmodel (EarthModel value) |
Line & | earthmodel (const string &value) |
Line & | earthmodel (const char *value) |
string | earthmodel_str () |
One of {Carson | FullCarson | Deri}. More... | |
Line & | earthmodel_str (const string &value) |
One of {Carson | FullCarson | Deri}. More... | |
strings | cncables () |
Array of CNData names for use in a cable constants calculation. More... | |
Line & | cncables (strings &value) |
Line & | cncables (std::vector< dss::obj::CNData > &value) |
std::vector< dss::obj::CNData > | cncables_obj () |
Array of CNData names for use in a cable constants calculation. More... | |
Line & | cncables_obj (std::vector< dss::obj::CNData > &value) |
strings | tscables () |
Array of TSData names for use in a cable constants calculation. More... | |
Line & | tscables (strings &value) |
Line & | tscables (std::vector< dss::obj::TSData > &value) |
std::vector< dss::obj::TSData > | tscables_obj () |
Array of TSData names for use in a cable constants calculation. More... | |
Line & | tscables_obj (std::vector< dss::obj::TSData > &value) |
double | B1 () |
Alternate way to specify C1. More... | |
Line & | B1 (double value) |
double | B0 () |
Alternate way to specify C0. More... | |
Line & | 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... | |
Line & | Seasons (int32_t value) |
VectorXd | Ratings () |
An array of ratings to be used when the seasonal ratings flag is True. More... | |
Line & | Ratings (VectorXd &value) |
LineType | linetype () |
Code designating the type of line. More... | |
Line & | linetype (int32_t value) |
Line & | linetype (LineType value) |
Line & | linetype (const string &value) |
Line & | linetype (const char *value) |
string | linetype_str () |
Code designating the type of line. More... | |
Line & | linetype_str (const string &value) |
Code designating the type of line. More... | |
double | normamps () |
Normal rated current. More... | |
Line & | normamps (double value) |
double | emergamps () |
Maximum or emerg current. More... | |
Line & | emergamps (double value) |
double | faultrate () |
Failure rate PER UNIT LENGTH per year. More... | |
Line & | faultrate (double value) |
double | pctperm () |
Percent of failures that become permanent. More... | |
Line & | pctperm (double value) |
double | repair () |
Hours to repair. More... | |
Line & | repair (double value) |
double | basefreq () |
Base Frequency for ratings. More... | |
Line & | basefreq (double value) |
bool | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
Line & | enabled (bool value) |
Line & | like (const string &value) |
Make like another object, e.g. More... | |
Line & | 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 [] = "Line" |
static const int32_t | dss_cls_idx = 15 |
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: 27
|
inline |
Alternate way to specify C1.
MicroS per unit length
DSS property name: B1, DSS property index: 26
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 36
|
inline |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
inline |
Name of bus to which first terminal is connected.
Example: bus1=busname (assumes all terminals connected in normal phase order) bus1=busname.3.1.2.0 (specify terminal to node connections explicitly)
DSS property name: bus1, DSS property index: 1
|
inline |
Name of bus to which 2nd terminal is connected.
DSS property name: bus2, DSS property index: 2
|
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: 11
|
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: 10
|
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. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead.
DSS property name: cmatrix, DSS property index: 14
|
inline |
Array of CNData names for use in a cable constants calculation.
Must be used in conjunction with the Spacing property. Specify the Spacing first, using "nphases" cncables. You may later specify "nconds-nphases" wires for separate neutrals
DSS property name: cncables, DSS property index: 24
|
inline |
Array of CNData names for use in a cable constants calculation.
Must be used in conjunction with the Spacing property. Specify the Spacing first, using "nphases" cncables. You may later specify "nconds-nphases" wires for separate neutrals
DSS property name: cncables, DSS property index: 24
|
inline |
One of {Carson | FullCarson | Deri}.
Default is the global value established with the Set EarthModel command. See the Options Help on EarthModel option. This is used to override the global value for this line. This option applies only when the "geometry" property is used.
DSS property name: EarthModel, DSS property index: 23
|
inline |
One of {Carson | FullCarson | Deri}.
Default is the global value established with the Set EarthModel command. See the Options Help on EarthModel option. This is used to override the global value for this line. This option applies only when the "geometry" property is used.
DSS property name: EarthModel, DSS property index: 23
|
inline |
One of {Carson | FullCarson | Deri}.
Default is the global value established with the Set EarthModel command. See the Options Help on EarthModel option. This is used to override the global value for this line. This option applies only when the "geometry" property is used.
DSS property name: EarthModel, DSS property index: 23
|
inline |
Maximum or emerg current.
DSS property name: emergamps, DSS property index: 32
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 37
|
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 UNIT LENGTH per year.
Length must be same units as LENGTH property. Default is 0.1 fault per unit length per year.
DSS property name: faultrate, DSS property index: 33
|
inline |
Geometry code for LineGeometry Object.
Supercedes any previous definition of line impedance. Line constants are computed for each frequency change or rho change. CAUTION: may alter number of phases. You cannot subsequently change the number of phases unless you change how the line impedance is defined.
DSS property name: geometry, DSS property index: 19
|
inline |
Geometry code for LineGeometry Object.
Supercedes any previous definition of line impedance. Line constants are computed for each frequency change or rho change. CAUTION: may alter number of phases. You cannot subsequently change the number of phases unless you change how the line impedance is defined.
DSS property name: geometry, DSS property index: 19
|
inline |
Length of line.
Default is 1.0. If units do not match the impedance data, specify "units" property.
DSS property name: length, DSS property index: 4
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 38
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 38
|
inline |
Name of linecode object describing line impedances.
If you use a line code, you do not need to specify the impedances here. The line code must have been PREVIOUSLY defined. The values specified last will prevail over those specified earlier (left-to-right sequence of properties). You can subsequently change the number of phases if symmetrical component quantities are specified.If no line code or impedance data are specified, the line object defaults to 336 MCM ACSR on 4 ft spacing.
DSS property name: linecode, DSS property index: 3
|
inline |
Name of linecode object describing line impedances.
If you use a line code, you do not need to specify the impedances here. The line code must have been PREVIOUSLY defined. The values specified last will prevail over those specified earlier (left-to-right sequence of properties). You can subsequently change the number of phases if symmetrical component quantities are specified.If no line code or impedance data are specified, the line object defaults to 336 MCM ACSR on 4 ft spacing.
DSS property name: linecode, DSS property index: 3
|
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: 30
|
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: 30
|
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: 30
|
inline |
Normal rated current.
DSS property name: normamps, DSS property index: 31
|
inline |
Percent of failures that become permanent.
Default is 20.
DSS property name: pctperm, DSS property index: 34
|
inline |
Number of phases, this line.
DSS property name: phases, DSS property index: 5
|
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: 8
|
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: 6
|
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: 29
|
inline |
Hours to repair.
Default is 3 hr.
DSS property name: repair, DSS property index: 35
|
inline |
Carson earth return resistance per unit length used to compute impedance values at base frequency.
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: 16
|
inline |
Default=100 meter ohms.
Earth resitivity used to compute earth correction factor. Overrides Line geometry definition if specified.
DSS property name: rho, DSS property index: 18
|
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. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead.
DSS property name: rmatrix, DSS property index: 12
|
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: 28
|
inline |
Reference to a LineSpacing for use in a line constants calculation.
Must be used in conjunction with the Wires property. Specify this before the wires property.
DSS property name: spacing, DSS property index: 21
|
inline |
Reference to a LineSpacing for use in a line constants calculation.
Must be used in conjunction with the Wires property. Specify this before the wires property.
DSS property name: spacing, DSS property index: 21
|
inline |
{y/n | T/F} Default= no/false.
Designates this line as a switch for graphics and algorithmic purposes. SIDE EFFECT: Sets r1 = 1.0; x1 = 1.0; r0 = 1.0; x0 = 1.0; c1 = 1.1 ; c0 = 1.0; length = 0.001; You must reset if you want something different.
DSS property name: Switch, DSS property index: 15
|
inline |
Array of TSData names for use in a cable constants calculation.
Must be used in conjunction with the Spacing property. Specify the Spacing first, using "nphases" tscables. You may later specify "nconds-nphases" wires for separate neutrals
DSS property name: tscables, DSS property index: 25
|
inline |
Array of TSData names for use in a cable constants calculation.
Must be used in conjunction with the Spacing property. Specify the Spacing first, using "nphases" tscables. You may later specify "nconds-nphases" wires for separate neutrals
DSS property name: tscables, DSS property index: 25
|
inline |
Length Units = {none | mi|kft|km|m|Ft|in|cm } Default is None - assumes length units match impedance units.
DSS property name: units, DSS property index: 20
|
inline |
Length Units = {none | mi|kft|km|m|Ft|in|cm } Default is None - assumes length units match impedance units.
DSS property name: units, DSS property index: 20
|
inline |
Length Units = {none | mi|kft|km|m|Ft|in|cm } Default is None - assumes length units match impedance units.
DSS property name: units, DSS property index: 20
|
inline |
Array of WireData names for use in an overhead line constants calculation.
Must be used in conjunction with the Spacing property. Specify the Spacing first, and "ncond" wires. May also be used to specify bare neutrals with cables, using "ncond-nphase" wires.
DSS property name: wires, DSS property index: 22
|
inline |
Array of WireData names for use in an overhead line constants calculation.
Must be used in conjunction with the Spacing property. Specify the Spacing first, and "ncond" wires. May also be used to specify bare neutrals with cables, using "ncond-nphase" wires.
DSS property name: wires, DSS property index: 22
|
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: 9
|
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: 7
|
inline |
Carson earth return reactance per unit length used to compute impedance values at base frequency.
For making better frequency adjustments. Default 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: 17
|
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. Using any of Rmatrix, Xmatrix, Cmatrix forces program to use the matrix values for line impedance definition. For balanced line models, you may use the standard symmetrical component data definition instead.
DSS property name: xmatrix, DSS property index: 13