Tools

The INTO-CPS toolchain consists of several tools for developing Cyber-Physical Systems. These tools provide functionality needed to enable FMI based co-simulation namely as Creating new FMUs, verify and Performing Co-Simulations the simulation of FMUs. To keep the infrastructure as lightweight and flexible as possible the projects are hosted independently in their own repositories and provide standalone documentation.

A list of the tools and, grouped by the functionality they provide, can be found below:

Performing Co-Simulations

INTO-CPS Desktop Application

The INTO-CPS Desktop Application provides a graphical user interface which can be used to configure and orchestrate co-simulation scenarios. Install instruction are found in the application’s documentation.

INTO-CPS Cloud Application

The INTO-CPS Cloud Application is a port of the Desktop Application to run in a cloud environment.

Modelio

Modelio is a combined UML/BPMN modeler supporting a wide range of models and diagrams. Its main features are:

  • SysML support integrated with UML and BPMN
  • XMI import and export
  • Scripting language support (Jython)
  • Extensibility: Modelio can be extended for any language, methodology or modeling technique just by adding modules. You can either use existing modules or else develop your own.
_images/tools_modelio.jpg

In addition, to its general purpose use, a special SysML profile allows Modelio to be used to setup co-simulation scenarios that can be executed within the INTO-CPS Desktop Application. For information on how to use this integration see Desktop Application Modelio integration

License

Modelio is open source software. Most of the source code is under the GNU GPL license. The module runtime, used to develop extensions to Modelio, is under the Apache license providing a very large degree of freedom to anyone wishing to reuse and embed the code.

Full details on Modelio licensing conditions can be found here.

Download and Installation

Modelio’s current version is 3.4.0.

Binary distribution archives for Linux and Windows are available on the download page of the Modelio community site.

Installation requirements and instructions can be found in our Quick start guide on the community site.

Modelio version contents can be found in the [[Version history]].

Installing INTO-CPS support

A specific project have been created into Modelio.org forge http://forge.modelio.org/projects/intocps.

This latter will help you with:

To be able to use INTO-CPS extension into Modelio you have to first install the INTO-CPS module which is available here:

http://forge.modelio.org/projects/intocps-modelio34/files.

and then add it to the Modelio module catalog.

Add INTO-CPS Extension

1

Key:

  1. Run the Configuration 2 Modules catalog… command.
  2. To add a module, click on Add a module to the catalog… and use the file browser to select the modules (*.jmdac files).
  3. To remove a module, select the module in question and click on the Remove module from the catalog button.
  4. To download new versions of modules into the catalog, click on Check for new versions….
Installing modules in a project

3

Installing a module in a project

Steps:

  1. Click on [4] to expand the Modules catalog.
  2. In the Modules catalog, select the module you want to install.
  3. Click on [5] to install the module in the project..

Connection Export

  • How to export the configuration of a BlockInstance.

To generate a configuration from a BlockInstance, select the desired blockInstance, right click on it and in the INTO-CPS entry choose Generate configuration, as shown in sysml-generateconfig.

Choose a relevant name sysml-configuration-name and click on Generate.

FMU Import/Export

Two commands have been implemented in order to link SysML modelling and FMI definition i.e. the modeldescription.xml file defined inside the FMI 2.0 Specification.

FMI Import
  • This command imports the modelDescription.xml document describing the interface of a FMI and created an corresponding SysML Block under Modelio.
  • Importing is easily done via the right click content menu, under a Package, as shown on the screenshot below.

reversefmi

FMI Export
  • This only exports the modelDescription.xml document describing the interface of a FMI and not its behavior.
  • Exporting is easily done via the right click content menu, under a SysML Block, as shown on the screenshot below.

generatefmi

Maestro

Maestro is a tool for orchestrating co-simulation of FMUs. It features both a command line interface and a web interface. The web interface is used internally by the INTO-CPS Desktop Application, but it can also be downloaded and used seperately.

All development efforts related to Maestro is available at https://github.com/INTO-CPS-Association/maestro.
Maestro1 Documentation is available here: https://into-cps-maestro.readthedocs.io/en/docs/
Maestro2 is currently under development and available at the branch 2.0.0-alpha with documentation here: https://into-cps-maestro.readthedocs.io/en/latest/.

Creating new FMUs

Several commercial and open-source tools exist, that are enables the creation of FMUs. An comprehensive list of these can be found in the tools section on the FMI-standard’s website.

Below is a list of tools that are part of INTO-CPS that supports FMI export.

Overture

The Overture community supports the modelling method The Vienna Development Method (VDM) which is a set of modelling techniques that have a long and successful history in both research and industrial application in the development of computer-based systems. The Overture Tool is an open-source integrated development environment (IDE) for developing and analysing VDM models. The tool suite is written entirely in Java and built on top of the Eclipse platform.

_images/tools_overture.png

By installing a plugin, Overture can export its models as plain C-code and as standalone FMUs that can be imported into a FMI compatible simulation tool such as the INTO-CPS Desktop Application.

PyFMU

PyFMU is a command line program that enables the rapid development of FMUs using Python.

20-sim

20-sim is a modeling and simulation program for mechatronic systems. With 20-sim you can enter model graphically, similar to drawing an engineering scheme. With these models you can simulate and analyze the behavior of multi-domain dynamic systems and create control systems. You can even generate C-code and run this code on hardware for rapid prototyping and HIL-simulation.

_images/tools_20sim.jpg

FMI support for INTO-CPS is provided using a code generation template.

Note

For 20-sim 4.5, this template can be downloaded from our GitHub repository and the installation instructions can be found in the included README file. Starting with 20-sim 4.6, the template is available out of the box.

Instructions on how to set up automated compilation of the .fmu are given under the section External dependencies in the above README file.

OpenModelica

OpenModelica is an open-source Modelica-based modeling and simulation environment intended for industrial and academic usage.

_images/tools_openmodelica.png

The short-term goal is to develop an efficient interactive computational environment for the Modelica language, as well as a rather complete implementation of the language. It turns out that with support of appropriate tools and libraries, Modelica is very well suited as a computational language for development and execution of both low level and high level numerical algorithms, e.g. for control system design, solving nonlinear equation systems, or to develop optimization algorithms that are applied to complex applications.

The longer-term goal is to have a complete reference implementation of the Modelica language, including simulation of equation based models and additional facilities in the programming environment, as well as convenient facilities for research and experimentation in language design or other research activities. However, our goal is not to reach the level of performance and quality provided by current commercial Modelica environments that can handle large models requiring advanced analysis and optimization by the Modelica compiler.

Documentation

The OpenModelica users guide as pdf or epub or as html. The OpenModelica API documentation. More documentation can be found here.

Export an FMU from OpenModelica

To export an FMU from a Modelica model one can use a exportFMU.mos script:

One can run the exportFMU.mos script via the omc[.exe] executable.
On Windows:
%OPENMODELICAHOME%\bin\omc exportFMU.mos
On Linux (if OpenModelica is installed via apt-get):
omc exportFMU.mos
On MacOS X:
omc exportFMU.mos

Documentation of the function translateModelFMU.

Verifying compliance of FMUs

To maximize compatibility between an FMU and existing simulation tools it is import to ensure strict compliance to the FMI standard. Unfortunately, the current situation is less that ideal, since a large portion of FMUs encountered do not implement the standard correctly.

FMIChecker

_images/tools_fmichecker.png

The FMIChecker is a command line tool that provides thorough static check of FMUs. Install instructions can be found on the GitHub Repository. Alternatively, the tool can be accessed at this webpage, eliminating the need to install the tool.

RT-Tester

Core

RT-Tester is a test automation tool for automatic test generation, test execution and real-time test evaluation. Key features include a strong C/C++-based test script language, high performance multi-threading, and hard real-time capability. The tool has been successfully applied in avionics, rail automation, and automotive test projects.

More information is available on the product web site here.

Model Based Extension (RTT-MBT)

RT-Tester Model Based Test Case and Test Data Generator (RTT-MBT) supports model-based testing (MBT), that is, automated generation of test cases, test data, and test procedures from UML/SysML models. A number of common modelling tools can be used as front-end for this. The derived test procedures use the RT-Tester Core as a back-end, allowing the system under test to be provided on real hardware, software only, or even just simulation to aid test model development. RTT-MBT includes requirement tracing from test models down to test executions and allows for powerful status reporting in large scale testing projects. More information is available on the product web site here.

FMI/FMU support for RT-Tester / RTT-MBT

The RTT-MBT component is catering for FMI/FMU by a specialised feature release that allows to cast a test procedures to an FMI2-compliant FMU. That FMU is in input to the COE.

Downloads

In order to operate properly, it is necessary to first obtain the prerequisite tools Python-2.7 and gcc-4.9_v2. An installer collection is available for Windows via GitHub from here.

RT-Tester Core, RTT-MBT, RTTUI3, and prepared example projects can be downloaded and installed by one click (on Windows) using the VSI_bundle_v0_1_1.exe file. This file can be downloaded via GitHub from here.

Updates of the installers will be available at the same URL & GitHub repository.

Interfacing

RabbitMQ FMU

RabbitMQ FMU provides a way to bring external data into an FMI co-simulation.