OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment that supports ordinary (i.e., non-delayed) and TLM connections.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
oms::AlgLoop Class Reference

#include <AlgLoop.h>

Collaboration diagram for oms::AlgLoop:
Collaboration graph

Public Member Functions

 AlgLoop (oms_alg_solver_enu_t method, double absTol, scc_t SCC, const int systNumber, const bool useDirectionalDerivative)
 Construct a new oms::AlgLoop::AlgLoop object. More...
 
scc_t getSCC ()
 
oms_status_enu_t solveAlgLoop (System &syst, DirectedGraph &graph)
 Solve algebraic loop. More...
 
std::string getAlgSolverName ()
 Return solver method. More...
 
std::string dumpLoopVars (DirectedGraph &graph)
 Dump variables of algebraic loop. More...
 

Private Member Functions

oms_status_enu_t fixPointIteration (System &syst, DirectedGraph &graph)
 Fixed-point-iteration to solve algebraic loop. More...
 

Private Attributes

oms_alg_solver_enu_t algSolverMethod
 
KinsolSolverkinsolData
 
const scc_t SCC
 Strong connected components. More...
 
const int systNumber
 
double absoluteTolerance
 

Constructor & Destructor Documentation

◆ AlgLoop()

oms::AlgLoop::AlgLoop ( oms_alg_solver_enu_t  method,
double  absTol,
scc_t  scc,
const int  number,
const bool  useDirectionalDerivative 
)

Construct a new oms::AlgLoop::AlgLoop object.

Parameters
methodSpecifies used solver for the loop. Can be oms_alg_solver_fixedpoint for fixed-point-iteration or oms_alg_solver_kinsol for SUNDIALS KINSOL
absTolTolerance used for the algebraic solver.
sccStrong Connected Componten, a vector of connected
number
Here is the call graph for this function:

Member Function Documentation

◆ dumpLoopVars()

std::string oms::AlgLoop::dumpLoopVars ( DirectedGraph graph)

Dump variables of algebraic loop.

Parameters
graph
Returns
std::string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fixPointIteration()

oms_status_enu_t oms::AlgLoop::fixPointIteration ( System syst,
DirectedGraph graph 
)
private

Fixed-point-iteration to solve algebraic loop.

Parameters
syst
graph
Returns
oms_status_enu_t
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAlgSolverName()

std::string oms::AlgLoop::getAlgSolverName ( void  )

Return solver method.

Returns
std::string Name of solver method
Here is the caller graph for this function:

◆ getSCC()

scc_t oms::AlgLoop::getSCC ( )
inline
Here is the caller graph for this function:

◆ solveAlgLoop()

oms_status_enu_t oms::AlgLoop::solveAlgLoop ( System syst,
DirectedGraph graph 
)

Solve algebraic loop.

Using solver method saved during AlgLoop creation. Can use fixed-point-iteration and KINSOL.

Parameters
systReference to System
graphReference to directed graph
Returns
oms_status_enu_t Returns oms_status_ok on success
Here is the call graph for this function:

Member Data Documentation

◆ absoluteTolerance

double oms::AlgLoop::absoluteTolerance
private

◆ algSolverMethod

oms_alg_solver_enu_t oms::AlgLoop::algSolverMethod
private

◆ kinsolData

KinsolSolver* oms::AlgLoop::kinsolData
private

◆ SCC

const scc_t oms::AlgLoop::SCC
private

Strong connected components.

◆ systNumber

const int oms::AlgLoop::systNumber
private

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