Skip to content

FMU (Export)

Symbol

Description

Represents the FMU export block used to package a SIMBA design as an FMI 3.0 Co-Simulation FMU.

  • West-side pins named outputs[i] represent FMU outputs: signals entering this block and sent to the FMI master.
  • East-side pins named inputs[i] represent FMU inputs: signals received from the FMI master and leaving this block.

Pin count and geometry are recomputed when parameters NumberOfFMUInputs or NumberOfFMUOutputs changes.

Important

Generation of the FMU is disabled in python API aesim.simba.

License:

The cosimulation with the generated FMU will require an active SIMBA license. Different ways of providing the license to the FMI runtime are possible:

  • The cosimulation is executed in an environment where SIMBA is locally activated.
  • The FMU exposes a string parameter named simba_deployment_key. This parameter can be set before export and is embedded in the FMU metadata. During the cosimulation, at the instantiation of the FMU, the FMI runtime uses this parameter as a deployment key to activate SIMBA in the hosting environment.
  • The hosting environment of the cosimulation has the SIMBA_DEPLOYMENT_KEY environment variable set with a valid deployment key.

If an FMI master later calls fmi3SetString for simba_deployment_key, the call is ignored and logged.

Important

The deployment key is stored in clear text in FMUs. Exported FMUs should therefore be handled as sensitive files.

Time management principle and implications:

The FMI master drives simulation time through fmi3DoStep. End time and Time step setting of the FMU design are send to the master as default experiment settings in modelDescription.xml, but the master has the final word on time management and may ignore these settings.

The FMU exposes the independent time variable simba_time.

Important

Communication step size selection (from the master) can affect numerical behavior and discrete sampling interactions.

Logging:

The FMU provides logging information to the FMI master through the FMI logging callback. The amount of information provided depends on the SIMBA log level and on the FMI master's use of log categories. The following categories are available: * logStatusWarning: Log messages when returning fmi3Warning * logStatusError: Log messages when returning fmi3Error * logStatusFatal: Log messages when returning fmi3Fatal * FMI: Internal FMI interface logging

Current FMI perimeter:

This FMU targets FMI 3.0 Co-Simulation only. It supports Float64 exchange for inputs, outputs, numeric parameters, and time, plus the string parameter simba_deployment_key. Model Exchange, Scheduled Execution, and most non-Float64, state, derivative, and clock APIs are not supported in the current implementation.

For FMI concepts, see https://fmi-standard.org/.

Library

Control > FMI

Pins

Name Description

Parameters

Name Description
NumberOfFMUInputs Number of FMU input variables.
NumberOfFMUOutputs Number of FMU output variables.
DeploymentKey Optional deployment key embedded in the exported FMU metadata. When set, this key is used by the FMI runtime before falling back to environment variables.
SamplingTime -none or 0: No sampling. The system will be solved in the Newton loop (default).
-auto: Inherit the sampling time of its source device.
-Sampling Period: defined in seconds.