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 Member Functions | |
PVSystem (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
PVSystem (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
PVSystem (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
PVSystem & | begin_edit () |
Marks an object for edition. More... | |
PVSystem & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
int32_t | phases () |
Number of Phases, this PVSystem element. More... | |
PVSystem & | phases (int32_t value) |
string | bus1 () |
Bus to which the PVSystem element is connected. More... | |
PVSystem & | bus1 (const string &value) |
PVSystem & | bus1 (const char *value) |
double | kv () |
Nominal rated (1.0 per unit) voltage, kV, for PVSystem element. More... | |
PVSystem & | kv (double value) |
double | irradiance () |
Get/set the present irradiance value in kW/sq-m. More... | |
PVSystem & | irradiance (double value) |
double | Pmpp () |
Get/set the rated max power of the PV array for 1.0 kW/sq-m irradiance and a user-selected array temperature. More... | |
PVSystem & | Pmpp (double value) |
double | pctPmpp () |
Upper limit on active power as a percentage of Pmpp. More... | |
PVSystem & | pctPmpp (double value) |
double | Temperature () |
Get/set the present Temperature. More... | |
PVSystem & | Temperature (double value) |
double | pf () |
Nominally, the power factor for the output power. More... | |
PVSystem & | pf (double value) |
Connection | conn () |
={wye|LN|delta|LL}. More... | |
PVSystem & | conn (int32_t value) |
PVSystem & | conn (Connection value) |
PVSystem & | conn (const string &value) |
PVSystem & | conn (const char *value) |
string | conn_str () |
={wye|LN|delta|LL}. More... | |
PVSystem & | conn_str (const string &value) |
={wye|LN|delta|LL}. More... | |
double | kvar () |
Get/set the present kvar value. More... | |
PVSystem & | kvar (double value) |
double | kVA () |
kVA rating of inverter. More... | |
PVSystem & | kVA (double value) |
double | pctCutin () |
% cut-in power – % of kVA rating of inverter. More... | |
PVSystem & | pctCutin (double value) |
double | pctCutout () |
% cut-out power – % of kVA rating of inverter. More... | |
PVSystem & | pctCutout (double value) |
string | EffCurve () |
An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter. More... | |
PVSystem & | EffCurve (const string &value) |
PVSystem & | EffCurve (dss::obj::XYcurve &value) |
dss::obj::XYcurve | EffCurve_obj () |
An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter. More... | |
PVSystem & | EffCurve_obj (dss::obj::XYcurve &value) |
string | PTCurve () |
An XYCurve object, previously defined, that describes the PV array PER UNIT Pmpp vs Temperature curve. More... | |
PVSystem & | PTCurve (const string &value) |
PVSystem & | PTCurve (dss::obj::XYcurve &value) |
dss::obj::XYcurve | PTCurve_obj () |
An XYCurve object, previously defined, that describes the PV array PER UNIT Pmpp vs Temperature curve. More... | |
PVSystem & | PTCurve_obj (dss::obj::XYcurve &value) |
double | pctR () |
Equivalent percent internal resistance, ohms. More... | |
PVSystem & | pctR (double value) |
double | pctX () |
Equivalent percent internal reactance, ohms. More... | |
PVSystem & | pctX (double value) |
int32_t | model () |
Integer code (default=1) for the model to use for power output variation with voltage. More... | |
PVSystem & | model (int32_t value) |
double | Vminpu () |
Default = 0.90. More... | |
PVSystem & | Vminpu (double value) |
double | Vmaxpu () |
Default = 1.10. More... | |
PVSystem & | Vmaxpu (double value) |
bool | Balanced () |
{Yes | No*} Default is No. More... | |
PVSystem & | Balanced (bool value) |
bool | LimitCurrent () |
Limits current magnitude to Vminpu value for both 1-phase and 3-phase PVSystems similar to Generator Model 7. More... | |
PVSystem & | LimitCurrent (bool value) |
string | yearly () |
Dispatch shape to use for yearly simulations. More... | |
PVSystem & | yearly (const string &value) |
PVSystem & | yearly (dss::obj::LoadShape &value) |
dss::obj::LoadShape | yearly_obj () |
Dispatch shape to use for yearly simulations. More... | |
PVSystem & | yearly_obj (dss::obj::LoadShape &value) |
string | daily () |
Dispatch shape to use for daily simulations. More... | |
PVSystem & | daily (const string &value) |
PVSystem & | daily (dss::obj::LoadShape &value) |
dss::obj::LoadShape | daily_obj () |
Dispatch shape to use for daily simulations. More... | |
PVSystem & | daily_obj (dss::obj::LoadShape &value) |
string | duty () |
Load shape to use for duty cycle dispatch simulations such as for solar ramp rate studies. More... | |
PVSystem & | duty (const string &value) |
PVSystem & | duty (dss::obj::LoadShape &value) |
dss::obj::LoadShape | duty_obj () |
Load shape to use for duty cycle dispatch simulations such as for solar ramp rate studies. More... | |
PVSystem & | duty_obj (dss::obj::LoadShape &value) |
string | Tyearly () |
Temperature shape to use for yearly simulations. More... | |
PVSystem & | Tyearly (const string &value) |
PVSystem & | Tyearly (dss::obj::TShape &value) |
dss::obj::TShape | Tyearly_obj () |
Temperature shape to use for yearly simulations. More... | |
PVSystem & | Tyearly_obj (dss::obj::TShape &value) |
string | Tdaily () |
Temperature shape to use for daily simulations. More... | |
PVSystem & | Tdaily (const string &value) |
PVSystem & | Tdaily (dss::obj::TShape &value) |
dss::obj::TShape | Tdaily_obj () |
Temperature shape to use for daily simulations. More... | |
PVSystem & | Tdaily_obj (dss::obj::TShape &value) |
string | Tduty () |
Temperature shape to use for duty cycle dispatch simulations such as for solar ramp rate studies. More... | |
PVSystem & | Tduty (const string &value) |
PVSystem & | Tduty (dss::obj::TShape &value) |
dss::obj::TShape | Tduty_obj () |
Temperature shape to use for duty cycle dispatch simulations such as for solar ramp rate studies. More... | |
PVSystem & | Tduty_obj (dss::obj::TShape &value) |
int32_t | cls () |
An arbitrary integer number representing the class of PVSystem element so that PVSystem values may be segregated by class. More... | |
PVSystem & | cls (int32_t value) |
string | UserModel () |
Name of DLL containing user-written model, which computes the terminal currents for Dynamics studies, overriding the default model. More... | |
PVSystem & | UserModel (const string &value) |
PVSystem & | UserModel (const char *value) |
string | UserData () |
String (in quotes or parentheses) that gets passed to user-written model for defining the data required for that model. More... | |
PVSystem & | UserData (const string &value) |
PVSystem & | UserData (const char *value) |
bool | debugtrace () |
{Yes | No } Default is no. More... | |
PVSystem & | debugtrace (bool value) |
bool | VarFollowInverter () |
Boolean variable (Yes|No) or (True|False). More... | |
PVSystem & | VarFollowInverter (bool value) |
double | DutyStart () |
Starting time offset [hours] into the duty cycle shape for this PVSystem, defaults to 0. More... | |
PVSystem & | DutyStart (double value) |
bool | WattPriority () |
{Yes/No*/True/False} Set inverter to watt priority instead of the default var priority More... | |
PVSystem & | WattPriority (bool value) |
bool | PFPriority () |
{Yes/No*/True/False} Set inverter to operate with PF priority when in constant PF mode. More... | |
PVSystem & | PFPriority (bool value) |
double | pctPminNoVars () |
Minimum active power as percentage of Pmpp under which there is no vars production/absorption. More... | |
PVSystem & | pctPminNoVars (double value) |
double | pctPminkvarMax () |
Minimum active power as percentage of Pmpp that allows the inverter to produce/absorb reactive power up to its kvarMax or kvarMaxAbs. More... | |
PVSystem & | pctPminkvarMax (double value) |
double | kvarMax () |
Indicates the maximum reactive power GENERATION (un-signed numerical variable in kvar) for the inverter (as an un-signed value). More... | |
PVSystem & | kvarMax (double value) |
double | kvarMaxAbs () |
Indicates the maximum reactive power ABSORPTION (un-signed numerical variable in kvar) for the inverter (as an un-signed value). More... | |
PVSystem & | kvarMaxAbs (double value) |
string | spectrum () |
Name of harmonic voltage or current spectrum for this PVSystem element. More... | |
PVSystem & | spectrum (const string &value) |
PVSystem & | spectrum (dss::obj::Spectrum &value) |
dss::obj::Spectrum | spectrum_obj () |
Name of harmonic voltage or current spectrum for this PVSystem element. More... | |
PVSystem & | spectrum_obj (dss::obj::Spectrum &value) |
double | basefreq () |
Base Frequency for ratings. More... | |
PVSystem & | basefreq (double value) |
bool | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
PVSystem & | enabled (bool value) |
PVSystem & | like (const string &value) |
Make like another object, e.g. More... | |
PVSystem & | 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 [] = "PVSystem" |
static const int32_t | dss_cls_idx = 34 |
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 |
|
inline |
{Yes | No*} Default is No.
Force balanced current only for 3-phase PVSystems. Forces zero- and negative-sequence to zero.
DSS property name: Balanced, DSS property index: 21
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 42
|
inline |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
inline |
Bus to which the PVSystem element is connected.
May include specific node specification.
DSS property name: bus1, DSS property index: 2
|
inline |
|
inline |
={wye|LN|delta|LL}.
Default is wye.
DSS property name: conn, DSS property index: 9
|
inline |
={wye|LN|delta|LL}.
Default is wye.
DSS property name: conn, DSS property index: 9
|
inline |
={wye|LN|delta|LL}.
Default is wye.
DSS property name: conn, DSS property index: 9
|
inline |
Dispatch shape to use for daily simulations.
Must be previously defined as a Loadshape object of 24 hrs, typically. In the default dispatch mode, the PVSystem element uses this loadshape to trigger State changes.
DSS property name: daily, DSS property index: 24
|
inline |
Dispatch shape to use for daily simulations.
Must be previously defined as a Loadshape object of 24 hrs, typically. In the default dispatch mode, the PVSystem element uses this loadshape to trigger State changes.
DSS property name: daily, DSS property index: 24
|
inline |
|
inline |
Load shape to use for duty cycle dispatch simulations such as for solar ramp rate studies.
Must be previously defined as a Loadshape object. Typically would have time intervals of 1-5 seconds. Designate the number of points to solve using the Set Number=xxxx command. If there are fewer points in the actual shape, the shape is assumed to repeat.
DSS property name: duty, DSS property index: 25
|
inline |
Load shape to use for duty cycle dispatch simulations such as for solar ramp rate studies.
Must be previously defined as a Loadshape object. Typically would have time intervals of 1-5 seconds. Designate the number of points to solve using the Set Number=xxxx command. If there are fewer points in the actual shape, the shape is assumed to repeat.
DSS property name: duty, DSS property index: 25
|
inline |
Starting time offset [hours] into the duty cycle shape for this PVSystem, defaults to 0.
DSS property name: DutyStart, DSS property index: 34
|
inline |
An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter.
Inverter output power is discounted by the multiplier obtained from this curve.
DSS property name: EffCurve, DSS property index: 14
|
inline |
An XYCurve object, previously defined, that describes the PER UNIT efficiency vs PER UNIT of rated kVA for the inverter.
Inverter output power is discounted by the multiplier obtained from this curve.
DSS property name: EffCurve, DSS property index: 14
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 43
|
inline |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
inline |
Get/set the present irradiance value in kW/sq-m.
Used as base value for shape multipliers. Generally entered as peak value for the time period of interest and the yearly, daily, and duty load shape objects are defined as per unit multipliers (just like Loads/Generators).
DSS property name: irradiance, DSS property index: 4
|
inline |
Nominal rated (1.0 per unit) voltage, kV, for PVSystem element.
For 2- and 3-phase PVSystem elements, specify phase-phase kV. Otherwise, specify actual kV across each branch of the PVSystem element. If 1-phase wye (star or LN), specify phase-neutral kV. If 1-phase delta or phase-phase connected, specify phase-phase kV.
DSS property name: kv, DSS property index: 3
|
inline |
kVA rating of inverter.
Used as the base for Dynamics mode and Harmonics mode values.
DSS property name: kVA, DSS property index: 11
|
inline |
Get/set the present kvar value.
Setting this property forces the inverter to operate in constant kvar mode.
DSS property name: kvar, DSS property index: 10
|
inline |
Indicates the maximum reactive power GENERATION (un-signed numerical variable in kvar) for the inverter (as an un-signed value).
Defaults to kVA rating of the inverter.
DSS property name: kvarMax, DSS property index: 39
|
inline |
Indicates the maximum reactive power ABSORPTION (un-signed numerical variable in kvar) for the inverter (as an un-signed value).
Defaults to kVA rating of the inverter.
DSS property name: kvarMaxAbs, DSS property index: 40
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 44
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 44
|
inline |
Limits current magnitude to Vminpu value for both 1-phase and 3-phase PVSystems similar to Generator Model 7.
For 3-phase, limits the positive-sequence current but not the negative-sequence.
DSS property name: LimitCurrent, DSS property index: 22
|
inline |
Integer code (default=1) for the model to use for power output variation with voltage.
Valid values are:
1:PVSystem element injects a CONSTANT kW at specified power factor. 2:PVSystem element is modeled as a CONSTANT ADMITTANCE. 3:Compute load injection from User-written Model.
DSS property name: model, DSS property index: 18
|
inline |
% cut-in power – % of kVA rating of inverter.
When the inverter is OFF, the power from the array must be greater than this for the inverter to turn on.
DSS property name: Cutin, DSS property index: 12
|
inline |
% cut-out power – % of kVA rating of inverter.
When the inverter is ON, the inverter turns OFF when the power from the array drops below this value.
DSS property name: Cutout, DSS property index: 13
|
inline |
Minimum active power as percentage of Pmpp that allows the inverter to produce/absorb reactive power up to its kvarMax or kvarMaxAbs.
DSS property name: PminkvarMax, DSS property index: 38
|
inline |
Minimum active power as percentage of Pmpp under which there is no vars production/absorption.
DSS property name: PminNoVars, DSS property index: 37
|
inline |
Upper limit on active power as a percentage of Pmpp.
DSS property name: Pmpp, DSS property index: 6
|
inline |
Equivalent percent internal resistance, ohms.
Default is 50%. Placed in series with internal voltage source for harmonics and dynamics modes. (Limits fault current to about 2 pu if not current limited – see LimitCurrent)
DSS property name: R, DSS property index: 16
|
inline |
Equivalent percent internal reactance, ohms.
Default is 0%. Placed in series with internal voltage source for harmonics and dynamics modes.
DSS property name: X, DSS property index: 17
|
inline |
Nominally, the power factor for the output power.
Default is 1.0. Setting this property will cause the inverter to operate in constant power factor mode.Enter negative when kW and kvar have opposite signs. A positive power factor signifies that the PVSystem element produces vars as is typical for a generator.
DSS property name: pf, DSS property index: 8
|
inline |
{Yes/No*/True/False} Set inverter to operate with PF priority when in constant PF mode.
If "Yes", value assigned to "WattPriority" is neglected. If controlled by an InvControl with either Volt-Var or DRC or both functions activated, PF priority is neglected and "WattPriority" is considered. Default = No.
DSS property name: PFPriority, DSS property index: 36
|
inline |
Number of Phases, this PVSystem element.
Power is evenly divided among phases.
DSS property name: phases, DSS property index: 1
|
inline |
Get/set the rated max power of the PV array for 1.0 kW/sq-m irradiance and a user-selected array temperature.
The P-TCurve should be defined relative to the selected array temperature.
DSS property name: Pmpp, DSS property index: 5
|
inline |
An XYCurve object, previously defined, that describes the PV array PER UNIT Pmpp vs Temperature curve.
Temperature units must agree with the Temperature property and the Temperature shapes used for simulations. The Pmpp values are specified in per unit of the Pmpp value for 1 kW/sq-m irradiance. The value for the temperature at which Pmpp is defined should be 1.0. The net array power is determined by the irradiance * Pmpp * f(Temperature)
DSS property name: P-TCurve, DSS property index: 15
|
inline |
An XYCurve object, previously defined, that describes the PV array PER UNIT Pmpp vs Temperature curve.
Temperature units must agree with the Temperature property and the Temperature shapes used for simulations. The Pmpp values are specified in per unit of the Pmpp value for 1 kW/sq-m irradiance. The value for the temperature at which Pmpp is defined should be 1.0. The net array power is determined by the irradiance * Pmpp * f(Temperature)
DSS property name: P-TCurve, DSS property index: 15
|
inline |
Name of harmonic voltage or current spectrum for this PVSystem element.
A harmonic voltage source is assumed for the inverter. Default value is "default", which is defined when the DSS starts.
DSS property name: spectrum, DSS property index: 41
|
inline |
Name of harmonic voltage or current spectrum for this PVSystem element.
A harmonic voltage source is assumed for the inverter. Default value is "default", which is defined when the DSS starts.
DSS property name: spectrum, DSS property index: 41
|
inline |
|
inline |
|
inline |
Temperature shape to use for duty cycle dispatch simulations such as for solar ramp rate studies.
Must be previously defined as a TShape object. Typically would have time intervals of 1-5 seconds. Designate the number of points to solve using the Set Number=xxxx command. If there are fewer points in the actual shape, the shape is assumed to repeat. The PVSystem model uses this TShape to determine the Pmpp from the Pmpp vs T curve. Units must agree with the Pmpp vs T curve.
DSS property name: Tduty, DSS property index: 28
|
inline |
Temperature shape to use for duty cycle dispatch simulations such as for solar ramp rate studies.
Must be previously defined as a TShape object. Typically would have time intervals of 1-5 seconds. Designate the number of points to solve using the Set Number=xxxx command. If there are fewer points in the actual shape, the shape is assumed to repeat. The PVSystem model uses this TShape to determine the Pmpp from the Pmpp vs T curve. Units must agree with the Pmpp vs T curve.
DSS property name: Tduty, DSS property index: 28
|
inline |
Get/set the present Temperature.
Used as fixed value corresponding to PTCurve property. A multiplier is obtained from the Pmpp-Temp curve and applied to the nominal Pmpp from the irradiance to determine the net array output.
DSS property name: Temperature, DSS property index: 7
|
inline |
Temperature shape to use for yearly simulations.
Must be previously defined as a TShape object. If this is not specified, the Daily dispatch shape, if any, is repeated during Yearly solution modes. The PVSystem element uses this TShape to determine the Pmpp from the Pmpp vs T curve. Units must agree with the Pmpp vs T curve.
DSS property name: Tyearly, DSS property index: 26
|
inline |
Temperature shape to use for yearly simulations.
Must be previously defined as a TShape object. If this is not specified, the Daily dispatch shape, if any, is repeated during Yearly solution modes. The PVSystem element uses this TShape to determine the Pmpp from the Pmpp vs T curve. Units must agree with the Pmpp vs T curve.
DSS property name: Tyearly, DSS property index: 26
|
inline |
String (in quotes or parentheses) that gets passed to user-written model for defining the data required for that model.
DSS property name: UserData, DSS property index: 31
|
inline |
Name of DLL containing user-written model, which computes the terminal currents for Dynamics studies, overriding the default model.
Set to "none" to negate previous setting.
DSS property name: UserModel, DSS property index: 30
|
inline |
Boolean variable (Yes|No) or (True|False).
Defaults to False which indicates that the reactive power generation/absorption does not respect the inverter status.When set to True, the PVSystem reactive power generation/absorption will cease when the inverter status is off, due to panel kW dropping below Cutout. The reactive power generation/absorption will begin again when the panel kW is above Cutin. When set to False, the PVSystem will generate/absorb reactive power regardless of the status of the inverter.
DSS property name: VarFollowInverter, DSS property index: 33
|
inline |
Default = 1.10.
Maximum per unit voltage for which the Model is assumed to apply. Above this value, the load model reverts to a constant impedance model.
DSS property name: Vmaxpu, DSS property index: 20
|
inline |
Default = 0.90.
Minimum per unit voltage for which the Model is assumed to apply. Below this value, the load model reverts to a constant impedance model except for Dynamics model. In Dynamics mode, the current magnitude is limited to the value the power flow would compute for this voltage.
DSS property name: Vminpu, DSS property index: 19
|
inline |
{Yes/No*/True/False} Set inverter to watt priority instead of the default var priority
DSS property name: WattPriority, DSS property index: 35
|
inline |
Dispatch shape to use for yearly simulations.
Must be previously defined as a Loadshape object. If this is not specified, the Daily dispatch shape, if any, is repeated during Yearly solution modes. In the default dispatch mode, the PVSystem element uses this loadshape to trigger State changes.
DSS property name: yearly, DSS property index: 23
|
inline |
Dispatch shape to use for yearly simulations.
Must be previously defined as a Loadshape object. If this is not specified, the Daily dispatch shape, if any, is repeated during Yearly solution modes. In the default dispatch mode, the PVSystem element uses this loadshape to trigger State changes.
DSS property name: yearly, DSS property index: 23