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 | LoadShapeAction : int32_t { Normalize = 0 , DblSave = 1 , SngSave = 2 } |
LoadShape: Action (DSS enumeration for LoadShape) More... | |
Public Member Functions | |
LoadShape (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
LoadShape (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
LoadShape (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
LoadShape & | begin_edit () |
Marks an object for edition. More... | |
LoadShape & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
int32_t | npts () |
Max number of points to expect in load shape vectors. More... | |
LoadShape & | npts (int32_t value) |
double | interval () |
Time interval for fixed interval data, hrs. More... | |
LoadShape & | interval (double value) |
VectorXd | mult () |
Array of multiplier values for active power (P) or other key value (such as pu V for Vsource). More... | |
LoadShape & | mult (VectorXd &value) |
VectorXd | hour () |
Array of hour values. More... | |
LoadShape & | hour (VectorXd &value) |
double | mean () |
Mean of the active power multipliers. More... | |
LoadShape & | mean (double value) |
double | stddev () |
Standard deviation of active power multipliers. More... | |
LoadShape & | stddev (double value) |
string | csvfile () |
Switch input of active power load curve data to a CSV text file containing (hour, mult) points, or simply (mult) values for fixed time interval data, one per line. More... | |
LoadShape & | csvfile (const string &value) |
LoadShape & | csvfile (const char *value) |
string | sngfile () |
Switch input of active power load curve data to a binary file of singles containing (hour, mult) points, or simply (mult) values for fixed time interval data, packed one after another. More... | |
LoadShape & | sngfile (const string &value) |
LoadShape & | sngfile (const char *value) |
string | dblfile () |
Switch input of active power load curve data to a binary file of doubles containing (hour, mult) points, or simply (mult) values for fixed time interval data, packed one after another. More... | |
LoadShape & | dblfile (const string &value) |
LoadShape & | dblfile (const char *value) |
LoadShape & | action (int32_t value) |
{NORMALIZE | DblSave | SngSave} After defining load curve data, setting action=normalize will modify the multipliers so that the peak is 1.0. More... | |
LoadShape & | action (LoadShapeAction value) |
{NORMALIZE | DblSave | SngSave} After defining load curve data, setting action=normalize will modify the multipliers so that the peak is 1.0. More... | |
LoadShape & | action (const string &value) |
{NORMALIZE | DblSave | SngSave} After defining load curve data, setting action=normalize will modify the multipliers so that the peak is 1.0. More... | |
LoadShape & | action (const char *value) |
{NORMALIZE | DblSave | SngSave} After defining load curve data, setting action=normalize will modify the multipliers so that the peak is 1.0. More... | |
VectorXd | qmult () |
Array of multiplier values for reactive power (Q). More... | |
LoadShape & | qmult (VectorXd &value) |
bool | UseActual () |
{Yes | No* | True | False*} If true, signifies to Load, Generator, Vsource, or other objects to use the return value as the actual kW, kvar, kV, or other value rather than a multiplier. More... | |
LoadShape & | UseActual (bool value) |
double | Pmax () |
kW value at the time of max power. More... | |
LoadShape & | Pmax (double value) |
double | Qmax () |
kvar value at the time of max kW power. More... | |
LoadShape & | Qmax (double value) |
double | sinterval () |
Specify fixed interval in SECONDS. More... | |
LoadShape & | sinterval (double value) |
double | minterval () |
Specify fixed interval in MINUTES. More... | |
LoadShape & | minterval (double value) |
double | Pbase () |
Base P value for normalization. More... | |
LoadShape & | Pbase (double value) |
double | Qbase () |
Base Q value for normalization. More... | |
LoadShape & | Qbase (double value) |
VectorXd | Pmult () |
Synonym for "mult". More... | |
LoadShape & | Pmult (VectorXd &value) |
string | PQCSVFile () |
Switch input to a CSV text file containing (active, reactive) power (P, Q) multiplier pairs, one per row. More... | |
LoadShape & | PQCSVFile (const string &value) |
LoadShape & | PQCSVFile (const char *value) |
bool | MemoryMapping () |
{Yes | No* | True | False*} Enables the memory mapping functionality for dealing with large amounts of load shapes. More... | |
LoadShape & | MemoryMapping (bool value) |
LoadShape & | like (const string &value) |
Make like another object, e.g. More... | |
LoadShape & | 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 [] = "LoadShape" |
static const int32_t | dss_cls_idx = 2 |
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 |
|
inline |
{NORMALIZE | DblSave | SngSave} After defining load curve data, setting action=normalize will modify the multipliers so that the peak is 1.0.
The mean and std deviation are recomputed.
Setting action=DblSave or SngSave will cause the present mult and qmult values to be written to either a packed file of double or single. The filename is the loadshape name. The mult array will have a "_P" appended on the file name and the qmult array, if it exists, will have "_Q" appended.
DSS property name: action, DSS property index: 10
|
inline |
{NORMALIZE | DblSave | SngSave} After defining load curve data, setting action=normalize will modify the multipliers so that the peak is 1.0.
The mean and std deviation are recomputed.
Setting action=DblSave or SngSave will cause the present mult and qmult values to be written to either a packed file of double or single. The filename is the loadshape name. The mult array will have a "_P" appended on the file name and the qmult array, if it exists, will have "_Q" appended.
DSS property name: action, DSS property index: 10
|
inline |
{NORMALIZE | DblSave | SngSave} After defining load curve data, setting action=normalize will modify the multipliers so that the peak is 1.0.
The mean and std deviation are recomputed.
Setting action=DblSave or SngSave will cause the present mult and qmult values to be written to either a packed file of double or single. The filename is the loadshape name. The mult array will have a "_P" appended on the file name and the qmult array, if it exists, will have "_Q" appended.
DSS property name: action, DSS property index: 10
|
inline |
{NORMALIZE | DblSave | SngSave} After defining load curve data, setting action=normalize will modify the multipliers so that the peak is 1.0.
The mean and std deviation are recomputed.
Setting action=DblSave or SngSave will cause the present mult and qmult values to be written to either a packed file of double or single. The filename is the loadshape name. The mult array will have a "_P" appended on the file name and the qmult array, if it exists, will have "_Q" appended.
DSS property name: action, DSS property index: 10
|
inline |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
inline |
Switch input of active power load curve data to a CSV text file containing (hour, mult) points, or simply (mult) values for fixed time interval data, one per line.
NOTE: This action may reset the number of points to a lower value.
DSS property name: csvfile, DSS property index: 7
|
inline |
Switch input of active power load curve data to a binary file of doubles containing (hour, mult) points, or simply (mult) values for fixed time interval data, packed one after another.
NOTE: This action may reset the number of points to a lower value.
DSS property name: dblfile, DSS property index: 9
|
inline |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
inline |
Array of hour values.
Only necessary to define for variable interval data (Interval=0). If you set Interval>0 to denote fixed interval data, DO NOT USE THIS PROPERTY. You can also use the syntax: hour = (file=filename) !for text file one value per line hour = (dblfile=filename) !for packed file of doubles hour = (sngfile=filename) !for packed file of singles
DSS property name: hour, DSS property index: 4
|
inline |
Time interval for fixed interval data, hrs.
Default = 1. If Interval = 0 then time data (in hours) may be at either regular or irregular intervals and time value must be specified using either the Hour property or input files. Then values are interpolated when Interval=0, but not for fixed interval data.
See also "sinterval" and "minterval".
DSS property name: interval, DSS property index: 2
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 22
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 22
|
inline |
Mean of the active power multipliers.
This is computed on demand the first time a value is needed. However, you may set it to another value independently. Used for Monte Carlo load simulations.
DSS property name: mean, DSS property index: 5
|
inline |
{Yes | No* | True | False*} Enables the memory mapping functionality for dealing with large amounts of load shapes.
By defaul is False. Use it to accelerate the model loading when the containing a large number of load shapes.
DSS property name: MemoryMapping, DSS property index: 21
|
inline |
Specify fixed interval in MINUTES.
Alternate way to specify Interval property.
DSS property name: minterval, DSS property index: 16
|
inline |
Array of multiplier values for active power (P) or other key value (such as pu V for Vsource).
You can also use the syntax:
mult = (file=filename) !for text file one value per line mult = (dblfile=filename) !for packed file of doubles mult = (sngfile=filename) !for packed file of singles mult = (file=MyCSVFile.CSV, col=3, header=yes) !for multicolumn CSV files
Note: this property will reset Npts if the number of values in the files are fewer.
Same as Pmult
DSS property name: mult, DSS property index: 3
|
inline |
Max number of points to expect in load shape vectors.
This gets reset to the number of multiplier values found (in files only) if less than specified.
DSS property name: npts, DSS property index: 1
|
inline |
Base P value for normalization.
Default is zero, meaning the peak will be used.
DSS property name: Pbase, DSS property index: 17
|
inline |
kW value at the time of max power.
Is automatically set upon reading in a loadshape. Use this property to override the value automatically computed or to retrieve the value computed.
DSS property name: Pmax, DSS property index: 13
|
inline |
Synonym for "mult".
DSS property name: Pmult, DSS property index: 19
|
inline |
Switch input to a CSV text file containing (active, reactive) power (P, Q) multiplier pairs, one per row.
If the interval=0, there should be 3 items on each line: (hour, Pmult, Qmult)
DSS property name: PQCSVFile, DSS property index: 20
|
inline |
Base Q value for normalization.
Default is zero, meaning the peak will be used.
DSS property name: Qbase, DSS property index: 18
|
inline |
kvar value at the time of max kW power.
Is automatically set upon reading in a loadshape. Use this property to override the value automatically computed or to retrieve the value computed.
DSS property name: Qmax, DSS property index: 14
|
inline |
Array of multiplier values for reactive power (Q).
You can also use the syntax: qmult = (file=filename) !for text file one value per line qmult = (dblfile=filename) !for packed file of doubles qmult = (sngfile=filename) !for packed file of singles qmult = (file=MyCSVFile.CSV, col=4, header=yes) !for multicolumn CSV files
DSS property name: qmult, DSS property index: 11
|
inline |
Specify fixed interval in SECONDS.
Alternate way to specify Interval property.
DSS property name: sinterval, DSS property index: 15
|
inline |
Switch input of active power load curve data to a binary file of singles containing (hour, mult) points, or simply (mult) values for fixed time interval data, packed one after another.
NOTE: This action may reset the number of points to a lower value.
DSS property name: sngfile, DSS property index: 8
|
inline |
Standard deviation of active power multipliers.
This is computed on demand the first time a value is needed. However, you may set it to another value independently.Is overwritten if you subsequently read in a curve
Used for Monte Carlo load simulations.
DSS property name: stddev, DSS property index: 6
|
inline |
{Yes | No* | True | False*} If true, signifies to Load, Generator, Vsource, or other objects to use the return value as the actual kW, kvar, kV, or other value rather than a multiplier.
Nominally for AMI Load data but may be used for other functions.
DSS property name: UseActual, DSS property index: 12