OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
oms::System Class Referenceabstract

#include <System.h>

Inheritance diagram for oms::System:
[legend]
Collaboration diagram for oms::System:
[legend]

Public Member Functions

virtual ~System ()
 
virtual oms_status_enu_t exportToSSD_SimulationInformation (pugi::xml_node &node) const =0
 
virtual oms_status_enu_t importFromSSD_SimulationInformation (const pugi::xml_node &node, const std::string &sspVersion)=0
 
virtual oms_status_enu_t registerSignalsForResultFile (ResultWriter &resultFile)
 
virtual oms_status_enu_t updateSignals (ResultWriter &resultFile)
 
virtual oms_status_enu_t setSolver (oms_solver_enu_t solver)
 
virtual oms_status_enu_t instantiate ()=0
 
virtual oms_status_enu_t initialize ()=0
 
virtual oms_status_enu_t terminate ()=0
 
virtual oms_status_enu_t reset ()=0
 
virtual oms_status_enu_t doStep ()=0
 
virtual oms_status_enu_t stepUntil (double stopTime)=0
 
const ComRef & getCref () const
 
ComRef getFullCref () const
 
System * getSystem (const ComRef &cref)
 
Component * getComponent (const ComRef &cref)
 
Variable * getVariable (const ComRef &cref)
 
Element * getElement ()
 
oms_status_enu_t listUnconnectedConnectors (char **contents) const
 
oms_system_enu_t getType () const
 
oms_status_enu_t addSubSystem (const ComRef &cref, oms_system_enu_t type)
 
oms_status_enu_t addSubModel (const ComRef &cref, const std::string &fmuPath)
 
oms_status_enu_t setExportName (const ComRef &cref, const std::string &exportName)
 
oms_status_enu_t setAliasName (const ComRef &cref, const std::string &aliasName)
 
oms_status_enu_t replaceSubModel (const ComRef &cref, const std::string &fmuPath, bool dryRun, int &warningCount)
 
bool isValidScalarVariable (Component *referenceComponent, Component *replacingComponent, Connection *connection, const ComRef &crefA, const ComRef &crefB, const ComRef &signalName, const std::string &path, std::vector< std::string > &warningList)
 
bool validCref (const ComRef &cref)
 
oms_status_enu_t exportToSSD (pugi::xml_node &node, Snapshot &snapshot, std::string variantName) const
 
oms_status_enu_t exportToSSV (Snapshot &snapshot) const
 
oms_status_enu_t importFromSnapshot (const pugi::xml_node &node, const std::string &sspVersion, const Snapshot &snapshot, std::string variantName)
 
void setGeometry (const ssd::ElementGeometry &geometry)
 
oms_status_enu_t addConnector (const ComRef &cref, oms_causality_enu_t causality, oms_signal_type_enu_t type)
 
Connector * getConnector (const ComRef &cref)
 
std::string getConnectorOwner (const ComRef &cref) const
 
Connector ** getConnectors ()
 
BusConnector * getBusConnector (const ComRef &cref)
 
Connection * getConnection (const ComRef &crefA, const ComRef &crefB)
 
Connection ** getConnections (const ComRef &cref)
 
oms_status_enu_t addConnection (const ComRef &crefA, const ComRef &crefB, bool suppressUnitConversion=false)
 
oms_status_enu_t deleteConnection (const ComRef &crefA, const ComRef &crefB)
 
oms_status_enu_t setConnectorGeometry (const ComRef &cref, const oms::ssd::ConnectorGeometry *geometry)
 
oms_status_enu_t setConnectionGeometry (const ComRef &crefA, const ComRef &crefB, const oms::ssd::ConnectionGeometry *geometry)
 
oms_status_enu_t setConnectorNumericType (const ComRef &cref, const oms_signal_numeric_type_enu_t numericType)
 
oms_status_enu_t setConnectionLinearTransformation (const oms::ComRef &crefA, const oms::ComRef &crefB, double factor, double offset)
 
oms_status_enu_t addBus (const ComRef &cref)
 
oms_status_enu_t newResources (const ComRef &cref, const std::string &ssvFilename, const std::string &ssmFilename="", bool externalresources=false)
 
oms_status_enu_t addConnectorToBus (const ComRef &busCref, const ComRef &connectorCref)
 
oms_status_enu_t deleteConnectorFromBus (const ComRef &busCref, const ComRef &connectorCref)
 
oms_status_enu_t setBusGeometry (const ComRef &cref, const oms::ssd::ConnectorGeometry *geometry)
 
oms_status_enu_t delete_ (const ComRef &cref)
 
oms_status_enu_t deleteAllConectionsTo (const ComRef &cref)
 
oms_status_enu_t deleteReferencesInSSD (const ComRef &cref, const std::string &filename)
 
oms_status_enu_t deleteResourcesInSSP (const std::string &filename)
 
bool isConnected (const ComRef &cref) const
 
Model & getModel ()
 
System * getParentSystem () const
 
bool copyResources ()
 
void getAllResources (std::vector< std::string > &resources) const
 
std::map< ComRef, System * > & getSubSystems ()
 
std::map< ComRef, Component * > & getComponents ()
 
std::vector< Connection * > & getConnections ()
 
std::vector< Connection * > & getDcpConnections ()
 
oms_status_enu_t updateDependencyGraphs ()
 
const DirectedGraph & getInitialUnknownsGraph ()
 
const DirectedGraph & getOutputsGraph ()
 
oms_status_enu_t exportDependencyGraphs (const std::string &pathInitialization, const std::string &pathEvent, const std::string &pathSimulation)
 
double getTime () const
 
oms_status_enu_t getBoolean (const ComRef &cref, bool &value)
 
oms_status_enu_t getInteger (const ComRef &cref, int &value)
 
oms_status_enu_t getReal (const ComRef &cref, double &value)
 
oms_status_enu_t getString (const ComRef &cref, std::string &value)
 
oms_status_enu_t setBoolean (const ComRef &cref, bool value)
 
oms_status_enu_t setInteger (const ComRef &cref, int value)
 
oms_status_enu_t setReal (const ComRef &cref, double value)
 
oms_status_enu_t setString (const ComRef &cref, const std::string &value)
 
oms_status_enu_t setUnit (const ComRef &cref, const std::string &value)
 
oms_status_enu_t getVariableType (const ComRef &cref, oms_signal_type_enu_t &type)
 
oms_status_enu_t getReals (const std::vector< ComRef > &crefs, std::vector< double > &values)
 
oms_status_enu_t setReals (const std::vector< ComRef > &crefs, std::vector< double > values)
 
oms_status_enu_t setRealInputDerivatives (const ComRef &cref, int order, double value)
 
oms_status_enu_t getDirectionalDerivative (const ComRef &unknownCref, const ComRef &knownCref, double &value)
 
oms_status_enu_t getState (const ComRef &cref)
 
oms_status_enu_t setState (const ComRef &cref)
 
oms_status_enu_t freeState (const ComRef &cref)
 
oms_status_enu_t rename (const ComRef &newCref)
 rename the system itself
 
oms_status_enu_t rename (const ComRef &cref, const ComRef &newCref)
 rename any component within the system
 
oms_status_enu_t renameConnections (const ComRef &cref, const ComRef &newCref)
 
oms_status_enu_t renameConnectors ()
 
bool isTopLevelSystem () const
 
oms_status_enu_t addSignalsToResults (const char *regex)
 
oms_status_enu_t removeSignalsFromResults (const char *regex)
 
void getTolerance (double *relativeTolerance) const
 
void getStepSize (double *initialStepSize, double *minimumStepSize, double *maximumStepSize) const
 
oms_status_enu_t setTolerance (double relativeTolerance)
 
oms_status_enu_t setFixedStepSize (double stepSize)
 
oms_status_enu_t setVariableStepSize (double initialStepSize, double minimumStepSize, double maximumStepSize)
 
double getMaximumStepSize ()
 
oms_solver_enu_t getSolver ()
 
AlgLoop * getAlgLoop (const int systemNumber)
 
oms_status_enu_t addAlgLoop (scc_t SCC, const int algLoopNum, DirectedGraph &graph, bool supportsDirectionalDerivatives)
 
oms_status_enu_t updateAlgebraicLoops (const std::vector< scc_t > &sortedConnections, DirectedGraph &graph)
 
oms_status_enu_t solveAlgLoop (DirectedGraph &graph, int loopNumber)
 
bool useThreadPool ()
 
ctpl::thread_pool & getThreadPool ()
 
std::string getUniqueID () const
 
void forceLoopsToBeUpdated ()
 
void getFilteredSignals (std::vector< Connector > &filteredSignals) const
 
bool supportsDirectionalDerivatives (int i, DirectedGraph &graph)
 returns true if all FMUs support providesDirectionalDerivative
 
Values & getValues ()
 
oms_status_enu_t configureDcpSlave (port_t port)
 
oms_status_enu_t startDcpSlave ()
 
void startDcpSlaveThread ()
 
void dcpConfigure ()
 
void dcpInitialize ()
 
void dcpDoStep (uint64_t steps)
 
void dcpSetTimeRes (const uint32_t numerator, const uint32_t denominator)
 
void dcpStop ()
 

Static Public Member Functions

static System * NewSystem (const ComRef &cref, oms_system_enu_t type, Model *parentModel, System *parentSystem)
 

Public Attributes

std::map< std::string, filesystem::path > fmuGuid
 

Protected Member Functions

 System (const ComRef &cref, oms_system_enu_t type, Model *parentModel, System *parentSystem, oms_solver_enu_t solverMethod)
 
 System (System const &copy)
 not implemented
 
System & operator= (System const &copy)
 not implemented
 

Protected Attributes

double time
 
DirectedGraph initializationGraph
 dependency graph, with all connections, solved at initialization
 
DirectedGraph eventGraph
 filtered dependency graph, without parameters, solved at event mode
 
DirectedGraph simulationGraph
 filtered dependency graph, with connections of type Real, solved at continuous time mode;
 
Clock clock
 
unsigned int clock_id
 
oms_solver_enu_t solverMethod = oms_solver_none
 
double relativeTolerance = 1e-4
 
double minimumStepSize
 
double maximumStepSize
 
double initialStepSize
 
std::unordered_map< unsigned int, unsigned int > resultFileMapping
 
std::unordered_map< ComRef, bool > exportConnectors
 

Private Member Functions

oms_status_enu_t importFromSSD_ConnectionGeometry (const pugi::xml_node &node, const ComRef &crefA, const ComRef &crefB)
 
oms_status_enu_t importBusConnectorSignals (const pugi::xml_node &node)
 
oms_status_enu_t importBusConnectorGeometry (const pugi::xml_node &node)
 
std::string getFmiVersion (const std::string &path)
 

Private Attributes

ComRef cref
 
oms_system_enu_t type
 
Model * parentModel
 
System * parentSystem
 
std::map< ComRef, System * > subsystems
 
std::map< ComRef, Component * > components
 
std::string exportName
 export name for top system and subsystem-level connector, used in the result file
 
Values values
 system level connectors, parameters and their start values defined before instantiating the FMU and external inputs defined after initialization
 
Element element
 
std::vector< Connector * > connectors
 last element is always NULL
 
std::vector< oms_element_t * > subelements
 last element is always NULL; don't free it
 
std::vector< BusConnector * > busconnectors
 
std::vector< Connection * > connections
 last element is always NULL
 
std::vector< Connection * > dcpConnections
 dummy connections to be used for setting up a DCP simulation
 
std::thread dcpThread
 
bool loopsNeedUpdate = true
 
std::vector< AlgLoop > algLoops
 vector of algebraic loop objects
 
DcpManagerSlave * dcpManager
 
UdpDriver * dcpDriver
 
OstreamLog dcpLog
 
double dcpTime = 0
 
double dcpTimeStep = 0.001
 
std::map< oms::ComRef, double * > dcpInputs
 
std::map< oms::ComRef, double * > dcpOutputs
 
std::map< oms::ComRef, valueReference_t > dcpInputValueReferences
 
std::map< oms::ComRef, valueReference_t > dcpOutputValueReferences
 
oms_status_enu_t dcpSlaveThreadReturnValue
 

Constructor & Destructor Documentation

◆ ~System()

oms::System::~System ( )
virtual

◆ System() [1/2]

oms::System::System ( const ComRef &  cref,
oms_system_enu_t  type,
oms::Model *  parentModel,
oms::System *  parentSystem,
oms_solver_enu_t  solverMethod 
)
protected
Here is the call graph for this function:

◆ System() [2/2]

oms::System::System ( System const &  copy)
protected

not implemented

Member Function Documentation

◆ addAlgLoop()

oms_status_enu_t oms::System::addAlgLoop ( scc_t  SCC,
const int  algLoopNum,
DirectedGraph &  graph,
bool  supportsDirectionalDerivatives 
)
Here is the call graph for this function:

◆ addBus()

oms_status_enu_t oms::System::addBus ( const ComRef &  cref)

< TODO: Implement bus connectors for components

Here is the call graph for this function:

◆ addConnection()

oms_status_enu_t oms::System::addConnection ( const ComRef &  crefA,
const ComRef &  crefB,
bool  suppressUnitConversion = false 
)
Here is the call graph for this function:

◆ addConnector()

oms_status_enu_t oms::System::addConnector ( const ComRef &  cref,
oms_causality_enu_t  causality,
oms_signal_type_enu_t  type 
)
Here is the call graph for this function:

◆ addConnectorToBus()

oms_status_enu_t oms::System::addConnectorToBus ( const ComRef &  busCref,
const ComRef &  connectorCref 
)
Here is the call graph for this function:

◆ addSignalsToResults()

oms_status_enu_t oms::System::addSignalsToResults ( const char *  regex)

◆ addSubModel()

oms_status_enu_t oms::System::addSubModel ( const ComRef &  cref,
const std::string &  fmuPath 
)
Here is the call graph for this function:

◆ addSubSystem()

oms_status_enu_t oms::System::addSubSystem ( const ComRef &  cref,
oms_system_enu_t  type 
)
Here is the call graph for this function:

◆ configureDcpSlave()

oms_status_enu_t oms::System::configureDcpSlave ( port_t  port)
Here is the call graph for this function:

◆ copyResources()

bool oms::System::copyResources ( )
Here is the caller graph for this function:

◆ dcpConfigure()

void oms::System::dcpConfigure ( )
Here is the caller graph for this function:

◆ dcpDoStep()

void oms::System::dcpDoStep ( uint64_t  steps)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dcpInitialize()

void oms::System::dcpInitialize ( )
Here is the caller graph for this function:

◆ dcpSetTimeRes()

void oms::System::dcpSetTimeRes ( const uint32_t  numerator,
const uint32_t  denominator 
)
Here is the caller graph for this function:

◆ dcpStop()

void oms::System::dcpStop ( )
Here is the caller graph for this function:

◆ delete_()

oms_status_enu_t oms::System::delete_ ( const ComRef &  cref)
Here is the call graph for this function:

◆ deleteAllConectionsTo()

oms_status_enu_t oms::System::deleteAllConectionsTo ( const ComRef &  cref)

◆ deleteConnection()

oms_status_enu_t oms::System::deleteConnection ( const ComRef &  crefA,
const ComRef &  crefB 
)
Here is the call graph for this function:

◆ deleteConnectorFromBus()

oms_status_enu_t oms::System::deleteConnectorFromBus ( const ComRef &  busCref,
const ComRef &  connectorCref 
)
Here is the call graph for this function:

◆ deleteReferencesInSSD()

oms_status_enu_t oms::System::deleteReferencesInSSD ( const ComRef &  cref,
const std::string &  filename 
)
Here is the call graph for this function:

◆ deleteResourcesInSSP()

oms_status_enu_t oms::System::deleteResourcesInSSP ( const std::string &  filename)

◆ doStep()

virtual oms_status_enu_t oms::System::doStep ( )
pure virtual

Implemented in oms::SystemSC, and oms::SystemWC.

◆ exportDependencyGraphs()

oms_status_enu_t oms::System::exportDependencyGraphs ( const std::string &  pathInitialization,
const std::string &  pathEvent,
const std::string &  pathSimulation 
)

◆ exportToSSD()

oms_status_enu_t oms::System::exportToSSD ( pugi::xml_node &  node,
Snapshot &  snapshot,
std::string  variantName 
) const
Here is the caller graph for this function:

◆ exportToSSD_SimulationInformation()

virtual oms_status_enu_t oms::System::exportToSSD_SimulationInformation ( pugi::xml_node &  node) const
pure virtual

Implemented in oms::SystemSC, and oms::SystemWC.

◆ exportToSSV()

oms_status_enu_t oms::System::exportToSSV ( Snapshot &  snapshot) const
Here is the call graph for this function:

◆ forceLoopsToBeUpdated()

void oms::System::forceLoopsToBeUpdated ( )
inline

◆ freeState()

oms_status_enu_t oms::System::freeState ( const ComRef &  cref)
Here is the call graph for this function:

◆ getAlgLoop()

oms::AlgLoop * oms::System::getAlgLoop ( const int  systemNumber)
Here is the caller graph for this function:

◆ getAllResources()

void oms::System::getAllResources ( std::vector< std::string > &  resources) const

◆ getBoolean()

oms_status_enu_t oms::System::getBoolean ( const ComRef &  cref,
bool &  value 
)
Here is the call graph for this function:

◆ getBusConnector()

oms::BusConnector * oms::System::getBusConnector ( const ComRef &  cref)
Here is the call graph for this function:

◆ getComponent()

oms::Component * oms::System::getComponent ( const ComRef &  cref)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getComponents()

std::map< ComRef, Component * > & oms::System::getComponents ( )
inline

◆ getConnection()

oms::Connection * oms::System::getConnection ( const ComRef &  crefA,
const ComRef &  crefB 
)

◆ getConnections() [1/2]

std::vector< Connection * > & oms::System::getConnections ( )
inline

◆ getConnections() [2/2]

oms::Connection ** oms::System::getConnections ( const ComRef &  cref)
Here is the call graph for this function:

◆ getConnector()

oms::Connector * oms::System::getConnector ( const ComRef &  cref)
Here is the call graph for this function:

◆ getConnectorOwner()

std::string oms::System::getConnectorOwner ( const ComRef &  cref) const
Here is the call graph for this function:

◆ getConnectors()

Connector ** oms::System::getConnectors ( )
inline

◆ getCref()

const ComRef & oms::System::getCref ( ) const
inline

◆ getDcpConnections()

std::vector< Connection * > & oms::System::getDcpConnections ( )
inline

◆ getDirectionalDerivative()

oms_status_enu_t oms::System::getDirectionalDerivative ( const ComRef &  unknownCref,
const ComRef &  knownCref,
double &  value 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getElement()

Element * oms::System::getElement ( )
inline

◆ getFilteredSignals()

void oms::System::getFilteredSignals ( std::vector< Connector > &  filteredSignals) const

◆ getFmiVersion()

std::string oms::System::getFmiVersion ( const std::string &  path)
private
Here is the call graph for this function:

◆ getFullCref()

oms::ComRef oms::System::getFullCref ( ) const

◆ getInitialUnknownsGraph()

const DirectedGraph & oms::System::getInitialUnknownsGraph ( )
inline

◆ getInteger()

oms_status_enu_t oms::System::getInteger ( const ComRef &  cref,
int &  value 
)
Here is the call graph for this function:

◆ getMaximumStepSize()

double oms::System::getMaximumStepSize ( )
inline

◆ getModel()

oms::Model & oms::System::getModel ( )
Here is the caller graph for this function:

◆ getOutputsGraph()

const DirectedGraph & oms::System::getOutputsGraph ( )
inline

◆ getParentSystem()

System * oms::System::getParentSystem ( ) const
inline

◆ getReal()

oms_status_enu_t oms::System::getReal ( const ComRef &  cref,
double &  value 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getReals()

oms_status_enu_t oms::System::getReals ( const std::vector< ComRef > &  crefs,
std::vector< double > &  values 
)

◆ getSolver()

oms_solver_enu_t oms::System::getSolver ( )
inline

◆ getState()

oms_status_enu_t oms::System::getState ( const ComRef &  cref)
Here is the call graph for this function:

◆ getStepSize()

void oms::System::getStepSize ( double *  initialStepSize,
double *  minimumStepSize,
double *  maximumStepSize 
) const
inline

◆ getString()

oms_status_enu_t oms::System::getString ( const ComRef &  cref,
std::string &  value 
)
Here is the call graph for this function:

◆ getSubSystems()

std::map< ComRef, System * > & oms::System::getSubSystems ( )
inline

◆ getSystem()

oms::System * oms::System::getSystem ( const ComRef &  cref)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getThreadPool()

ctpl::thread_pool & oms::System::getThreadPool ( )

◆ getTime()

double oms::System::getTime ( ) const
inline
Here is the caller graph for this function:

◆ getTolerance()

void oms::System::getTolerance ( double *  relativeTolerance) const
inline

◆ getType()

oms_system_enu_t oms::System::getType ( ) const
inline
Here is the caller graph for this function:

◆ getUniqueID()

std::string oms::System::getUniqueID ( ) const
Here is the caller graph for this function:

◆ getValues()

Values & oms::System::getValues ( )
inline

◆ getVariable()

oms::Variable * oms::System::getVariable ( const ComRef &  cref)
Here is the call graph for this function:

◆ getVariableType()

oms_status_enu_t oms::System::getVariableType ( const ComRef &  cref,
oms_signal_type_enu_t &  type 
)
Here is the call graph for this function:

◆ importBusConnectorGeometry()

oms_status_enu_t oms::System::importBusConnectorGeometry ( const pugi::xml_node &  node)
private
Here is the call graph for this function:

◆ importBusConnectorSignals()

oms_status_enu_t oms::System::importBusConnectorSignals ( const pugi::xml_node &  node)
private

◆ importFromSnapshot()

oms_status_enu_t oms::System::importFromSnapshot ( const pugi::xml_node &  node,
const std::string &  sspVersion,
const Snapshot &  snapshot,
std::string  variantName 
)
Here is the call graph for this function:

◆ importFromSSD_ConnectionGeometry()

oms_status_enu_t oms::System::importFromSSD_ConnectionGeometry ( const pugi::xml_node &  node,
const ComRef &  crefA,
const ComRef &  crefB 
)
private
Here is the call graph for this function:

◆ importFromSSD_SimulationInformation()

virtual oms_status_enu_t oms::System::importFromSSD_SimulationInformation ( const pugi::xml_node &  node,
const std::string &  sspVersion 
)
pure virtual

Implemented in oms::SystemSC, and oms::SystemWC.

◆ initialize()

virtual oms_status_enu_t oms::System::initialize ( )
pure virtual

Implemented in oms::SystemSC, and oms::SystemWC.

◆ instantiate()

virtual oms_status_enu_t oms::System::instantiate ( )
pure virtual

Implemented in oms::SystemSC, and oms::SystemWC.

◆ isConnected()

bool oms::System::isConnected ( const ComRef &  cref) const

◆ isTopLevelSystem()

bool oms::System::isTopLevelSystem ( ) const
inline

◆ isValidScalarVariable()

bool oms::System::isValidScalarVariable ( Component *  referenceComponent,
Component *  replacingComponent,
Connection *  connection,
const ComRef &  crefA,
const ComRef &  crefB,
const ComRef &  signalName,
const std::string &  path,
std::vector< std::string > &  warningList 
)
Here is the call graph for this function:

◆ listUnconnectedConnectors()

oms_status_enu_t oms::System::listUnconnectedConnectors ( char **  contents) const
Here is the call graph for this function:

◆ newResources()

oms_status_enu_t oms::System::newResources ( const ComRef &  cref,
const std::string &  ssvFilename,
const std::string &  ssmFilename = "",
bool  externalresources = false 
)
Here is the call graph for this function:

◆ NewSystem()

oms::System * oms::System::NewSystem ( const ComRef &  cref,
oms_system_enu_t  type,
oms::Model *  parentModel,
oms::System *  parentSystem 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

System & oms::System::operator= ( System const &  copy)
protected

not implemented

◆ registerSignalsForResultFile()

oms_status_enu_t oms::System::registerSignalsForResultFile ( ResultWriter &  resultFile)
virtual

Reimplemented in oms::SystemWC.

Here is the call graph for this function:

◆ removeSignalsFromResults()

oms_status_enu_t oms::System::removeSignalsFromResults ( const char *  regex)

◆ rename() [1/2]

oms_status_enu_t oms::System::rename ( const ComRef &  cref,
const ComRef &  newCref 
)

rename any component within the system

Here is the call graph for this function:

◆ rename() [2/2]

oms_status_enu_t oms::System::rename ( const ComRef &  newCref)

rename the system itself

◆ renameConnections()

oms_status_enu_t oms::System::renameConnections ( const ComRef &  cref,
const ComRef &  newCref 
)

◆ renameConnectors()

oms_status_enu_t oms::System::renameConnectors ( )

◆ replaceSubModel()

oms_status_enu_t oms::System::replaceSubModel ( const ComRef &  cref,
const std::string &  fmuPath,
bool  dryRun,
int &  warningCount 
)
Here is the call graph for this function:

◆ reset()

virtual oms_status_enu_t oms::System::reset ( )
pure virtual

Implemented in oms::SystemSC, and oms::SystemWC.

◆ setAliasName()

oms_status_enu_t oms::System::setAliasName ( const ComRef &  cref,
const std::string &  aliasName 
)

◆ setBoolean()

oms_status_enu_t oms::System::setBoolean ( const ComRef &  cref,
bool  value 
)
Here is the call graph for this function:

◆ setBusGeometry()

oms_status_enu_t oms::System::setBusGeometry ( const ComRef &  cref,
const oms::ssd::ConnectorGeometry *  geometry 
)
Here is the call graph for this function:

◆ setConnectionGeometry()

oms_status_enu_t oms::System::setConnectionGeometry ( const ComRef &  crefA,
const ComRef &  crefB,
const oms::ssd::ConnectionGeometry *  geometry 
)
Here is the call graph for this function:

◆ setConnectionLinearTransformation()

oms_status_enu_t oms::System::setConnectionLinearTransformation ( const oms::ComRef &  crefA,
const oms::ComRef &  crefB,
double  factor,
double  offset 
)
Here is the call graph for this function:

◆ setConnectorGeometry()

oms_status_enu_t oms::System::setConnectorGeometry ( const ComRef &  cref,
const oms::ssd::ConnectorGeometry *  geometry 
)
Here is the call graph for this function:

◆ setConnectorNumericType()

oms_status_enu_t oms::System::setConnectorNumericType ( const ComRef &  cref,
const oms_signal_numeric_type_enu_t  numericType 
)
Here is the call graph for this function:

◆ setExportName()

oms_status_enu_t oms::System::setExportName ( const ComRef &  cref,
const std::string &  exportName 
)

◆ setFixedStepSize()

oms_status_enu_t oms::System::setFixedStepSize ( double  stepSize)
inline

◆ setGeometry()

void oms::System::setGeometry ( const ssd::ElementGeometry &  geometry)
inline
Here is the call graph for this function:

◆ setInteger()

oms_status_enu_t oms::System::setInteger ( const ComRef &  cref,
int  value 
)
Here is the call graph for this function:

◆ setReal()

oms_status_enu_t oms::System::setReal ( const ComRef &  cref,
double  value 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRealInputDerivatives()

oms_status_enu_t oms::System::setRealInputDerivatives ( const ComRef &  cref,
int  order,
double  value 
)

◆ setReals()

oms_status_enu_t oms::System::setReals ( const std::vector< ComRef > &  crefs,
std::vector< double >  values 
)

◆ setSolver()

virtual oms_status_enu_t oms::System::setSolver ( oms_solver_enu_t  solver)
inlinevirtual

Reimplemented in oms::SystemSC, and oms::SystemWC.

◆ setState()

oms_status_enu_t oms::System::setState ( const ComRef &  cref)
Here is the call graph for this function:

◆ setString()

oms_status_enu_t oms::System::setString ( const ComRef &  cref,
const std::string &  value 
)
Here is the call graph for this function:

◆ setTolerance()

oms_status_enu_t oms::System::setTolerance ( double  relativeTolerance)
inline

◆ setUnit()

oms_status_enu_t oms::System::setUnit ( const ComRef &  cref,
const std::string &  value 
)
Here is the call graph for this function:

◆ setVariableStepSize()

oms_status_enu_t oms::System::setVariableStepSize ( double  initialStepSize,
double  minimumStepSize,
double  maximumStepSize 
)
inline

◆ solveAlgLoop()

oms_status_enu_t oms::System::solveAlgLoop ( DirectedGraph &  graph,
int  loopNumber 
)

◆ startDcpSlave()

oms_status_enu_t oms::System::startDcpSlave ( )

◆ startDcpSlaveThread()

void oms::System::startDcpSlaveThread ( )

◆ stepUntil()

virtual oms_status_enu_t oms::System::stepUntil ( double  stopTime)
pure virtual

Implemented in oms::SystemSC, and oms::SystemWC.

◆ supportsDirectionalDerivatives()

bool oms::System::supportsDirectionalDerivatives ( int  i,
DirectedGraph &  graph 
)

returns true if all FMUs support providesDirectionalDerivative

Here is the call graph for this function:

◆ terminate()

virtual oms_status_enu_t oms::System::terminate ( )
pure virtual

Implemented in oms::SystemSC, and oms::SystemWC.

◆ updateAlgebraicLoops()

oms_status_enu_t oms::System::updateAlgebraicLoops ( const std::vector< scc_t > &  sortedConnections,
DirectedGraph &  graph 
)

◆ updateDependencyGraphs()

oms_status_enu_t oms::System::updateDependencyGraphs ( )
Here is the call graph for this function:

◆ updateSignals()

oms_status_enu_t oms::System::updateSignals ( ResultWriter &  resultFile)
virtual

Reimplemented in oms::SystemWC.

Here is the call graph for this function:

◆ useThreadPool()

bool oms::System::useThreadPool ( )

◆ validCref()

bool oms::System::validCref ( const ComRef &  cref)
Here is the call graph for this function:

Member Data Documentation

◆ algLoops

std::vector<AlgLoop> oms::System::algLoops
private

vector of algebraic loop objects

◆ busconnectors

std::vector<BusConnector*> oms::System::busconnectors
private

◆ clock

Clock oms::System::clock
protected

◆ clock_id

unsigned int oms::System::clock_id
protected

◆ components

std::map<ComRef, Component*> oms::System::components
private

◆ connections

std::vector<Connection*> oms::System::connections
private

last element is always NULL

◆ connectors

std::vector<Connector*> oms::System::connectors
private

last element is always NULL

◆ cref

ComRef oms::System::cref
private

◆ dcpConnections

std::vector<Connection*> oms::System::dcpConnections
private

dummy connections to be used for setting up a DCP simulation

◆ dcpDriver

UdpDriver* oms::System::dcpDriver
private

◆ dcpInputs

std::map<oms::ComRef, double*> oms::System::dcpInputs
private

◆ dcpInputValueReferences

std::map<oms::ComRef, valueReference_t> oms::System::dcpInputValueReferences
private

◆ dcpLog

OstreamLog oms::System::dcpLog
private

◆ dcpManager

DcpManagerSlave* oms::System::dcpManager
private

◆ dcpOutputs

std::map<oms::ComRef, double*> oms::System::dcpOutputs
private

◆ dcpOutputValueReferences

std::map<oms::ComRef, valueReference_t> oms::System::dcpOutputValueReferences
private

◆ dcpSlaveThreadReturnValue

oms_status_enu_t oms::System::dcpSlaveThreadReturnValue
private

◆ dcpThread

std::thread oms::System::dcpThread
private

◆ dcpTime

double oms::System::dcpTime = 0
private

◆ dcpTimeStep

double oms::System::dcpTimeStep = 0.001
private

◆ element

Element oms::System::element
private

◆ eventGraph

DirectedGraph oms::System::eventGraph
protected

filtered dependency graph, without parameters, solved at event mode

◆ exportConnectors

std::unordered_map<ComRef, bool> oms::System::exportConnectors
protected

◆ exportName

std::string oms::System::exportName
private

export name for top system and subsystem-level connector, used in the result file

◆ fmuGuid

std::map<std::string, filesystem::path> oms::System::fmuGuid

◆ initializationGraph

DirectedGraph oms::System::initializationGraph
protected

dependency graph, with all connections, solved at initialization

◆ initialStepSize

double oms::System::initialStepSize
protected

◆ loopsNeedUpdate

bool oms::System::loopsNeedUpdate = true
private

◆ maximumStepSize

double oms::System::maximumStepSize
protected

◆ minimumStepSize

double oms::System::minimumStepSize
protected

◆ parentModel

Model* oms::System::parentModel
private

◆ parentSystem

System* oms::System::parentSystem
private

◆ relativeTolerance

double oms::System::relativeTolerance = 1e-4
protected

◆ resultFileMapping

std::unordered_map<unsigned int , unsigned int > oms::System::resultFileMapping
protected

◆ simulationGraph

DirectedGraph oms::System::simulationGraph
protected

filtered dependency graph, with connections of type Real, solved at continuous time mode;

◆ solverMethod

oms_solver_enu_t oms::System::solverMethod = oms_solver_none
protected

◆ subelements

std::vector<oms_element_t*> oms::System::subelements
private

last element is always NULL; don't free it

◆ subsystems

std::map<ComRef, System*> oms::System::subsystems
private

◆ time

double oms::System::time
protected

◆ type

oms_system_enu_t oms::System::type
private

◆ values

Values oms::System::values
private

system level connectors, parameters and their start values defined before instantiating the FMU and external inputs defined after initialization


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