DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
|
Public Member Functions | |
ICircuit (dss::APIUtil *util) | |
IBus & | get_Buses (int32_t idx) |
Activates and returns a bus by its (zero-based) index. | |
IBus & | get_Buses (const char *name) |
Activates and returns a bus by its name. | |
IBus & | get_Buses (const string &name) |
ICktElement | get_CktElements (int32_t idx) |
Activates and returns a CktElement by its global (zero-based) index. | |
ICktElement | get_CktElements (const char *fullName) |
Activates and returns a CktElement by its full name (e.g. More... | |
ICktElement | get_CktElements (const string &fullName) |
double | Capacity (double Start, double Increment) |
void | Disable (const char *Name) |
void | Disable (const string &Name) |
void | Enable (const char *Name) |
void | Enable (const string &Name) |
void | EndOfTimeStepUpdate () |
int32_t | FirstElement () |
int32_t | FirstPCElement () |
int32_t | FirstPDElement () |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | AllNodeDistancesByPhase (int32_t Phase) |
Returns an array of doubles representing the distances to parent EnergyMeter. More... | |
strings | AllNodeNamesByPhase (int32_t Phase) |
Return array of strings of the node names for the By Phase criteria. More... | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | AllNodeVmagByPhase (int32_t Phase) |
Returns Array of doubles represent voltage magnitudes for nodes on the specified phase. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | AllNodeVmagPUByPhase (int32_t Phase) |
Returns array of per unit voltage magnitudes for each node by phase. | |
int32_t | NextElement () |
int32_t | NextPCElement () |
int32_t | NextPDElement () |
void | Sample () |
void | SaveSample () |
int32_t | SetActiveBus (const char *BusName) |
int32_t | SetActiveBus (const string &BusName) |
int32_t | SetActiveBusi (int32_t BusIndex) |
int32_t | SetActiveClass (const char *ClassName) |
int32_t | SetActiveClass (const string &ClassName) |
int32_t | SetActiveElement (const char *FullName) |
int32_t | SetActiveElement (const string &FullName) |
void | UpdateStorage () |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | AllBusDistances () |
Returns distance from each bus to parent EnergyMeter. More... | |
strings | AllBusNames () |
Array of strings containing names of all buses in circuit (see AllNodeNames). | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | AllBusVmag () |
Array of magnitudes (doubles) of voltages at all buses. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | AllBusVmagPu () |
Double Array of all bus voltages (each node) magnitudes in Per unit. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | AllBusVolts () |
Complex array of all bus, node voltages from most recent solution. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | AllElementLosses () |
Array of total losses (complex) in each circuit element. | |
strings | AllElementNames () |
Array of strings containing Full Name of all elements. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | AllNodeDistances () |
Returns an array of distances from parent EnergyMeter for each Node. More... | |
strings | AllNodeNames () |
Array of strings containing full name of each node in system in same order as returned by AllBusVolts, etc. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | LineLosses () |
Complex total line losses in the circuit. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | Losses () |
Total losses in active circuit, complex number (two-element array of double). | |
string | Name () |
Name of the active circuit. | |
int32_t | NumBuses () |
Total number of Buses in the circuit. | |
int32_t | NumCktElements () |
Number of CktElements in the circuit. | |
int32_t | NumNodes () |
Total number of nodes in the circuit. | |
int32_t | ParentPDElement () |
Sets Parent PD element, if any, to be the active circuit element and returns index>0; Returns 0 if it fails or not applicable. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | SubstationLosses () |
Complex losses in all transformers designated to substations. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | SystemY () |
System Y matrix (after a solution has been performed). More... | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | TotalPower () |
Total power, kW delivered to the circuit. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | YCurrents () |
Array of doubles containing complex injection currents for the present solution. More... | |
strings | YNodeOrder () |
Array of strings containing the names of the nodes in the same order as the Y matrix. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>> | |
VectorT | YNodeVarray () |
Complex array of actual node voltages in same order as SystemY matrix. | |
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>, typename InVectorT = Eigen::Matrix<int32_t, Eigen::Dynamic, 1>> | |
VectorT | ElementLosses (const InVectorT &value) |
Array of total losses (complex) in a selection of elements. More... | |
Public Member Functions inherited from dss::ContextState | |
ContextState (APIUtil *util) | |
Public Attributes | |
IBus | Buses |
ICktElement | CktElements |
ICktElement | ActiveElement |
ISolution | Solution |
IBus | ActiveBus |
IGenerators | Generators |
IMeters | Meters |
IMonitors | Monitors |
ISettings | Settings |
ILines | Lines |
ICtrlQueue | CtrlQueue |
ILoads | Loads |
ICktElement | ActiveCktElement |
IDSSElement | ActiveDSSElement |
IActiveClass | ActiveClass |
ICapControls | CapControls |
IRegControls | RegControls |
ISwtControls | SwtControls |
ITransformers | Transformers |
ICapacitors | Capacitors |
ITopology | Topology |
ISensors | Sensors |
IXYCurves | XYCurves |
IPDElements | PDElements |
IReclosers | Reclosers |
IRelays | Relays |
ILoadShapes | LoadShapes |
IFuses | Fuses |
IISources | Isources |
IDSSimComs | DSSim_Coms |
IPVSystems | PVSystems |
IVsources | Vsources |
ILineCodes | LineCodes |
ILineGeometries | LineGeometries |
ILineSpacings | LineSpacings |
IWireData | WireData |
ICNData | CNData |
ITSData | TSData |
IReactors | Reactors |
IReduceCkt | ReduceCkt |
IStorages | Storages |
IGICSources | GICSources |
IParallel | Parallel |
Public Attributes inherited from dss::ContextState | |
void * | ctx |
Pointer to the DSSContext for easy access. | |
APIUtil * | api_util |
API utility functions. | |
|
inline |
Returns distance from each bus to parent EnergyMeter.
Corresponds to sequence in AllBusNames.
|
inline |
Returns an array of distances from parent EnergyMeter for each Node.
Corresponds to AllBusVMag sequence.
|
inline |
Returns an array of doubles representing the distances to parent EnergyMeter.
Sequence of array corresponds to other node ByPhase properties.
|
inline |
Return array of strings of the node names for the By Phase criteria.
Sequence corresponds to other ByPhase properties.
|
inline |
Array of total losses (complex) in a selection of elements.
Use the element indices (starting at 1) as parameter.
(API Extension)
|
inline |
Activates and returns a CktElement by its full name (e.g.
"load.abc").
|
inline |
System Y matrix (after a solution has been performed).
This is deprecated as it returns a dense matrix. Only use it for small systems. For large scale systems, prefer YMatrix.GetCompressedYMatrix.
|
inline |
Array of doubles containing complex injection currents for the present solution.
Is is the "I" vector of I=YV