simulation_framework::core::lifecycle::IFmuLogic Class Reference
Last update: 16.07.2025The interface for FMU Logic to be used by an FMU activity. More...
#include <i_fmu_logic.h>

Public Member Functions | |
| virtual void | SetupExperiment (double start=0, double stop=0, double tolerance=0)=0 |
Call fmi2SetupExperiment | |
| virtual void | EnterInitialization ()=0 |
Call fmi2EnterInitializationMode | |
| virtual void | ExitInitialization ()=0 |
Call fmi2ExitInitializationMode | |
| virtual void | Setup (double start=0, double stop=0, double tolerance=0)=0 |
| Call SetupExperiment, EnterInitialization, and ExitInitialization. | |
| virtual bool | Step (double step_size)=0 |
Step the FMU model for given step size by calling fmi2DoStep | |
| virtual FmuInOutMap | InitInOutMap (std::set< std::string > variable_names)=0 |
| Use the internal implementation to initialize the inputs or outputs with the correct underlying type. | |
| virtual bool | Step (double step_size, const FmuInOutMap &input)=0 |
Set the fmu inputs and step the FMU model for given step size by calling fmi2DoStep | |
| virtual void | SetInputs (const FmuInOutMap &inputs)=0 |
| Set the fmu inputs. | |
| virtual FmuInOutMap | GetOutputs () const =0 |
| Get all fmu outputs. | |
| virtual void | GetOutputs (FmuInOutMap &requested_outputs) const =0 |
| Get a subset of the fmu outputs. | |
Detailed Description
The interface for FMU Logic to be used by an FMU activity.
An implementation of this class can be used from a high level to control the execution of an FMU. Currently this interface is designed for FMU co-simulation.
Definition at line 25 of file i_fmu_logic.h.
Member Function Documentation
◆ EnterInitialization()
Call fmi2EnterInitializationMode
Implemented in simulation_framework::core::lifecycle::FmuLogic.
◆ ExitInitialization()
Call fmi2ExitInitializationMode
Implemented in simulation_framework::core::lifecycle::FmuLogic.
◆ GetOutputs() [1/2]
|
pure virtual |
Get all fmu outputs.
- Returns
- The map of outputs, where keys are variable name, and the value is the variable value
Implemented in simulation_framework::core::lifecycle::FmuLogic.
◆ GetOutputs() [2/2]
|
pure virtual |
Get a subset of the fmu outputs.
- Parameters
-
[in,out] requested_outputs The map of requested outputs, whose keys are already set to the requested subset of variables. The values will contain the output variable values.
Implemented in simulation_framework::core::lifecycle::FmuLogic.
◆ InitInOutMap()
|
pure virtual |
Use the internal implementation to initialize the inputs or outputs with the correct underlying type.
- Parameters
-
variable_names A set of strings of variable names to initialize
- Returns
- The map of variables with the values being initialized to the correct std::variant type
Implemented in simulation_framework::core::lifecycle::FmuLogic.
◆ SetInputs()
|
pure virtual |
Set the fmu inputs.
- Parameters
-
inputs The map of inputs to set where keys are variable name, and the value is the variable value
Implemented in simulation_framework::core::lifecycle::FmuLogic.
◆ Setup()
|
pure virtual |
Call SetupExperiment, EnterInitialization, and ExitInitialization.
- Parameters
-
start The fixed initial value of the independent variable stop The final value of the independent variable tolerance The tolerance when using a numerical integration scheme. Can be ignored for co-simulation.
Implemented in simulation_framework::core::lifecycle::FmuLogic.
◆ SetupExperiment()
|
pure virtual |
Call fmi2SetupExperiment
- Parameters
-
start The fixed initial value of the independent variable stop The final value of the independent variable tolerance The tolerance when using a numerical integration scheme. Can be ignored for co-simulation.
Implemented in simulation_framework::core::lifecycle::FmuLogic.
◆ Step() [1/2]
|
pure virtual |
Step the FMU model for given step size by calling fmi2DoStep
- Parameters
-
step_size The update interval of the independent variable
- Returns
- A boolean value indicating whether the step was successful
Implemented in simulation_framework::core::lifecycle::FmuLogic.
◆ Step() [2/2]
|
pure virtual |
Set the fmu inputs and step the FMU model for given step size by calling fmi2DoStep
- Parameters
-
step_size The update interval of the independent variable input The map of inputs to set where keys are variable name, and the value is the variable value
- Returns
- A boolean value indicating whether the step was successful
Implemented in simulation_framework::core::lifecycle::FmuLogic.
The documentation for this class was generated from the following file: