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

Public Types

typedef LoadShape::Properties Properties
 
typedef LoadShape BatchElementClass
 
typedef LoadShape::LoadShapeAction LoadShapeAction
 

Public Member Functions

 LoadShapeBatch (APIUtil *util)
 Create a batch of all LoadShape elements.
 
 LoadShapeBatch (APIUtil *util, int32_t prop_idx, int32_t prop_value)
 Create a batch of all LoadShape elements that match an integer property value.
 
 LoadShapeBatch (APIUtil *util, const char *regexp)
 Create a batch of all LoadShape elements that match a regular expression.
 
LoadShapeBatchbegin_edit ()
 
LoadShapeBatchend_edit (int32_t num_edits=1)
 
BatchInt32ArrayProxy npts ()
 Max number of points to expect in load shape vectors. More...
 
LoadShapeBatchnpts (int32_t value)
 
template<typename T >
LoadShapeBatchnpts (T &value)
 
template<typename T >
LoadShapeBatchnpts (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy interval ()
 Time interval for fixed interval data, hrs. More...
 
LoadShapeBatchinterval (double value)
 
template<typename T >
LoadShapeBatchinterval (T &value)
 
template<typename T >
LoadShapeBatchinterval (typename T::iterator it_begin, typename T::iterator it_end)
 
std::vector< VectorXd > mult ()
 Array of multiplier values for active power (P) or other key value (such as pu V for Vsource). More...
 
LoadShapeBatchmult (VectorXd &value)
 
std::vector< VectorXd > hour ()
 Array of hour values. More...
 
LoadShapeBatchhour (VectorXd &value)
 
BatchFloat64ArrayProxy mean ()
 Mean of the active power multipliers. More...
 
LoadShapeBatchmean (double value)
 
template<typename T >
LoadShapeBatchmean (T &value)
 
template<typename T >
LoadShapeBatchmean (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy stddev ()
 Standard deviation of active power multipliers. More...
 
LoadShapeBatchstddev (double value)
 
template<typename T >
LoadShapeBatchstddev (T &value)
 
template<typename T >
LoadShapeBatchstddev (typename T::iterator it_begin, typename T::iterator it_end)
 
strings 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...
 
LoadShapeBatchcsvfile (const string &value)
 
LoadShapeBatchcsvfile (strings &value)
 
strings 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...
 
LoadShapeBatchsngfile (const string &value)
 
LoadShapeBatchsngfile (strings &value)
 
strings 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...
 
LoadShapeBatchdblfile (const string &value)
 
LoadShapeBatchdblfile (strings &value)
 
LoadShapeBatchaction (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...
 
LoadShapeBatchaction (LoadShape::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...
 
LoadShapeBatchaction (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...
 
LoadShapeBatchaction (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...
 
std::vector< VectorXd > qmult ()
 Array of multiplier values for reactive power (Q). More...
 
LoadShapeBatchqmult (VectorXd &value)
 
bools 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...
 
LoadShapeBatchUseActual (bool value)
 
LoadShapeBatchUseActual (bools &value)
 
BatchFloat64ArrayProxy Pmax ()
 kW value at the time of max power. More...
 
LoadShapeBatchPmax (double value)
 
template<typename T >
LoadShapeBatchPmax (T &value)
 
template<typename T >
LoadShapeBatchPmax (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy Qmax ()
 kvar value at the time of max kW power. More...
 
LoadShapeBatchQmax (double value)
 
template<typename T >
LoadShapeBatchQmax (T &value)
 
template<typename T >
LoadShapeBatchQmax (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy sinterval ()
 Specify fixed interval in SECONDS. More...
 
LoadShapeBatchsinterval (double value)
 
template<typename T >
LoadShapeBatchsinterval (T &value)
 
template<typename T >
LoadShapeBatchsinterval (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy minterval ()
 Specify fixed interval in MINUTES. More...
 
LoadShapeBatchminterval (double value)
 
template<typename T >
LoadShapeBatchminterval (T &value)
 
template<typename T >
LoadShapeBatchminterval (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy Pbase ()
 Base P value for normalization. More...
 
LoadShapeBatchPbase (double value)
 
template<typename T >
LoadShapeBatchPbase (T &value)
 
template<typename T >
LoadShapeBatchPbase (typename T::iterator it_begin, typename T::iterator it_end)
 
BatchFloat64ArrayProxy Qbase ()
 Base Q value for normalization. More...
 
LoadShapeBatchQbase (double value)
 
template<typename T >
LoadShapeBatchQbase (T &value)
 
template<typename T >
LoadShapeBatchQbase (typename T::iterator it_begin, typename T::iterator it_end)
 
std::vector< VectorXd > Pmult ()
 Synonym for "mult". More...
 
LoadShapeBatchPmult (VectorXd &value)
 
strings PQCSVFile ()
 Switch input to a CSV text file containing (active, reactive) power (P, Q) multiplier pairs, one per row. More...
 
LoadShapeBatchPQCSVFile (const string &value)
 
LoadShapeBatchPQCSVFile (strings &value)
 
bools MemoryMapping ()
 {Yes | No* | True | False*} Enables the memory mapping functionality for dealing with large amounts of load shapes. More...
 
LoadShapeBatchMemoryMapping (bool value)
 
LoadShapeBatchMemoryMapping (bools &value)
 
LoadShapeBatchlike (const string &value)
 Make like another object, e.g. More...
 
LoadShapeBatchlike (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
APIUtilapi_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>
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)
 

Member Function Documentation

◆ action() [1/4]

LoadShapeBatch & dss::obj::LoadShapeBatch::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]

LoadShapeBatch & dss::obj::LoadShapeBatch::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]

LoadShapeBatch & dss::obj::LoadShapeBatch::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]

LoadShapeBatch & dss::obj::LoadShapeBatch::action ( LoadShape::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

◆ csvfile()

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

strings dss::obj::LoadShapeBatch::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

◆ hour()

std::vector< VectorXd > dss::obj::LoadShapeBatch::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()

BatchFloat64ArrayProxy dss::obj::LoadShapeBatch::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]

LoadShapeBatch & dss::obj::LoadShapeBatch::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]

LoadShapeBatch & dss::obj::LoadShapeBatch::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()

BatchFloat64ArrayProxy dss::obj::LoadShapeBatch::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()

bools dss::obj::LoadShapeBatch::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()

BatchFloat64ArrayProxy dss::obj::LoadShapeBatch::minterval ( )
inline

Specify fixed interval in MINUTES.

Alternate way to specify Interval property.

DSS property name: minterval, DSS property index: 16

◆ mult()

std::vector< VectorXd > dss::obj::LoadShapeBatch::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()

BatchInt32ArrayProxy dss::obj::LoadShapeBatch::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()

BatchFloat64ArrayProxy dss::obj::LoadShapeBatch::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()

BatchFloat64ArrayProxy dss::obj::LoadShapeBatch::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()

std::vector< VectorXd > dss::obj::LoadShapeBatch::Pmult ( )
inline

Synonym for "mult".

DSS property name: Pmult, DSS property index: 19

◆ PQCSVFile()

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

BatchFloat64ArrayProxy dss::obj::LoadShapeBatch::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()

BatchFloat64ArrayProxy dss::obj::LoadShapeBatch::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()

std::vector< VectorXd > dss::obj::LoadShapeBatch::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()

BatchFloat64ArrayProxy dss::obj::LoadShapeBatch::sinterval ( )
inline

Specify fixed interval in SECONDS.

Alternate way to specify Interval property.

DSS property name: sinterval, DSS property index: 15

◆ sngfile()

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

BatchFloat64ArrayProxy dss::obj::LoadShapeBatch::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()

bools dss::obj::LoadShapeBatch::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: