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 Types | |
enum class | EnergyMeterAction : int32_t { Allocate = 0 , Clear = 1 , Reduce = 2 , Save = 3 , Take = 4 , ZoneDump = 5 } |
EnergyMeter: Action (DSS enumeration for EnergyMeter) More... | |
Public Member Functions | |
EnergyMeter (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
EnergyMeter (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
EnergyMeter (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
EnergyMeter & | begin_edit () |
Marks an object for edition. More... | |
EnergyMeter & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
string | element () |
Name (Full Object name) of element to which the monitor is connected. More... | |
EnergyMeter & | element (const string &value) |
EnergyMeter & | element (dss::obj::DSSObj &value) |
dss::obj::DSSObj | element_obj () |
Name (Full Object name) of element to which the monitor is connected. More... | |
EnergyMeter & | element_obj (dss::obj::DSSObj &value) |
int32_t | terminal () |
Number of the terminal of the circuit element to which the monitor is connected. More... | |
EnergyMeter & | terminal (int32_t value) |
EnergyMeter & | action (int32_t value) |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More... | |
EnergyMeter & | action (EnergyMeterAction value) |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More... | |
EnergyMeter & | action (const string &value) |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More... | |
EnergyMeter & | action (const char *value) |
{Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More... | |
strings | option () |
Enter a string ARRAY of any combination of the following. More... | |
EnergyMeter & | option (strings &value) |
double | kVAnormal () |
Upper limit on kVA load in the zone, Normal configuration. More... | |
EnergyMeter & | kVAnormal (double value) |
double | kVAemerg () |
Upper limit on kVA load in the zone, Emergency configuration. More... | |
EnergyMeter & | kVAemerg (double value) |
VectorXd | peakcurrent () |
ARRAY of current magnitudes representing the peak currents measured at this location for the load allocation function. More... | |
EnergyMeter & | peakcurrent (VectorXd &value) |
strings | Zonelist () |
ARRAY of full element names for this meter's zone. More... | |
EnergyMeter & | Zonelist (strings &value) |
bool | LocalOnly () |
{Yes | No} Default is NO. More... | |
EnergyMeter & | LocalOnly (bool value) |
VectorXd | Mask () |
Mask for adding registers whenever all meters are totalized. More... | |
EnergyMeter & | Mask (VectorXd &value) |
bool | Losses () |
{Yes | No} Default is YES. More... | |
EnergyMeter & | Losses (bool value) |
bool | LineLosses () |
{Yes | No} Default is YES. More... | |
EnergyMeter & | LineLosses (bool value) |
bool | XfmrLosses () |
{Yes | No} Default is YES. More... | |
EnergyMeter & | XfmrLosses (bool value) |
bool | SeqLosses () |
{Yes | No} Default is YES. More... | |
EnergyMeter & | SeqLosses (bool value) |
bool | threePaseLosses () |
{Yes | No} Default is YES. More... | |
EnergyMeter & | threePaseLosses (bool value) |
bool | VbaseLosses () |
{Yes | No} Default is YES. More... | |
EnergyMeter & | VbaseLosses (bool value) |
bool | PhaseVoltageReport () |
{Yes | No} Default is NO. More... | |
EnergyMeter & | PhaseVoltageReport (bool value) |
double | Int_Rate () |
Average number of annual interruptions for head of the meter zone (source side of zone or feeder). More... | |
EnergyMeter & | Int_Rate (double value) |
double | Int_Duration () |
Average annual duration, in hr, of interruptions for head of the meter zone (source side of zone or feeder). More... | |
EnergyMeter & | Int_Duration (double value) |
double | SAIFI () |
(Read only) Makes SAIFI result available via return on query (? energymeter.myMeter.SAIFI. More... | |
EnergyMeter & | SAIFI (double value) |
double | SAIFIkW () |
(Read only) Makes SAIFIkW result available via return on query (? energymeter.myMeter.SAIFIkW. More... | |
EnergyMeter & | SAIFIkW (double value) |
double | SAIDI () |
(Read only) Makes SAIDI result available via return on query (? energymeter.myMeter.SAIDI. More... | |
EnergyMeter & | SAIDI (double value) |
double | CAIDI () |
(Read only) Makes CAIDI result available via return on query (? energymeter.myMeter.CAIDI. More... | |
EnergyMeter & | CAIDI (double value) |
double | CustInterrupts () |
(Read only) Makes Total Customer Interrupts value result available via return on query (? energymeter.myMeter.CustInterrupts. More... | |
EnergyMeter & | CustInterrupts (double value) |
double | basefreq () |
Base Frequency for ratings. More... | |
EnergyMeter & | basefreq (double value) |
bool | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
EnergyMeter & | enabled (bool value) |
EnergyMeter & | like (const string &value) |
Make like another object, e.g. More... | |
EnergyMeter & | 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 [] = "EnergyMeter" |
static const int32_t | dss_cls_idx = 47 |
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 |
|
strong |
EnergyMeter: Action (DSS enumeration for EnergyMeter)
Enumerator | |
---|---|
Allocate | Allocate. |
Clear | Clear. |
Reduce | Reduce. |
Save | Save. |
Take | Take. |
ZoneDump | ZoneDump. |
|
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 |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
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 |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
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