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::LineCodeBatch Class Reference
Inheritance diagram for dss::obj::LineCodeBatch:
[legend]
Collaboration diagram for dss::obj::LineCodeBatch:
[legend]

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.
 
LineCodeBatchbegin_edit ()
 
LineCodeBatchend_edit (int32_t num_edits=1)
 
BatchInt32ArrayProxy nphases ()
 Number of phases in the line this line code data represents. More...
 
LineCodeBatchnphases (int32_t value)
 
template<typename T >
LineCodeBatchnphases (T &value)
 
template<typename T >
LineCodeBatchnphases (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy r1 ()
 Positive-sequence Resistance, ohms per unit length. More...
 
LineCodeBatchr1 (double value)
 
template<typename T >
LineCodeBatchr1 (T &value)
 
template<typename T >
LineCodeBatchr1 (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy x1 ()
 Positive-sequence Reactance, ohms per unit length. More...
 
LineCodeBatchx1 (double value)
 
template<typename T >
LineCodeBatchx1 (T &value)
 
template<typename T >
LineCodeBatchx1 (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy r0 ()
 Zero-sequence Resistance, ohms per unit length. More...
 
LineCodeBatchr0 (double value)
 
template<typename T >
LineCodeBatchr0 (T &value)
 
template<typename T >
LineCodeBatchr0 (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy x0 ()
 Zero-sequence Reactance, ohms per unit length. More...
 
LineCodeBatchx0 (double value)
 
template<typename T >
LineCodeBatchx0 (T &value)
 
template<typename T >
LineCodeBatchx0 (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy C1 ()
 Positive-sequence capacitance, nf per unit length. More...
 
LineCodeBatchC1 (double value)
 
template<typename T >
LineCodeBatchC1 (T &value)
 
template<typename T >
LineCodeBatchC1 (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy C0 ()
 Zero-sequence capacitance, nf per unit length. More...
 
LineCodeBatchC0 (double value)
 
template<typename T >
LineCodeBatchC0 (T &value)
 
template<typename T >
LineCodeBatchC0 (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...
 
LineCodeBatchunits (string &value)
 
LineCodeBatchunits (int32_t value)
 
LineCodeBatchunits (DimensionUnits value)
 
LineCodeBatchunits (strings &value)
 
LineCodeBatchunits (std::vector< int32_t > &value)
 
LineCodeBatchunits (std::vector< DimensionUnits > &value)
 
strings units_str ()
 One of (ohms per ...) {none|mi|km|kft|m|me|ft|in|cm}. More...
 
LineCodeBatchunits_str (string &value)
 
LineCodeBatchunits_str (strings &value)
 
std::vector< VectorXd > rmatrix ()
 Resistance matrix, lower triangle, ohms per unit length. More...
 
LineCodeBatchrmatrix (VectorXd &value)
 
std::vector< VectorXd > xmatrix ()
 Reactance matrix, lower triangle, ohms per unit length. More...
 
LineCodeBatchxmatrix (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...
 
LineCodeBatchcmatrix (VectorXd &value)
 
BatchFloat64ArrayProxy baseFreq ()
 Frequency at which impedances are specified. More...
 
LineCodeBatchbaseFreq (double value)
 
template<typename T >
LineCodeBatchbaseFreq (T &value)
 
template<typename T >
LineCodeBatchbaseFreq (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy normamps ()
 Normal ampere limit on line. More...
 
LineCodeBatchnormamps (double value)
 
template<typename T >
LineCodeBatchnormamps (T &value)
 
template<typename T >
LineCodeBatchnormamps (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy emergamps ()
 Emergency ampere limit on line (usually one-hour rating). More...
 
LineCodeBatchemergamps (double value)
 
template<typename T >
LineCodeBatchemergamps (T &value)
 
template<typename T >
LineCodeBatchemergamps (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy faultrate ()
 Number of faults per unit length per year. More...
 
LineCodeBatchfaultrate (double value)
 
template<typename T >
LineCodeBatchfaultrate (T &value)
 
template<typename T >
LineCodeBatchfaultrate (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy pctperm ()
 Percentage of the faults that become permanent. More...
 
LineCodeBatchpctperm (double value)
 
template<typename T >
LineCodeBatchpctperm (T &value)
 
template<typename T >
LineCodeBatchpctperm (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy repair ()
 Hours to repair. More...
 
LineCodeBatchrepair (double value)
 
template<typename T >
LineCodeBatchrepair (T &value)
 
template<typename T >
LineCodeBatchrepair (typename T::iterator it_begin, typename T::iterator it_end)
 
LineCodeBatchKron (bool value)
 Kron = Y/N. More...
 
BatchFloat64ArrayProxy Rg ()
 Carson earth return resistance per unit length used to compute impedance values at base frequency. More...
 
LineCodeBatchRg (double value)
 
template<typename T >
LineCodeBatchRg (T &value)
 
template<typename T >
LineCodeBatchRg (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...
 
LineCodeBatchXg (double value)
 
template<typename T >
LineCodeBatchXg (T &value)
 
template<typename T >
LineCodeBatchXg (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy rho ()
 Default=100 meter ohms. More...
 
LineCodeBatchrho (double value)
 
template<typename T >
LineCodeBatchrho (T &value)
 
template<typename T >
LineCodeBatchrho (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...
 
LineCodeBatchneutral (int32_t value)
 
template<typename T >
LineCodeBatchneutral (T &value)
 
template<typename T >
LineCodeBatchneutral (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy B1 ()
 Alternate way to specify C1. More...
 
LineCodeBatchB1 (double value)
 
template<typename T >
LineCodeBatchB1 (T &value)
 
template<typename T >
LineCodeBatchB1 (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy B0 ()
 Alternate way to specify C0. More...
 
LineCodeBatchB0 (double value)
 
template<typename T >
LineCodeBatchB0 (T &value)
 
template<typename T >
LineCodeBatchB0 (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...
 
LineCodeBatchSeasons (int32_t value)
 
template<typename T >
LineCodeBatchSeasons (T &value)
 
template<typename T >
LineCodeBatchSeasons (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...
 
LineCodeBatchRatings (VectorXd &value)
 
BatchInt32ArrayProxy linetype ()
 Code designating the type of line. More...
 
LineCodeBatchlinetype (string &value)
 
LineCodeBatchlinetype (int32_t value)
 
LineCodeBatchlinetype (LineType value)
 
LineCodeBatchlinetype (strings &value)
 
LineCodeBatchlinetype (std::vector< int32_t > &value)
 
LineCodeBatchlinetype (std::vector< LineType > &value)
 
strings linetype_str ()
 Code designating the type of line. More...
 
LineCodeBatchlinetype_str (string &value)
 
LineCodeBatchlinetype_str (strings &value)
 
LineCodeBatchlike (const string &value)
 Make like another object, e.g. More...
 
LineCodeBatchlike (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
APIUtilapi_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>
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)
 

Member Function Documentation

◆ B0()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::B0 ( )
inline

Alternate way to specify C0.

MicroS per unit length

DSS property name: B0, DSS property index: 24

◆ B1()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::B1 ( )
inline

Alternate way to specify C1.

MicroS per unit length

DSS property name: B1, DSS property index: 23

◆ baseFreq()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::baseFreq ( )
inline

Frequency at which impedances are specified.

DSS property name: baseFreq, DSS property index: 12

◆ C0()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::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()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::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()

std::vector< VectorXd > dss::obj::LineCodeBatch::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()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::emergamps ( )
inline

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

DSS property name: emergamps, DSS property index: 14

◆ faultrate()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::faultrate ( )
inline

Number of faults per unit length per year.

DSS property name: faultrate, DSS property index: 15

◆ Kron()

LineCodeBatch & dss::obj::LineCodeBatch::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]

LineCodeBatch & dss::obj::LineCodeBatch::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]

LineCodeBatch & dss::obj::LineCodeBatch::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()

BatchInt32ArrayProxy dss::obj::LineCodeBatch::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()

strings dss::obj::LineCodeBatch::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

◆ neutral()

BatchInt32ArrayProxy dss::obj::LineCodeBatch::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()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::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()

BatchInt32ArrayProxy dss::obj::LineCodeBatch::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()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::pctperm ( )
inline

Percentage of the faults that become permanent.

DSS property name: pctperm, DSS property index: 16

◆ r0()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::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()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::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()

std::vector< VectorXd > dss::obj::LineCodeBatch::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()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::repair ( )
inline

Hours to repair.

DSS property name: repair, DSS property index: 17

◆ Rg()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::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()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::rho ( )
inline

Default=100 meter ohms.

Earth resitivity used to compute earth correction factor.

DSS property name: rho, DSS property index: 21

◆ rmatrix()

std::vector< VectorXd > dss::obj::LineCodeBatch::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()

BatchInt32ArrayProxy dss::obj::LineCodeBatch::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()

BatchInt32ArrayProxy dss::obj::LineCodeBatch::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()

strings dss::obj::LineCodeBatch::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

◆ x0()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::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()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::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()

BatchFloat64ArrayProxy dss::obj::LineCodeBatch::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()

std::vector< VectorXd > dss::obj::LineCodeBatch::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: