DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
dss::obj::LineCode Class Reference
Inheritance diagram for dss::obj::LineCode:
[legend]
Collaboration diagram for dss::obj::LineCode:
[legend]

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.
 
LineCodebegin_edit ()
 Marks an object for edition. More...
 
LineCodeend_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...
 
LineCodenphases (int32_t value)
 
double r1 ()
 Positive-sequence Resistance, ohms per unit length. More...
 
LineCoder1 (double value)
 
double x1 ()
 Positive-sequence Reactance, ohms per unit length. More...
 
LineCodex1 (double value)
 
double r0 ()
 Zero-sequence Resistance, ohms per unit length. More...
 
LineCoder0 (double value)
 
double x0 ()
 Zero-sequence Reactance, ohms per unit length. More...
 
LineCodex0 (double value)
 
double C1 ()
 Positive-sequence capacitance, nf per unit length. More...
 
LineCodeC1 (double value)
 
double C0 ()
 Zero-sequence capacitance, nf per unit length. More...
 
LineCodeC0 (double value)
 
DimensionUnits units ()
 One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. More...
 
LineCodeunits (int32_t value)
 
LineCodeunits (DimensionUnits value)
 
LineCodeunits (const string &value)
 
LineCodeunits (const char *value)
 
string units_str ()
 One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. More...
 
LineCodeunits_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...
 
LineCodermatrix (VectorXd &value)
 
VectorXd xmatrix ()
 Reactance matrix, lower triangle, ohms per unit length. More...
 
LineCodexmatrix (VectorXd &value)
 
VectorXd cmatrix ()
 Nodal Capacitance matrix, lower triangle, nf per unit length.Order of the matrix is the number of phases. More...
 
LineCodecmatrix (VectorXd &value)
 
double baseFreq ()
 Frequency at which impedances are specified. More...
 
LineCodebaseFreq (double value)
 
double normamps ()
 Normal ampere limit on line. More...
 
LineCodenormamps (double value)
 
double emergamps ()
 Emergency ampere limit on line (usually one-hour rating). More...
 
LineCodeemergamps (double value)
 
double faultrate ()
 Number of faults per unit length per year. More...
 
LineCodefaultrate (double value)
 
double pctperm ()
 Percentage of the faults that become permanent. More...
 
LineCodepctperm (double value)
 
double repair ()
 Hours to repair. More...
 
LineCoderepair (double value)
 
LineCodeKron (bool value)
 Kron = Y/N. More...
 
double Rg ()
 Carson earth return resistance per unit length used to compute impedance values at base frequency. More...
 
LineCodeRg (double value)
 
double Xg ()
 Carson earth return reactance per unit length used to compute impedance values at base frequency. More...
 
LineCodeXg (double value)
 
double rho ()
 Default=100 meter ohms. More...
 
LineCoderho (double value)
 
int32_t neutral ()
 Designates which conductor is the "neutral" conductor that will be eliminated by Kron reduction. More...
 
LineCodeneutral (int32_t value)
 
double B1 ()
 Alternate way to specify C1. More...
 
LineCodeB1 (double value)
 
double B0 ()
 Alternate way to specify C0. More...
 
LineCodeB0 (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...
 
LineCodeSeasons (int32_t value)
 
VectorXd Ratings ()
 An array of ratings to be used when the seasonal ratings flag is True. More...
 
LineCodeRatings (VectorXd &value)
 
LineType linetype ()
 Code designating the type of line. More...
 
LineCodelinetype (int32_t value)
 
LineCodelinetype (LineType value)
 
LineCodelinetype (const string &value)
 
LineCodelinetype (const char *value)
 
string linetype_str ()
 Code designating the type of line. More...
 
LineCodelinetype_str (const string &value)
 Code designating the type of line. More...
 
LineCodelike (const string &value)
 Make like another object, e.g. More...
 
LineCodelike (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
APIUtilapi_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 >
get_obj (int32_t index)
 
template<typename T = VectorXd>
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
 

Member Function Documentation

◆ B0()

double dss::obj::LineCode::B0 ( )
inline

Alternate way to specify C0.

MicroS per unit length

DSS property name: B0, DSS property index: 24

◆ B1()

double dss::obj::LineCode::B1 ( )
inline

Alternate way to specify C1.

MicroS per unit length

DSS property name: B1, DSS property index: 23

◆ baseFreq()

double dss::obj::LineCode::baseFreq ( )
inline

Frequency at which impedances are specified.

DSS property name: baseFreq, DSS property index: 12

◆ begin_edit()

LineCode & dss::obj::LineCode::begin_edit ( )
inline

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ C0()

double dss::obj::LineCode::C0 ( )
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

◆ C1()

double dss::obj::LineCode::C1 ( )
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

◆ cmatrix()

VectorXd dss::obj::LineCode::cmatrix ( )
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

◆ emergamps()

double dss::obj::LineCode::emergamps ( )
inline

Emergency ampere limit on line (usually one-hour rating).

DSS property name: emergamps, DSS property index: 14

◆ end_edit()

LineCode & dss::obj::LineCode::end_edit ( int32_t  num_edits = 1)
inline

Finalizes an object edition.

This will result more compelx side-effects like Yprim and other internal data recalculation, for example.

◆ faultrate()

double dss::obj::LineCode::faultrate ( )
inline

Number of faults per unit length per year.

DSS property name: faultrate, DSS property index: 15

◆ Kron()

LineCode & dss::obj::LineCode::Kron ( bool  value)
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

◆ like() [1/2]

LineCode & dss::obj::LineCode::like ( const char *  value)
inline

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 28

◆ like() [2/2]

LineCode & dss::obj::LineCode::like ( const string &  value)
inline

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 28

◆ linetype()

LineType dss::obj::LineCode::linetype ( )
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

◆ linetype_str() [1/2]

string dss::obj::LineCode::linetype_str ( )
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

◆ linetype_str() [2/2]

LineCode & dss::obj::LineCode::linetype_str ( const string &  value)
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

◆ neutral()

int32_t dss::obj::LineCode::neutral ( )
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

◆ normamps()

double dss::obj::LineCode::normamps ( )
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

◆ nphases()

int32_t dss::obj::LineCode::nphases ( )
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

◆ pctperm()

double dss::obj::LineCode::pctperm ( )
inline

Percentage of the faults that become permanent.

DSS property name: pctperm, DSS property index: 16

◆ r0()

double dss::obj::LineCode::r0 ( )
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

◆ r1()

double dss::obj::LineCode::r1 ( )
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

◆ Ratings()

VectorXd dss::obj::LineCode::Ratings ( )
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

◆ repair()

double dss::obj::LineCode::repair ( )
inline

Hours to repair.

DSS property name: repair, DSS property index: 17

◆ Rg()

double dss::obj::LineCode::Rg ( )
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

◆ rho()

double dss::obj::LineCode::rho ( )
inline

Default=100 meter ohms.

Earth resitivity used to compute earth correction factor.

DSS property name: rho, DSS property index: 21

◆ rmatrix()

VectorXd dss::obj::LineCode::rmatrix ( )
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

◆ Seasons()

int32_t dss::obj::LineCode::Seasons ( )
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

◆ units()

DimensionUnits dss::obj::LineCode::units ( )
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

◆ units_str() [1/2]

string dss::obj::LineCode::units_str ( )
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

◆ units_str() [2/2]

LineCode & dss::obj::LineCode::units_str ( const string &  value)
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

◆ x0()

double dss::obj::LineCode::x0 ( )
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

◆ x1()

double dss::obj::LineCode::x1 ( )
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

◆ Xg()

double dss::obj::LineCode::Xg ( )
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

◆ xmatrix()

VectorXd dss::obj::LineCode::xmatrix ( )
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


The documentation for this class was generated from the following file: