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

Classes

struct  Properties
 

Public Types

enum class  PriceShapeAction : int32_t { DblSave = 0 , SngSave = 1 }
 PriceShape: Action (DSS enumeration for PriceShape) More...
 

Public Member Functions

 PriceShape (APIUtil *util=nullptr, void *ptr_=nullptr)
 Create wrapper directly by a given object handle/pointer.
 
 PriceShape (APIUtil *util, int32_t idx)
 Create a wrapper for an element given by the integer index "idx".
 
 PriceShape (APIUtil *util, char *name)
 Create a wrapper for an element given its name.
 
const char * name ()
 Returns the object's name.
 
PriceShapebegin_edit ()
 Marks an object for edition. More...
 
PriceShapeend_edit (int32_t num_edits=1)
 Finalizes an object edition. More...
 
int32_t npts ()
 Max number of points to expect in price shape vectors. More...
 
PriceShapenpts (int32_t value)
 
double interval ()
 Time interval for fixed interval data, hrs. More...
 
PriceShapeinterval (double value)
 
VectorXd price ()
 Array of Price values. More...
 
PriceShapeprice (VectorXd &value)
 
VectorXd hour ()
 Array of hour values. More...
 
PriceShapehour (VectorXd &value)
 
double mean ()
 Mean of the Price curve values. More...
 
PriceShapemean (double value)
 
double stddev ()
 Standard deviation of the Prices. More...
 
PriceShapestddev (double value)
 
string csvfile ()
 Switch input of Price curve data to a csv file containing (hour, Price) points, or simply (Price) values for fixed time interval data, one per line. More...
 
PriceShapecsvfile (const string &value)
 
PriceShapecsvfile (const char *value)
 
string sngfile ()
 Switch input of Price curve data to a binary file of singles containing (hour, Price) points, or simply (Price) values for fixed time interval data, packed one after another. More...
 
PriceShapesngfile (const string &value)
 
PriceShapesngfile (const char *value)
 
string dblfile ()
 Switch input of Price curve data to a binary file of doubles containing (hour, Price) points, or simply (Price) values for fixed time interval data, packed one after another. More...
 
PriceShapedblfile (const string &value)
 
PriceShapedblfile (const char *value)
 
double sinterval ()
 Specify fixed interval in SECONDS. More...
 
PriceShapesinterval (double value)
 
double minterval ()
 Specify fixed interval in MINUTES. More...
 
PriceShapeminterval (double value)
 
PriceShapeaction (int32_t value)
 {DblSave | SngSave} After defining Price curve data... Setting action=DblSave or SngSave will cause the present "Price" values to be written to either a packed file of double or single. More...
 
PriceShapeaction (PriceShapeAction value)
 {DblSave | SngSave} After defining Price curve data... Setting action=DblSave or SngSave will cause the present "Price" values to be written to either a packed file of double or single. More...
 
PriceShapeaction (const string &value)
 {DblSave | SngSave} After defining Price curve data... Setting action=DblSave or SngSave will cause the present "Price" values to be written to either a packed file of double or single. More...
 
PriceShapeaction (const char *value)
 {DblSave | SngSave} After defining Price curve data... Setting action=DblSave or SngSave will cause the present "Price" values to be written to either a packed file of double or single. More...
 
PriceShapelike (const string &value)
 Make like another object, e.g. More...
 
PriceShapelike (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 [] = "PriceShape"
 
static const int32_t dss_cls_idx = 4
 

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

◆ PriceShapeAction

enum class dss::obj::PriceShape::PriceShapeAction : int32_t
strong

PriceShape: Action (DSS enumeration for PriceShape)

Enumerator
DblSave 

DblSave.

SngSave 

SngSave.

Member Function Documentation

◆ action() [1/4]

PriceShape & dss::obj::PriceShape::action ( const char *  value)
inline

{DblSave | SngSave} After defining Price curve data... Setting action=DblSave or SngSave will cause the present "Price" values to be written to either a packed file of double or single.

The filename is the PriceShape name.

DSS property name: action, DSS property index: 12

◆ action() [2/4]

PriceShape & dss::obj::PriceShape::action ( const string &  value)
inline

{DblSave | SngSave} After defining Price curve data... Setting action=DblSave or SngSave will cause the present "Price" values to be written to either a packed file of double or single.

The filename is the PriceShape name.

DSS property name: action, DSS property index: 12

◆ action() [3/4]

PriceShape & dss::obj::PriceShape::action ( int32_t  value)
inline

{DblSave | SngSave} After defining Price curve data... Setting action=DblSave or SngSave will cause the present "Price" values to be written to either a packed file of double or single.

The filename is the PriceShape name.

DSS property name: action, DSS property index: 12

◆ action() [4/4]

PriceShape & dss::obj::PriceShape::action ( PriceShapeAction  value)
inline

{DblSave | SngSave} After defining Price curve data... Setting action=DblSave or SngSave will cause the present "Price" values to be written to either a packed file of double or single.

The filename is the PriceShape name.

DSS property name: action, DSS property index: 12

◆ begin_edit()

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

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ csvfile()

string dss::obj::PriceShape::csvfile ( )
inline

Switch input of Price curve data to a csv file containing (hour, Price) points, or simply (Price) 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::PriceShape::dblfile ( )
inline

Switch input of Price curve data to a binary file of doubles containing (hour, Price) points, or simply (Price) 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()

PriceShape & dss::obj::PriceShape::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::PriceShape::hour ( )
inline

Array of hour values.

Only necessary to define this property for variable interval data. If the data are fixed interval, 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::PriceShape::interval ( )
inline

Time interval for fixed interval data, hrs.

Default = 1. If Interval = 0 then time data (in hours) may be at 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]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 13

◆ like() [2/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 13

◆ mean()

double dss::obj::PriceShape::mean ( )
inline

Mean of the Price curve values.

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

◆ minterval()

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

Specify fixed interval in MINUTES.

Alternate way to specify Interval property.

DSS property name: minterval, DSS property index: 11

◆ npts()

int32_t dss::obj::PriceShape::npts ( )
inline

Max number of points to expect in price shape vectors.

This gets reset to the number of Price values found if less than specified.

DSS property name: npts, DSS property index: 1

◆ price()

VectorXd dss::obj::PriceShape::price ( )
inline

Array of Price values.

Units should be compatible with the object using the data. You can also use the syntax: Price = (file=filename) !for text file one value per line Price = (dblfile=filename) !for packed file of doubles Price = (sngfile=filename) !for packed file of singles

Note: this property will reset Npts if the number of values in the files are fewer.

DSS property name: price, DSS property index: 3

◆ sinterval()

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

Specify fixed interval in SECONDS.

Alternate way to specify Interval property.

DSS property name: sinterval, DSS property index: 10

◆ sngfile()

string dss::obj::PriceShape::sngfile ( )
inline

Switch input of Price curve data to a binary file of singles containing (hour, Price) points, or simply (Price) 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::PriceShape::stddev ( )
inline

Standard deviation of the Prices.

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


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