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

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.
 
EnergyMeterbegin_edit ()
 Marks an object for edition. More...
 
EnergyMeterend_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...
 
EnergyMeterelement (const string &value)
 
EnergyMeterelement (dss::obj::DSSObj &value)
 
dss::obj::DSSObj element_obj ()
 Name (Full Object name) of element to which the monitor is connected. More...
 
EnergyMeterelement_obj (dss::obj::DSSObj &value)
 
int32_t terminal ()
 Number of the terminal of the circuit element to which the monitor is connected. More...
 
EnergyMeterterminal (int32_t value)
 
EnergyMeteraction (int32_t value)
 {Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More...
 
EnergyMeteraction (EnergyMeterAction value)
 {Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More...
 
EnergyMeteraction (const string &value)
 {Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More...
 
EnergyMeteraction (const char *value)
 {Clear (reset) | Save | Take | Zonedump | Allocate | Reduce} More...
 
strings option ()
 Enter a string ARRAY of any combination of the following. More...
 
EnergyMeteroption (strings &value)
 
double kVAnormal ()
 Upper limit on kVA load in the zone, Normal configuration. More...
 
EnergyMeterkVAnormal (double value)
 
double kVAemerg ()
 Upper limit on kVA load in the zone, Emergency configuration. More...
 
EnergyMeterkVAemerg (double value)
 
VectorXd peakcurrent ()
 ARRAY of current magnitudes representing the peak currents measured at this location for the load allocation function. More...
 
EnergyMeterpeakcurrent (VectorXd &value)
 
strings Zonelist ()
 ARRAY of full element names for this meter's zone. More...
 
EnergyMeterZonelist (strings &value)
 
bool LocalOnly ()
 {Yes | No} Default is NO. More...
 
EnergyMeterLocalOnly (bool value)
 
VectorXd Mask ()
 Mask for adding registers whenever all meters are totalized. More...
 
EnergyMeterMask (VectorXd &value)
 
bool Losses ()
 {Yes | No} Default is YES. More...
 
EnergyMeterLosses (bool value)
 
bool LineLosses ()
 {Yes | No} Default is YES. More...
 
EnergyMeterLineLosses (bool value)
 
bool XfmrLosses ()
 {Yes | No} Default is YES. More...
 
EnergyMeterXfmrLosses (bool value)
 
bool SeqLosses ()
 {Yes | No} Default is YES. More...
 
EnergyMeterSeqLosses (bool value)
 
bool threePaseLosses ()
 {Yes | No} Default is YES. More...
 
EnergyMeterthreePaseLosses (bool value)
 
bool VbaseLosses ()
 {Yes | No} Default is YES. More...
 
EnergyMeterVbaseLosses (bool value)
 
bool PhaseVoltageReport ()
 {Yes | No} Default is NO. More...
 
EnergyMeterPhaseVoltageReport (bool value)
 
double Int_Rate ()
 Average number of annual interruptions for head of the meter zone (source side of zone or feeder). More...
 
EnergyMeterInt_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...
 
EnergyMeterInt_Duration (double value)
 
double SAIFI ()
 (Read only) Makes SAIFI result available via return on query (? energymeter.myMeter.SAIFI. More...
 
EnergyMeterSAIFI (double value)
 
double SAIFIkW ()
 (Read only) Makes SAIFIkW result available via return on query (? energymeter.myMeter.SAIFIkW. More...
 
EnergyMeterSAIFIkW (double value)
 
double SAIDI ()
 (Read only) Makes SAIDI result available via return on query (? energymeter.myMeter.SAIDI. More...
 
EnergyMeterSAIDI (double value)
 
double CAIDI ()
 (Read only) Makes CAIDI result available via return on query (? energymeter.myMeter.CAIDI. More...
 
EnergyMeterCAIDI (double value)
 
double CustInterrupts ()
 (Read only) Makes Total Customer Interrupts value result available via return on query (? energymeter.myMeter.CustInterrupts. More...
 
EnergyMeterCustInterrupts (double value)
 
double basefreq ()
 Base Frequency for ratings. More...
 
EnergyMeterbasefreq (double value)
 
bool enabled ()
 {Yes|No or True|False} Indicates whether this element is enabled. More...
 
EnergyMeterenabled (bool value)
 
EnergyMeterlike (const string &value)
 Make like another object, e.g. More...
 
EnergyMeterlike (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
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 Enumeration Documentation

◆ EnergyMeterAction

enum class dss::obj::EnergyMeter::EnergyMeterAction : int32_t
strong

EnergyMeter: Action (DSS enumeration for EnergyMeter)

Enumerator
Allocate 

Allocate.

Clear 

Clear.

Reduce 

Reduce.

Save 

Save.

Take 

Take.

ZoneDump 

ZoneDump.

Member Function Documentation

◆ action() [1/4]

EnergyMeter & dss::obj::EnergyMeter::action ( const char *  value)
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

◆ action() [2/4]

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

◆ action() [3/4]

EnergyMeter & dss::obj::EnergyMeter::action ( EnergyMeterAction  value)
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

◆ action() [4/4]

EnergyMeter & dss::obj::EnergyMeter::action ( int32_t  value)
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

◆ basefreq()

double dss::obj::EnergyMeter::basefreq ( )
inline

Base Frequency for ratings.

DSS property name: basefreq, DSS property index: 25

◆ begin_edit()

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

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ CAIDI()

double dss::obj::EnergyMeter::CAIDI ( )
inline

(Read only) Makes CAIDI result available via return on query (? energymeter.myMeter.CAIDI.

DSS property name: CAIDI, DSS property index: 23

◆ CustInterrupts()

double dss::obj::EnergyMeter::CustInterrupts ( )
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

◆ element()

string dss::obj::EnergyMeter::element ( )
inline

Name (Full Object name) of element to which the monitor is connected.

DSS property name: element, DSS property index: 1

◆ element_obj()

dss::obj::DSSObj dss::obj::EnergyMeter::element_obj ( )
inline

Name (Full Object name) of element to which the monitor is connected.

DSS property name: element, DSS property index: 1

◆ enabled()

bool dss::obj::EnergyMeter::enabled ( )
inline

{Yes|No or True|False} Indicates whether this element is enabled.

DSS property name: enabled, DSS property index: 26

◆ end_edit()

EnergyMeter & dss::obj::EnergyMeter::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.

◆ Int_Duration()

double dss::obj::EnergyMeter::Int_Duration ( )
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

◆ Int_Rate()

double dss::obj::EnergyMeter::Int_Rate ( )
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

◆ kVAemerg()

double dss::obj::EnergyMeter::kVAemerg ( )
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

◆ kVAnormal()

double dss::obj::EnergyMeter::kVAnormal ( )
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

◆ like() [1/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 27

◆ like() [2/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 27

◆ LineLosses()

bool dss::obj::EnergyMeter::LineLosses ( )
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

◆ LocalOnly()

bool dss::obj::EnergyMeter::LocalOnly ( )
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

◆ Losses()

bool dss::obj::EnergyMeter::Losses ( )
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

◆ Mask()

VectorXd dss::obj::EnergyMeter::Mask ( )
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

◆ option()

strings dss::obj::EnergyMeter::option ( )
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

◆ peakcurrent()

VectorXd dss::obj::EnergyMeter::peakcurrent ( )
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

◆ PhaseVoltageReport()

bool dss::obj::EnergyMeter::PhaseVoltageReport ( )
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

◆ SAIDI()

double dss::obj::EnergyMeter::SAIDI ( )
inline

(Read only) Makes SAIDI result available via return on query (? energymeter.myMeter.SAIDI.

DSS property name: SAIDI, DSS property index: 22

◆ SAIFI()

double dss::obj::EnergyMeter::SAIFI ( )
inline

(Read only) Makes SAIFI result available via return on query (? energymeter.myMeter.SAIFI.

DSS property name: SAIFI, DSS property index: 20

◆ SAIFIkW()

double dss::obj::EnergyMeter::SAIFIkW ( )
inline

(Read only) Makes SAIFIkW result available via return on query (? energymeter.myMeter.SAIFIkW.

DSS property name: SAIFIkW, DSS property index: 21

◆ SeqLosses()

bool dss::obj::EnergyMeter::SeqLosses ( )
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

◆ terminal()

int32_t dss::obj::EnergyMeter::terminal ( )
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

◆ threePaseLosses()

bool dss::obj::EnergyMeter::threePaseLosses ( )
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

◆ VbaseLosses()

bool dss::obj::EnergyMeter::VbaseLosses ( )
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

◆ XfmrLosses()

bool dss::obj::EnergyMeter::XfmrLosses ( )
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

◆ Zonelist()

strings dss::obj::EnergyMeter::Zonelist ( )
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


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