Functional Mock-Up Interface Support
The Functional Mock-Up Interface (FMI) is an emerging standard for creating interfaces between different tools.
The FMI standard defines two main interfacing solutions: Model Exchange and Co-Simulation. The export from one tool to another is made through FMU files. Activate can simulate FMU blocks from the FMI-1.0 and FMI-2.0 standards, and supports both the Model-Exchange and Co-Simulation block types.
FMU Import
The FMU Import block lets you import and simulate FMU blocks.
The block is located in the palette
.The FMU block automatically detects the FMI version, 1.0 or 2.0, and FMI type, Model Exchange or Co-Simulation, and applies a simulation method accordingly. Double-clicking the FMU Import block displays the block dialog:
The block dialog lets you select and load an FMU block. Once selected, you can enter values in the fields such as the number of inputs, outputs and states, or click Reload to read the FMU block and populate the fields automatically. In the Parameters table, the FMU variables that have an editable start value are displayed. Changes to the values are incorporated before a simulation starts.
Once the dialog is populated, the FMU block can be added to a model diagram. The following example shows an FMU block in a diagram facilitating co-simulation with a hydraulics software product.
FMU Export
The FMU Export feature enables Activate super blocks to be exported as FMU modules.
- Export as FMI-2.0.
- Export FMU as Model Exchange or Co-Simulation or both.
- Internal information of the super block is hidden for IP protection.
- Internal block parameters are displayed in the FMU.
- Several fixed-step and variable-step solvers can be exported into the FMI for co-simulation.
- Exported FMU can be imported into Activate or any other FMI compatible tool.
- Signal import blocks such as ReadfromMat and SignalIn.
- Signal export blocks such as WritetoMat and SignalOut.
- Signal Viewer blocks such as Scope and Display.
- Co-simulation blocks such as MotionSolve and Spice.
- Memory block is not supported.
FMU Export with Documentation
Issue the OML command to export FMU information in an .html file.
When exporting an FMU, you can generate and include an .html file with a description of the super block in the FMU. The description that is exported is the model report of the super block diagram.
By default, the .html page is not generated. To enable this feature, in the OML Command
Window, enter: setenv('Activate_FMU_export_DOC','true')
FMU Export on Linux Platforms
FMU exporting on Linux requires ld version 2.27 or greater.
To export an FMU in Activate on Linux platforms, the
compilation and linking of the C code requires ld version 2.27 or greater. You can ensure
that you are working with a compatible version of ld by installing or updating Binutils with
the command: yum install binutils
.
FMU Editor
The FMU Editor lets you interact within the hierarchy of an FMU, hide or expose variables and attributes to customize information for a particular audience, and save and export a customized FMU.