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 EnergyMeter::Properties | Properties |
typedef EnergyMeter | BatchElementClass |
typedef EnergyMeter::EnergyMeterAction | EnergyMeterAction |
Public Member Functions | |
EnergyMeterBatch (APIUtil *util) | |
Create a batch of all EnergyMeter elements. | |
EnergyMeterBatch (APIUtil *util, int32_t prop_idx, int32_t prop_value) | |
Create a batch of all EnergyMeter elements that match an integer property value. | |
EnergyMeterBatch (APIUtil *util, const char *regexp) | |
Create a batch of all EnergyMeter elements that match a regular expression. | |
EnergyMeterBatch & | begin_edit () |
EnergyMeterBatch & | end_edit (int32_t num_edits=1) |
strings | element () |
Name (Full Object name) of element to which the monitor is connected. More... | |
EnergyMeterBatch & | element (dss::obj::DSSObj &value) |
EnergyMeterBatch & | element (const string &value) |
std::vector< dss::obj::DSSObj > | element_obj () |
Name (Full Object name) of element to which the monitor is connected. More... | |
EnergyMeterBatch & | element_obj (dss::obj::DSSObj &value) |
BatchInt32ArrayProxy | terminal () |
Number of the terminal of the circuit element to which the monitor is connected. More... | |
EnergyMeterBatch & | terminal (int32_t value) |
template<typename T > | |
EnergyMeterBatch & | terminal (T &value) |
template<typename T > | |
EnergyMeterBatch & | terminal (typename T::iterator it_begin, typename T::iterator it_end) |
EnergyMeterBatch & | action (int32_t value) |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More... | |
EnergyMeterBatch & | action (EnergyMeter::EnergyMeterAction value) |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More... | |
EnergyMeterBatch & | action (const string &value) |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More... | |
EnergyMeterBatch & | action (const char *value) |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More... | |
std::vector< strings > | option () |
Enter a string ARRAY of any combination of the following. More... | |
EnergyMeterBatch & | option (strings &value) |
BatchFloat64ArrayProxy | kVAnormal () |
Upper limit on kVA load in the zone, Normal configuration. More... | |
EnergyMeterBatch & | kVAnormal (double value) |
template<typename T > | |
EnergyMeterBatch & | kVAnormal (T &value) |
template<typename T > | |
EnergyMeterBatch & | kVAnormal (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | kVAemerg () |
Upper limit on kVA load in the zone, Emergency configuration. More... | |
EnergyMeterBatch & | kVAemerg (double value) |
template<typename T > | |
EnergyMeterBatch & | kVAemerg (T &value) |
template<typename T > | |
EnergyMeterBatch & | kVAemerg (typename T::iterator it_begin, typename T::iterator it_end) |
std::vector< VectorXd > | peakcurrent () |
ARRAY of current magnitudes representing the peak currents measured at this location for the load allocation function. More... | |
EnergyMeterBatch & | peakcurrent (VectorXd &value) |
std::vector< strings > | Zonelist () |
ARRAY of full element names for this meter's zone. More... | |
EnergyMeterBatch & | Zonelist (strings &value) |
bools | LocalOnly () |
{Yes | No} Default is NO. More... | |
EnergyMeterBatch & | LocalOnly (bool value) |
EnergyMeterBatch & | LocalOnly (bools &value) |
std::vector< VectorXd > | Mask () |
Mask for adding registers whenever all meters are totalized. More... | |
EnergyMeterBatch & | Mask (VectorXd &value) |
bools | Losses () |
{Yes | No} Default is YES. More... | |
EnergyMeterBatch & | Losses (bool value) |
EnergyMeterBatch & | Losses (bools &value) |
bools | LineLosses () |
{Yes | No} Default is YES. More... | |
EnergyMeterBatch & | LineLosses (bool value) |
EnergyMeterBatch & | LineLosses (bools &value) |
bools | XfmrLosses () |
{Yes | No} Default is YES. More... | |
EnergyMeterBatch & | XfmrLosses (bool value) |
EnergyMeterBatch & | XfmrLosses (bools &value) |
bools | SeqLosses () |
{Yes | No} Default is YES. More... | |
EnergyMeterBatch & | SeqLosses (bool value) |
EnergyMeterBatch & | SeqLosses (bools &value) |
bools | threePaseLosses () |
{Yes | No} Default is YES. More... | |
EnergyMeterBatch & | threePaseLosses (bool value) |
EnergyMeterBatch & | threePaseLosses (bools &value) |
bools | VbaseLosses () |
{Yes | No} Default is YES. More... | |
EnergyMeterBatch & | VbaseLosses (bool value) |
EnergyMeterBatch & | VbaseLosses (bools &value) |
bools | PhaseVoltageReport () |
{Yes | No} Default is NO. More... | |
EnergyMeterBatch & | PhaseVoltageReport (bool value) |
EnergyMeterBatch & | PhaseVoltageReport (bools &value) |
BatchFloat64ArrayProxy | Int_Rate () |
Average number of annual interruptions for head of the meter zone (source side of zone or feeder). More... | |
EnergyMeterBatch & | Int_Rate (double value) |
template<typename T > | |
EnergyMeterBatch & | Int_Rate (T &value) |
template<typename T > | |
EnergyMeterBatch & | Int_Rate (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | Int_Duration () |
Average annual duration, in hr, of interruptions for head of the meter zone (source side of zone or feeder). More... | |
EnergyMeterBatch & | Int_Duration (double value) |
template<typename T > | |
EnergyMeterBatch & | Int_Duration (T &value) |
template<typename T > | |
EnergyMeterBatch & | Int_Duration (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | SAIFI () |
(Read only) Makes SAIFI result available via return on query (? energymeter.myMeter.SAIFI. More... | |
EnergyMeterBatch & | SAIFI (double value) |
template<typename T > | |
EnergyMeterBatch & | SAIFI (T &value) |
template<typename T > | |
EnergyMeterBatch & | SAIFI (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | SAIFIkW () |
(Read only) Makes SAIFIkW result available via return on query (? energymeter.myMeter.SAIFIkW. More... | |
EnergyMeterBatch & | SAIFIkW (double value) |
template<typename T > | |
EnergyMeterBatch & | SAIFIkW (T &value) |
template<typename T > | |
EnergyMeterBatch & | SAIFIkW (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | SAIDI () |
(Read only) Makes SAIDI result available via return on query (? energymeter.myMeter.SAIDI. More... | |
EnergyMeterBatch & | SAIDI (double value) |
template<typename T > | |
EnergyMeterBatch & | SAIDI (T &value) |
template<typename T > | |
EnergyMeterBatch & | SAIDI (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | CAIDI () |
(Read only) Makes CAIDI result available via return on query (? energymeter.myMeter.CAIDI. More... | |
EnergyMeterBatch & | CAIDI (double value) |
template<typename T > | |
EnergyMeterBatch & | CAIDI (T &value) |
template<typename T > | |
EnergyMeterBatch & | CAIDI (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | CustInterrupts () |
(Read only) Makes Total Customer Interrupts value result available via return on query (? energymeter.myMeter.CustInterrupts. More... | |
EnergyMeterBatch & | CustInterrupts (double value) |
template<typename T > | |
EnergyMeterBatch & | CustInterrupts (T &value) |
template<typename T > | |
EnergyMeterBatch & | CustInterrupts (typename T::iterator it_begin, typename T::iterator it_end) |
BatchFloat64ArrayProxy | basefreq () |
Base Frequency for ratings. More... | |
EnergyMeterBatch & | basefreq (double value) |
template<typename T > | |
EnergyMeterBatch & | basefreq (T &value) |
template<typename T > | |
EnergyMeterBatch & | 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... | |
EnergyMeterBatch & | enabled (bool value) |
EnergyMeterBatch & | enabled (bools &value) |
EnergyMeterBatch & | like (const string &value) |
Make like another object, e.g. More... | |
EnergyMeterBatch & | 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 |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce}
(A)llocate = Allocate loads on the meter zone to match PeakCurrent. (C)lear = reset all registers to zero (R)educe = reduces zone by merging lines (see Set Keeplist & ReduceOption) (S)ave = saves the current register values to a file. File name is "MTR_metername.CSV". (T)ake = Takes a sample at present solution (Z)onedump = Dump names of elements in meter zone to a file File name is "Zone_metername.CSV".
DSS property name: action, DSS property index: 3
|
inline |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce}
(A)llocate = Allocate loads on the meter zone to match PeakCurrent. (C)lear = reset all registers to zero (R)educe = reduces zone by merging lines (see Set Keeplist & ReduceOption) (S)ave = saves the current register values to a file. File name is "MTR_metername.CSV". (T)ake = Takes a sample at present solution (Z)onedump = Dump names of elements in meter zone to a file File name is "Zone_metername.CSV".
DSS property name: action, DSS property index: 3
|
inline |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce}
(A)llocate = Allocate loads on the meter zone to match PeakCurrent. (C)lear = reset all registers to zero (R)educe = reduces zone by merging lines (see Set Keeplist & ReduceOption) (S)ave = saves the current register values to a file. File name is "MTR_metername.CSV". (T)ake = Takes a sample at present solution (Z)onedump = Dump names of elements in meter zone to a file File name is "Zone_metername.CSV".
DSS property name: action, DSS property index: 3
|
inline |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce}
(A)llocate = Allocate loads on the meter zone to match PeakCurrent. (C)lear = reset all registers to zero (R)educe = reduces zone by merging lines (see Set Keeplist & ReduceOption) (S)ave = saves the current register values to a file. File name is "MTR_metername.CSV". (T)ake = Takes a sample at present solution (Z)onedump = Dump names of elements in meter zone to a file File name is "Zone_metername.CSV".
DSS property name: action, DSS property index: 3
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 25
|
inline |
(Read only) Makes CAIDI result available via return on query (? energymeter.myMeter.CAIDI.
DSS property name: CAIDI, DSS property index: 23
|
inline |
(Read only) Makes Total Customer Interrupts value result available via return on query (? energymeter.myMeter.CustInterrupts.
DSS property name: CustInterrupts, DSS property index: 24
|
inline |
Name (Full Object name) of element to which the monitor is connected.
DSS property name: element, DSS property index: 1
|
inline |
Name (Full Object name) of element to which the monitor is connected.
DSS property name: element, DSS property index: 1
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 26
|
inline |
Average annual duration, in hr, of interruptions for head of the meter zone (source side of zone or feeder).
DSS property name: Int_Duration, DSS property index: 19
|
inline |
Average number of annual interruptions for head of the meter zone (source side of zone or feeder).
DSS property name: Int_Rate, DSS property index: 18
|
inline |
Upper limit on kVA load in the zone, Emergency configuration.
Default is 0.0 (ignored). Overrides limits on individual lines for overload UE. With "LocalOnly=Yes" option, uses only load in metered branch.
DSS property name: kVAemerg, DSS property index: 6
|
inline |
Upper limit on kVA load in the zone, Normal configuration.
Default is 0.0 (ignored). Overrides limits on individual lines for overload EEN. With "LocalOnly=Yes" option, uses only load in metered branch.
DSS property name: kVAnormal, DSS property index: 5
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 27
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 27
|
inline |
{Yes | No} Default is YES.
Compute Line losses. If NO, then none of the losses are computed.
DSS property name: LineLosses, DSS property index: 12
|
inline |
{Yes | No} Default is NO.
If Yes, meter considers only the monitored element for EEN and UE calcs. Uses whole zone for losses.
DSS property name: LocalOnly, DSS property index: 9
|
inline |
{Yes | No} Default is YES.
Compute Zone losses. If NO, then no losses at all are computed.
DSS property name: Losses, DSS property index: 11
|
inline |
Mask for adding registers whenever all meters are totalized.
Array of floating point numbers representing the multiplier to be used for summing each register from this meter. Default = (1, 1, 1, 1, ... ). You only have to enter as many as are changed (positional). Useful when two meters monitor same energy, etc.
DSS property name: Mask, DSS property index: 10
|
inline |
Enter a string ARRAY of any combination of the following.
Options processed left-to-right:
(E)xcess : (default) UE/EEN is estimate of energy over capacity (T)otal : UE/EEN is total energy after capacity exceeded (R)adial : (default) Treats zone as a radial circuit (M)esh : Treats zone as meshed network (not radial). (C)ombined : (default) Load UE/EEN computed from combination of overload and undervoltage. (V)oltage : Load UE/EEN computed based on voltage only.
Example: option=(E, R)
DSS property name: option, DSS property index: 4
|
inline |
ARRAY of current magnitudes representing the peak currents measured at this location for the load allocation function.
Default is (400, 400, 400). Enter one current for each phase
DSS property name: peakcurrent, DSS property index: 7
|
inline |
{Yes | No} Default is NO.
Report min, max, and average phase voltages for the zone and tabulate by voltage base. Demand Intervals must be turned on (Set Demand=true) and voltage bases must be defined for this property to take effect. Result is in a separate report file.
DSS property name: PhaseVoltageReport, DSS property index: 17
|
inline |
(Read only) Makes SAIDI result available via return on query (? energymeter.myMeter.SAIDI.
DSS property name: SAIDI, DSS property index: 22
|
inline |
(Read only) Makes SAIFI result available via return on query (? energymeter.myMeter.SAIFI.
DSS property name: SAIFI, DSS property index: 20
|
inline |
(Read only) Makes SAIFIkW result available via return on query (? energymeter.myMeter.SAIFIkW.
DSS property name: SAIFIkW, DSS property index: 21
|
inline |
{Yes | No} Default is YES.
Compute Sequence losses in lines and segregate by line mode losses and zero mode losses.
DSS property name: SeqLosses, DSS property index: 14
|
inline |
Number of the terminal of the circuit element to which the monitor is connected.
1 or 2, typically.
DSS property name: terminal, DSS property index: 2
|
inline |
{Yes | No} Default is YES.
Compute Line losses and segregate by 3-phase and other (1- and 2-phase) line losses.
DSS property name: 3phaseLosses, DSS property index: 15
|
inline |
{Yes | No} Default is YES.
Compute losses and segregate by voltage base. If NO, then voltage-based tabulation is not reported.
DSS property name: VbaseLosses, DSS property index: 16
|
inline |
{Yes | No} Default is YES.
Compute Transformer losses. If NO, transformers are ignored in loss calculations.
DSS property name: XfmrLosses, DSS property index: 13
|
inline |
ARRAY of full element names for this meter's zone.
Default is for meter to find it's own zone. If specified, DSS uses this list instead. Can access the names in a single-column text file. Examples:
zonelist=[line.L1, transformer.T1, Line.L3] zonelist=(file=branchlist.txt)
DSS property name: Zonelist, DSS property index: 8