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 Monitor::Properties | Properties |
typedef Monitor | BatchElementClass |
typedef Monitor::MonitorAction | MonitorAction |
Public Member Functions | |
MonitorBatch (APIUtil *util) | |
Create a batch of all Monitor elements. | |
MonitorBatch (APIUtil *util, int32_t prop_idx, int32_t prop_value) | |
Create a batch of all Monitor elements that match an integer property value. | |
MonitorBatch (APIUtil *util, const char *regexp) | |
Create a batch of all Monitor elements that match a regular expression. | |
MonitorBatch & | begin_edit () |
MonitorBatch & | end_edit (int32_t num_edits=1) |
strings | element () |
Name (Full Object name) of element to which the monitor is connected. More... | |
MonitorBatch & | element (dss::obj::DSSObj &value) |
MonitorBatch & | element (const string &value) |
std::vector< dss::obj::DSSObj > | element_obj () |
Name (Full Object name) of element to which the monitor is connected. More... | |
MonitorBatch & | element_obj (dss::obj::DSSObj &value) |
BatchInt32ArrayProxy | terminal () |
Number of the terminal of the circuit element to which the monitor is connected. More... | |
MonitorBatch & | terminal (int32_t value) |
template<typename T > | |
MonitorBatch & | terminal (T &value) |
template<typename T > | |
MonitorBatch & | terminal (typename T::iterator it_begin, typename T::iterator it_end) |
BatchInt32ArrayProxy | mode () |
Bitmask integer designating the values the monitor is to capture: 0 = Voltages and currents at designated terminal 1 = Powers at designated terminal 2 = Tap Position (Transformer Device only) 3 = State Variables (PCElements only) 4 = Flicker level and severity index (Pst) for voltages. More... | |
MonitorBatch & | mode (int32_t value) |
template<typename T > | |
MonitorBatch & | mode (T &value) |
template<typename T > | |
MonitorBatch & | mode (typename T::iterator it_begin, typename T::iterator it_end) |
MonitorBatch & | action (int32_t value) |
{Clear | Save | Take | Process} (C)lears or (S)aves current buffer. More... | |
MonitorBatch & | action (Monitor::MonitorAction value) |
{Clear | Save | Take | Process} (C)lears or (S)aves current buffer. More... | |
MonitorBatch & | action (const string &value) |
{Clear | Save | Take | Process} (C)lears or (S)aves current buffer. More... | |
MonitorBatch & | action (const char *value) |
{Clear | Save | Take | Process} (C)lears or (S)aves current buffer. More... | |
bools | residual () |
{Yes/True | No/False} Default = No. More... | |
MonitorBatch & | residual (bool value) |
MonitorBatch & | residual (bools &value) |
bools | VIPolar () |
{Yes/True | No/False} Default = YES. More... | |
MonitorBatch & | VIPolar (bool value) |
MonitorBatch & | VIPolar (bools &value) |
bools | PPolar () |
{Yes/True | No/False} Default = YES. More... | |
MonitorBatch & | PPolar (bool value) |
MonitorBatch & | PPolar (bools &value) |
BatchFloat64ArrayProxy | basefreq () |
Base Frequency for ratings. More... | |
MonitorBatch & | basefreq (double value) |
template<typename T > | |
MonitorBatch & | basefreq (T &value) |
template<typename T > | |
MonitorBatch & | 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... | |
MonitorBatch & | enabled (bool value) |
MonitorBatch & | enabled (bools &value) |
MonitorBatch & | like (const string &value) |
Make like another object, e.g. More... | |
MonitorBatch & | 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 | Save | Take | Process} (C)lears or (S)aves current buffer.
(T)ake action takes a sample. (P)rocesses the data taken so far (e.g. Pst for mode 4).
Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action.
DSS property name: action, DSS property index: 4
|
inline |
{Clear | Save | Take | Process} (C)lears or (S)aves current buffer.
(T)ake action takes a sample. (P)rocesses the data taken so far (e.g. Pst for mode 4).
Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action.
DSS property name: action, DSS property index: 4
|
inline |
{Clear | Save | Take | Process} (C)lears or (S)aves current buffer.
(T)ake action takes a sample. (P)rocesses the data taken so far (e.g. Pst for mode 4).
Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action.
DSS property name: action, DSS property index: 4
|
inline |
{Clear | Save | Take | Process} (C)lears or (S)aves current buffer.
(T)ake action takes a sample. (P)rocesses the data taken so far (e.g. Pst for mode 4).
Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action.
DSS property name: action, DSS property index: 4
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 8
|
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: 9
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 10
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 10
|
inline |
Bitmask integer designating the values the monitor is to capture: 0 = Voltages and currents at designated terminal 1 = Powers at designated terminal 2 = Tap Position (Transformer Device only) 3 = State Variables (PCElements only) 4 = Flicker level and severity index (Pst) for voltages.
No adders apply. Flicker level at simulation time step, Pst at 10-minute time step. 5 = Solution variables (Iterations, etc). Normally, these would be actual phasor quantities from solution. 6 = Capacitor Switching (Capacitors only) 7 = Storage state vars (Storage device only) 8 = All winding currents (Transformer device only) 9 = Losses, watts and var (of monitored device) 10 = All Winding voltages (Transformer device only) Normally, these would be actual phasor quantities from solution. 11 = All terminal node voltages and line currents of monitored device 12 = All terminal node voltages LL and line currents of monitored device Combine mode with adders below to achieve other results for terminal quantities: +16 = Sequence quantities +32 = Magnitude only +64 = Positive sequence only or avg of all phases
Mix adder to obtain desired results. For example: Mode=112 will save positive sequence voltage and current magnitudes only Mode=48 will save all sequence voltages and currents, but magnitude only.
DSS property name: mode, DSS property index: 3
|
inline |
{Yes/True | No/False} Default = YES.
Report power in Apparent power, S, in polar form (Mag/Angle).(default) Otherwise, is P and Q
DSS property name: PPolar, DSS property index: 7
|
inline |
{Yes/True | No/False} Default = No.
Include Residual cbannel (sum of all phases) for voltage and current. Does not apply to sequence quantity modes or power modes.
DSS property name: residual, DSS property index: 5
|
inline |
Number of the terminal of the circuit element to which the monitor is connected.
1 or 2, typically. For monitoring states, attach monitor to terminal 1.
DSS property name: terminal, DSS property index: 2
|
inline |
{Yes/True | No/False} Default = YES.
Report voltage and current in polar form (Mag/Angle). (default) Otherwise, it will be real and imaginary.
DSS property name: VIPolar, DSS property index: 6