Skip to main content

AVxcelerate Simulation Framework 2025 R2 SP02

i_fmu_logic

Last update: 19.09.2025
1
3
4#pragma once
5
6#include "core/lifecycle/fmu_activity/fmu_config.h"
7#include <set>
8#include <string>
9
15{
16namespace core
17{
18
19namespace lifecycle
20{
21
26{
27 public:
28 virtual ~IFmuLogic() = default;
29
34 virtual void SetupExperiment(double start = 0, double stop = 0, double tolerance = 0) = 0;
35
37 virtual void EnterInitialization() = 0;
38
40 virtual void ExitInitialization() = 0;
41
46 virtual void Setup(double start = 0, double stop = 0, double tolerance = 0) = 0;
47
51 virtual bool Step(double step_size) = 0;
52
56 virtual FmuInOutMap InitInOutMap(std::set<std::string> variable_names) = 0;
57
62 virtual bool Step(double step_size, const FmuInOutMap& input) = 0;
63
66 virtual void SetInputs(const FmuInOutMap& inputs) = 0;
67
70 virtual FmuInOutMap GetOutputs() const = 0;
71
75 virtual void GetOutputs(FmuInOutMap& requested_outputs) const = 0;
76};
77
78} // namespace lifecycle
79} // namespace core
80} // namespace simulation_framework
This is the concrete Topic class that can be used for creation of a communication channel with given ...
Definition topic.h:38
The interface for FMU Logic to be used by an FMU activity.
Definition i_fmu_logic.h:26
virtual void SetInputs(const FmuInOutMap &inputs)=0
Set the fmu inputs.
virtual void SetupExperiment(double start=0, double stop=0, double tolerance=0)=0
Call fmi2SetupExperiment
virtual void EnterInitialization()=0
Call fmi2EnterInitializationMode
virtual void Setup(double start=0, double stop=0, double tolerance=0)=0
Call SetupExperiment, EnterInitialization, and ExitInitialization.
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 FmuInOutMap GetOutputs() const =0
Get all fmu outputs.
virtual void GetOutputs(FmuInOutMap &requested_outputs) const =0
Get a subset of the fmu outputs.
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 bool Step(double step_size)=0
Step the FMU model for given step size by calling fmi2DoStep
virtual void ExitInitialization()=0
Call fmi2ExitInitializationMode
The namespace for all core functionalities under namespace simulation_framework.
The top namespace for simulation framework.

Connect with Ansys