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 Capacitor::Properties | Properties |
typedef Capacitor | BatchElementClass |
Public Member Functions | |
CapacitorBatch (APIUtil *util) | |
Create a batch of all Capacitor elements. | |
CapacitorBatch (APIUtil *util, int32_t prop_idx, int32_t prop_value) | |
Create a batch of all Capacitor elements that match an integer property value. | |
CapacitorBatch (APIUtil *util, const char *regexp) | |
Create a batch of all Capacitor elements that match a regular expression. | |
CapacitorBatch & | begin_edit () |
CapacitorBatch & | end_edit (int32_t num_edits=1) |
strings | bus1 () |
Name of first bus of 2-terminal capacitor. More... | |
CapacitorBatch & | bus1 (const string &value) |
CapacitorBatch & | bus1 (strings &value) |
strings | bus2 () |
Name of 2nd bus. More... | |
CapacitorBatch & | bus2 (const string &value) |
CapacitorBatch & | bus2 (strings &value) |
BatchInt32ArrayProxy | phases () |
Number of phases. More... | |
CapacitorBatch & | phases (int32_t value) |
template<typename T > | |
CapacitorBatch & | phases (T &value) |
template<typename T > | |
CapacitorBatch & | phases (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< VectorXd > | kvar () |
Total kvar, if one step, or ARRAY of kvar ratings for each step. More... | |
CapacitorBatch & | kvar (VectorXd &value) |
BatchFloat64ArrayProxy | kv () |
For 2, 3-phase, kV phase-phase. More... | |
CapacitorBatch & | kv (double value) |
template<typename T > | |
CapacitorBatch & | kv (T &value) |
template<typename T > | |
CapacitorBatch & | kv (typename T::iterator it_begin, typename T::iterator it_end) |
BatchInt32ArrayProxy | conn () |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN More... | |
CapacitorBatch & | conn (string &value) |
CapacitorBatch & | conn (int32_t value) |
CapacitorBatch & | conn (Connection value) |
CapacitorBatch & | conn (strings &value) |
CapacitorBatch & | conn (std::vector< int32_t > &value) |
CapacitorBatch & | conn (std::vector< Connection > &value) |
strings | conn_str () |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN More... | |
CapacitorBatch & | conn_str (string &value) |
CapacitorBatch & | conn_str (strings &value) |
std::vector< VectorXd > | cmatrix () |
Nodal cap. More... | |
CapacitorBatch & | cmatrix (VectorXd &value) |
std::vector< VectorXd > | cuf () |
ARRAY of Capacitance, each phase, for each step, microfarads. More... | |
CapacitorBatch & | cuf (VectorXd &value) |
std::vector< VectorXd > | R () |
ARRAY of series resistance in each phase (line), ohms. More... | |
CapacitorBatch & | R (VectorXd &value) |
std::vector< VectorXd > | XL () |
ARRAY of series inductive reactance(s) in each phase (line) for filter, ohms at base frequency. More... | |
CapacitorBatch & | XL (VectorXd &value) |
std::vector< VectorXd > | Harm () |
ARRAY of harmonics to which each step is tuned. More... | |
CapacitorBatch & | Harm (VectorXd &value) |
BatchInt32ArrayProxy | Numsteps () |
Number of steps in this capacitor bank. More... | |
CapacitorBatch & | Numsteps (int32_t value) |
template<typename T > | |
CapacitorBatch & | Numsteps (T &value) |
template<typename T > | |
CapacitorBatch & | Numsteps (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< VectorXi > | states () |
ARRAY of integers {1|0} states representing the state of each step (on|off). More... | |
CapacitorBatch & | states (VectorXi &value) |
CapacitorBatch & | states (std::vector< VectorXi > &value) |
BatchFloat64ArrayProxy | normamps () |
Normal rated current. More... | |
CapacitorBatch & | normamps (double value) |
template<typename T > | |
CapacitorBatch & | normamps (T &value) |
template<typename T > | |
CapacitorBatch & | normamps (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | emergamps () |
Maximum or emerg current. More... | |
CapacitorBatch & | emergamps (double value) |
template<typename T > | |
CapacitorBatch & | emergamps (T &value) |
template<typename T > | |
CapacitorBatch & | emergamps (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | faultrate () |
Failure rate per year. More... | |
CapacitorBatch & | faultrate (double value) |
template<typename T > | |
CapacitorBatch & | faultrate (T &value) |
template<typename T > | |
CapacitorBatch & | faultrate (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | pctperm () |
Percent of failures that become permanent. More... | |
CapacitorBatch & | pctperm (double value) |
template<typename T > | |
CapacitorBatch & | pctperm (T &value) |
template<typename T > | |
CapacitorBatch & | pctperm (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | repair () |
Hours to repair. More... | |
CapacitorBatch & | repair (double value) |
template<typename T > | |
CapacitorBatch & | repair (T &value) |
template<typename T > | |
CapacitorBatch & | repair (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | basefreq () |
Base Frequency for ratings. More... | |
CapacitorBatch & | basefreq (double value) |
template<typename T > | |
CapacitorBatch & | basefreq (T &value) |
template<typename T > | |
CapacitorBatch & | basefreq (typename T::iterator it_begin, typename T::iterator it_end) |
bools | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
CapacitorBatch & | enabled (bool value) |
CapacitorBatch & | enabled (bools &value) |
CapacitorBatch & | like (const string &value) |
Make like another object, e.g. More... | |
CapacitorBatch & | 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 |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 19
|
inline |
Name of first bus of 2-terminal capacitor.
Examples: bus1=busname bus1=busname.1.2.3
If only one bus specified, Bus2 will default to this bus, Node 0, and the capacitor will be a Yg shunt bank.
DSS property name: bus1, DSS property index: 1
|
inline |
Name of 2nd bus.
Defaults to all phases connected to first bus, node 0, (Shunt Wye Connection) except when Bus2 explicitly specified.
Not necessary to specify for delta (LL) connection.
DSS property name: bus2, DSS property index: 2
|
inline |
Nodal cap.
matrix, lower triangle, microfarads, of the following form:
cmatrix="c11 | -c21 c22 | -c31 -c32 c33"
All steps are assumed the same if this property is used.
DSS property name: cmatrix, DSS property index: 7
|
inline |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN
DSS property name: conn, DSS property index: 6
|
inline |
={wye | delta |LN |LL} Default is wye, which is equivalent to LN
DSS property name: conn, DSS property index: 6
|
inline |
ARRAY of Capacitance, each phase, for each step, microfarads.
See Rules for NumSteps.
DSS property name: cuf, DSS property index: 8
|
inline |
Maximum or emerg current.
DSS property name: emergamps, DSS property index: 15
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 20
|
inline |
Failure rate per year.
DSS property name: faultrate, DSS property index: 16
|
inline |
ARRAY of harmonics to which each step is tuned.
Zero is interpreted as meaning zero reactance (no filter). Default is zero.
DSS property name: Harm, DSS property index: 11
|
inline |
For 2, 3-phase, kV phase-phase.
Otherwise specify actual can rating.
DSS property name: kv, DSS property index: 5
|
inline |
Total kvar, if one step, or ARRAY of kvar ratings for each step.
Evenly divided among phases. See rules for NUMSTEPS.
DSS property name: kvar, DSS property index: 4
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 21
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 21
|
inline |
Normal rated current.
DSS property name: normamps, DSS property index: 14
|
inline |
Number of steps in this capacitor bank.
Default = 1. Forces reallocation of the capacitance, reactor, and states array. Rules: If this property was previously =1, the value in the kvar property is divided equally among the steps. The kvar property does not need to be reset if that is accurate. If the Cuf or Cmatrix property was used previously, all steps are set to the value of the first step. The states property is set to all steps on. All filter steps are set to the same harmonic. If this property was previously >1, the arrays are reallocated, but no values are altered. You must SUBSEQUENTLY assign all array properties.
DSS property name: Numsteps, DSS property index: 12
|
inline |
Percent of failures that become permanent.
DSS property name: pctperm, DSS property index: 17
|
inline |
Number of phases.
DSS property name: phases, DSS property index: 3
|
inline |
ARRAY of series resistance in each phase (line), ohms.
Default is 0.0
DSS property name: R, DSS property index: 9
|
inline |
Hours to repair.
DSS property name: repair, DSS property index: 18
|
inline |
ARRAY of integers {1|0} states representing the state of each step (on|off).
Defaults to 1 when reallocated (on). Capcontrol will modify this array as it turns steps on or off.
DSS property name: states, DSS property index: 13
|
inline |
ARRAY of series inductive reactance(s) in each phase (line) for filter, ohms at base frequency.
Use this OR "h" property to define filter. Default is 0.0.
DSS property name: XL, DSS property index: 10