Skip to main content

AVxcelerate Simulation Framework 2026 R1 SP01

Class simulation_framework::core::lifecycle::IFmuLogic

Last update: 22.04.2026

Definition: core/lifecycle/fmu_activity/i_fmu_logic.h (line 28)

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.

Inherited by:

Members

Public functions

Function ~IFmuLogic

virtual simulation_framework::core::lifecycle::IFmuLogic::~IFmuLogic()=default

Return type:

Function SetupExperiment

virtual void simulation_framework::core::lifecycle::IFmuLogic::SetupExperiment(double start=0, double stop=0, double tolerance=0)=0

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.

Parameters:

Return type: void

Reimplemented by:

Function EnterInitialization

virtual void simulation_framework::core::lifecycle::IFmuLogic::EnterInitialization()=0

Call fmi2EnterInitializationMode

Return type: void

Reimplemented by:

Function ExitInitialization

virtual void simulation_framework::core::lifecycle::IFmuLogic::ExitInitialization()=0

Call fmi2ExitInitializationMode

Return type: void

Reimplemented by:

Function Setup

virtual void simulation_framework::core::lifecycle::IFmuLogic::Setup(double start=0, double stop=0, double tolerance=0)=0

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.

Parameters:

Return type: void

Reimplemented by:

Function Step

virtual bool simulation_framework::core::lifecycle::IFmuLogic::Step(double step_size)=0

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

Parameters:

Return type: bool

Reimplemented by:

Function InitInOutMap

virtual FmuInOutMap simulation_framework::core::lifecycle::IFmuLogic::InitInOutMap(std::set< std::string > variable_names)=0

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

Parameters:

  • std::set< std::string > variable_names

Return type: FmuInOutMap

Reimplemented by:

Function Step

virtual bool simulation_framework::core::lifecycle::IFmuLogic::Step(double step_size, const FmuInOutMap &input)=0

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

Parameters:

Return type: bool

Reimplemented by:

Function SetInitializationParams

virtual void simulation_framework::core::lifecycle::IFmuLogic::SetInitializationParams(const FmuInOutMap &params)=0

Set the fmu initialization parameters.

Parameters:

  • params: The map of initialization parameters to set where keys are variable name, and the value is the variable value

Parameters:

  • const FmuInOutMap & params

Return type: void

Reimplemented by:

Function SetInputs

virtual void simulation_framework::core::lifecycle::IFmuLogic::SetInputs(const FmuInOutMap &inputs)=0

Set the fmu inputs.

Parameters:

  • inputs: The map of inputs to set where keys are variable name, and the value is the variable value

Parameters:

  • const FmuInOutMap & inputs

Return type: void

Reimplemented by:

Function GetOutputs

virtual FmuInOutMap simulation_framework::core::lifecycle::IFmuLogic::GetOutputs() const =0

Get all fmu outputs.

Returns:

The map of outputs, where keys are variable name, and the value is the variable value

Return type: FmuInOutMap

Reimplemented by:

Function GetOutputs

virtual void simulation_framework::core::lifecycle::IFmuLogic::GetOutputs(FmuInOutMap &requested_outputs) const =0

Get a subset of the fmu outputs.

Parameters:

  • 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.

Parameters:

  • FmuInOutMap & requested_outputs

Return type: void

Reimplemented by:

Function GetFmuState

virtual FmuState simulation_framework::core::lifecycle::IFmuLogic::GetFmuState() const =0

Get the Fmu state.

Returns:

The current FmuState enum value

Return type: FmuState

Reimplemented by:

Connect with Ansys