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

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.
 
LoadShapebegin_edit ()
 Marks an object for edition. More...
 
LoadShapeend_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...
 
LoadShapenpts (int32_t value)
 
double interval ()
 Time interval for fixed interval data, hrs. More...
 
LoadShapeinterval (double value)
 
VectorXd mult ()
 Array of multiplier values for active power (P) or other key value (such as pu V for Vsource). More...
 
LoadShapemult (VectorXd &value)
 
VectorXd hour ()
 Array of hour values. More...
 
LoadShapehour (VectorXd &value)
 
double mean ()
 Mean of the active power multipliers. More...
 
LoadShapemean (double value)
 
double stddev ()
 Standard deviation of active power multipliers. More...
 
LoadShapestddev (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...
 
LoadShapecsvfile (const string &value)
 
LoadShapecsvfile (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...
 
LoadShapesngfile (const string &value)
 
LoadShapesngfile (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...
 
LoadShapedblfile (const string &value)
 
LoadShapedblfile (const char *value)
 
LoadShapeaction (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...
 
LoadShapeaction (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...
 
LoadShapeaction (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...
 
LoadShapeaction (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...
 
LoadShapeqmult (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...
 
LoadShapeUseActual (bool value)
 
double Pmax ()
 kW value at the time of max power. More...
 
LoadShapePmax (double value)
 
double Qmax ()
 kvar value at the time of max kW power. More...
 
LoadShapeQmax (double value)
 
double sinterval ()
 Specify fixed interval in SECONDS. More...
 
LoadShapesinterval (double value)
 
double minterval ()
 Specify fixed interval in MINUTES. More...
 
LoadShapeminterval (double value)
 
double Pbase ()
 Base P value for normalization. More...
 
LoadShapePbase (double value)
 
double Qbase ()
 Base Q value for normalization. More...
 
LoadShapeQbase (double value)
 
VectorXd Pmult ()
 Synonym for "mult". More...
 
LoadShapePmult (VectorXd &value)
 
string PQCSVFile ()
 Switch input to a CSV text file containing (active, reactive) power (P, Q) multiplier pairs, one per row. More...
 
LoadShapePQCSVFile (const string &value)
 
LoadShapePQCSVFile (const char *value)
 
bool MemoryMapping ()
 {Yes | No* | True | False*} Enables the memory mapping functionality for dealing with large amounts of load shapes. More...
 
LoadShapeMemoryMapping (bool value)
 
LoadShapelike (const string &value)
 Make like another object, e.g. More...
 
LoadShapelike (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
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

◆ LoadShapeAction

enum class dss::obj::LoadShape::LoadShapeAction : int32_t
strong

LoadShape: Action (DSS enumeration for LoadShape)

Enumerator
Normalize 

Normalize.

DblSave 

DblSave.

SngSave 

SngSave.

Member Function Documentation

◆ action() [1/4]

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

◆ action() [2/4]

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

◆ action() [3/4]

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

◆ action() [4/4]

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

◆ begin_edit()

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

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ csvfile()

string dss::obj::LoadShape::csvfile ( )
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

◆ dblfile()

string dss::obj::LoadShape::dblfile ( )
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

◆ end_edit()

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

◆ hour()

VectorXd dss::obj::LoadShape::hour ( )
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

◆ interval()

double dss::obj::LoadShape::interval ( )
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

◆ like() [1/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 22

◆ like() [2/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 22

◆ mean()

double dss::obj::LoadShape::mean ( )
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

◆ MemoryMapping()

bool dss::obj::LoadShape::MemoryMapping ( )
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

◆ minterval()

double dss::obj::LoadShape::minterval ( )
inline

Specify fixed interval in MINUTES.

Alternate way to specify Interval property.

DSS property name: minterval, DSS property index: 16

◆ mult()

VectorXd dss::obj::LoadShape::mult ( )
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

◆ npts()

int32_t dss::obj::LoadShape::npts ( )
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

◆ Pbase()

double dss::obj::LoadShape::Pbase ( )
inline

Base P value for normalization.

Default is zero, meaning the peak will be used.

DSS property name: Pbase, DSS property index: 17

◆ Pmax()

double dss::obj::LoadShape::Pmax ( )
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

◆ Pmult()

VectorXd dss::obj::LoadShape::Pmult ( )
inline

Synonym for "mult".

DSS property name: Pmult, DSS property index: 19

◆ PQCSVFile()

string dss::obj::LoadShape::PQCSVFile ( )
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

◆ Qbase()

double dss::obj::LoadShape::Qbase ( )
inline

Base Q value for normalization.

Default is zero, meaning the peak will be used.

DSS property name: Qbase, DSS property index: 18

◆ Qmax()

double dss::obj::LoadShape::Qmax ( )
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

◆ qmult()

VectorXd dss::obj::LoadShape::qmult ( )
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

◆ sinterval()

double dss::obj::LoadShape::sinterval ( )
inline

Specify fixed interval in SECONDS.

Alternate way to specify Interval property.

DSS property name: sinterval, DSS property index: 15

◆ sngfile()

string dss::obj::LoadShape::sngfile ( )
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

◆ stddev()

double dss::obj::LoadShape::stddev ( )
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

◆ UseActual()

bool dss::obj::LoadShape::UseActual ( )
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


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