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

Public Member Functions

 ICktElement (dss::APIUtil *util)
 
double Variable (const char *MyVarName, int32_t &Code)
 Value as return and error code in Code parameter. More...
 
double Variable (const string &MyVarName, int32_t &Code)
 
double Variablei (int32_t Idx, int32_t &Code)
 Value as return and error code in Code parameter. More...
 
int32_t setVariableByIndex (int32_t Idx, double Value)
 
int32_t setVariableByName (const char *name, double Value)
 
int32_t setVariableByName (const string &name, double Value)
 
void Close (int32_t Term, int32_t Phs)
 
string Controller (int32_t idx)
 Full name of the i-th controller attached to this element. More...
 
bool IsOpen (int32_t Term, int32_t Phs)
 
void Open (int32_t Term, int32_t Phs)
 
strings AllPropertyNames ()
 Array containing all property names of the active device.
 
strings AllVariableNames ()
 Array of strings listing all the published variable names, if a PCElement. More...
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT AllVariableValues ()
 Array of doubles. More...
 
strings BusNames ()
 Array of strings. More...
 
ICktElement & BusNames (const strings &value)
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT CplxSeqCurrents ()
 Complex double array of Sequence Currents for all conductors of all terminals of active circuit element.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT CplxSeqVoltages ()
 Complex double array of Sequence Voltage for all terminals of active circuit element.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT Currents ()
 Complex array of currents into each conductor of each terminal.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT CurrentsMagAng ()
 Currents in magnitude, angle format as a array of doubles.
 
string DisplayName ()
 Display name of the object (not necessarily unique)
 
ICktElement & DisplayName (const char *value)
 
ICktElement & DisplayName (const string &value)
 
double EmergAmps ()
 Emergency Ampere Rating for PD elements.
 
ICktElement & EmergAmps (double value)
 
bool Enabled ()
 Boolean indicating that element is currently in the circuit.
 
ICktElement & Enabled (bool value)
 
string EnergyMeter ()
 Name of the Energy Meter this element is assigned to.
 
string GUID ()
 globally unique identifier for this object
 
int32_t Handle ()
 Pointer to this object.
 
bool HasOCPDevice ()
 True if a recloser, relay, or fuse controlling this ckt element. More...
 
bool HasSwitchControl ()
 This element has a SwtControl attached.
 
bool HasVoltControl ()
 This element has a CapControl or RegControl attached.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT Losses ()
 Total losses in the element: two-element complex array.
 
string Name ()
 Full Name of Active Circuit Element.
 
template<typename VectorT = Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
VectorT NodeOrder ()
 Array of integer containing the node numbers (representing phases, for example) for each conductor of each terminal.
 
double NormalAmps ()
 Normal ampere rating for PD Elements.
 
ICktElement & NormalAmps (double value)
 
int32_t NumConductors ()
 Number of Conductors per Terminal.
 
int32_t NumControls ()
 Number of controls connected to this device. More...
 
int32_t NumPhases ()
 Number of Phases.
 
int32_t NumProperties ()
 Number of Properties this Circuit Element.
 
int32_t NumTerminals ()
 Number of Terminals this Circuit Element.
 
int32_t OCPDevIndex ()
 Index into Controller list of OCP Device controlling this CktElement.
 
int32_t OCPDevType ()
 0=None; 1=Fuse; 2=Recloser; 3=Relay; Type of OCP controller device
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT PhaseLosses ()
 Complex array of losses by phase.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT Powers ()
 Complex array of powers into each conductor of each terminal.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT Residuals ()
 Residual currents for each terminal: (mag, angle)
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT SeqCurrents ()
 Double array of symmetrical component currents into each 3-phase terminal.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT SeqPowers ()
 Double array of sequence powers into each 3-phase teminal.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT SeqVoltages ()
 Double array of symmetrical component voltages at each 3-phase terminal.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT Voltages ()
 Complex array of voltages at terminals.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT VoltagesMagAng ()
 Voltages at each conductor in magnitude, angle form as array of doubles.
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT Yprim ()
 YPrim matrix, column order, complex numbers (paired)
 
bool IsIsolated ()
 Returns true if the current active element is isolated. More...
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT TotalPowers ()
 Returns the total powers (complex) at ALL terminals of the active circuit element.
 
template<typename VectorT = Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
VectorT NodeRef ()
 Array of integers, a copy of the internal NodeRef of the CktElement.
 
- Public Member Functions inherited from dss::ContextState
 ContextState (APIUtil *util)
 

Public Attributes

IDSSProperty Properties
 
- Public Attributes inherited from dss::ContextState
void * ctx
 Pointer to the DSSContext for easy access.
 
APIUtil * api_util
 API utility functions.
 

Member Function Documentation

◆ AllVariableNames()

strings dss::classic::ICktElement::AllVariableNames ( )
inline

Array of strings listing all the published variable names, if a PCElement.

Otherwise, null string.

◆ AllVariableValues()

template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT dss::classic::ICktElement::AllVariableValues ( )
inline

Array of doubles.

Values of state variables of active element if PC element.

◆ BusNames()

strings dss::classic::ICktElement::BusNames ( )
inline

Array of strings.

Get Bus definitions to which each terminal is connected.

◆ Controller()

string dss::classic::ICktElement::Controller ( int32_t  idx)
inline

Full name of the i-th controller attached to this element.

Ex: str = Controller(2). See NumControls to determine valid index range

◆ HasOCPDevice()

bool dss::classic::ICktElement::HasOCPDevice ( )
inline

True if a recloser, relay, or fuse controlling this ckt element.

OCP = Overcurrent Protection

◆ IsIsolated()

bool dss::classic::ICktElement::IsIsolated ( )
inline

Returns true if the current active element is isolated.

Note that this only fetches the current value. See also the Topology interface.

◆ NumControls()

int32_t dss::classic::ICktElement::NumControls ( )
inline

Number of controls connected to this device.

Use to determine valid range for index into Controller array.

◆ Variable()

double dss::classic::ICktElement::Variable ( const char *  MyVarName,
int32_t &  Code 
)
inline

Value as return and error code in Code parameter.

For PCElement, get the value of a variable by name. If Code>0 then no variable by this name or not a PCelement.

◆ Variablei()

double dss::classic::ICktElement::Variablei ( int32_t  Idx,
int32_t &  Code 
)
inline

Value as return and error code in Code parameter.

For PCElement, get the value of a variable by integer index. If Code>0 then no variable by this index or not a PCelement.


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