Skip to content

Commit cb20dc0

Browse files
committed
2 parents 798175d + fc729a8 commit cb20dc0

33 files changed

+534
-168
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/target/
1+
target/
2+

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# INTO-CPS SysML Profile for Modelio Open Source
2+
3+
The **INTO-CPS SysML Profile for Modelio** is an open-source module that extends the SysML language within the Modelio UML tool. This module provides specialized features for modeling and simulating cyber-physical systems (CPS) using the INTO-CPS (Integrated Toolchain for Model-based Design of Cyber-Physical Systems) framework. It is particularly useful for defining and configuring Functional Mock-up Units (FMUs) and generating simulation configurations for the Maestro co-simulation engine.
4+
5+
## Features
6+
7+
- **Architecture Diagram**: Model ports for FMI (Functional Mock-up Interface) input and output parameters. This helps define simulators and their interfaces.
8+
- **Connections Diagram**: Create instance diagrams to model connections between FMI input and output parameters. Suitable for generating Maestro simulation configuration JSON files.
9+
- **Design Space Exploration (DSE)**: Support for modeling parameters related to Design Space Exploration.
10+
- **FMI Model Description Import/Export**: Import and export FMI model descriptions to facilitate interoperability with other tools.
11+
- **Co-Simulation Configuration Export**: Export co-simulation JSON configurations for the [Maestro](https://into-cps-maestro.readthedocs.io/en/latest/user/getting-started.html) simulation engine.
12+
13+
## Documentation and Resources
14+
15+
- **Installation**: [install INTO-CPS module to Modelio](doc/Installation.md)
16+
- **Quick Guide**: [INTO-CPS Modelio features](doc/QuickGuide.md)
17+
- **Examples**: Examples are avalable in the [INTO-CPS application](https://into-cps-association.readthedocs.io/projects/desktop-application/en/latest/first_steps.html) in the SysML area for each example . Additional documentation will be migrated to this repository. Stay tuned for updates.
18+
19+
## TODO
20+
21+
> **Note**: Links in the documentation (e.g., forge.modelio.org) are outdated. All relevant information will be migrated to this repository.
22+
23+
1. **Module Migration**: Update the module to be compatible with the latest version of Modelio Open Source (5.4.00).
24+
2. **Documentation Migration**: Migrate all documentation, examples, and guides to this repository for easier access and maintenance.
25+
3. **Bug Fixes and Enhancements**: Address any known issues and add new features based on user feedback.
26+
27+
## Contributing
28+
29+
We welcome contributions from the community! If you'd like to contribute to the development of this module, please follow these steps:
30+
31+
1. Fork the repository.
32+
2. Create a new branch for your feature or bug fix.
33+
3. Make your changes and ensure they are well-documented.
34+
4. Submit a pull request with a detailed description of your changes.
35+
36+
## License
37+
38+
This project is licensed under the [INTO-CPS (GPL3) License](LICENSE). Feel free to use, modify, and distribute it as needed.
39+
40+
## Support
41+
42+
For questions, issues, or feature requests, please open an issue in this repository or contact the maintainers directly.
43+
44+
---
45+
46+
Thank you for using the **INTO-CPS SysML Profile for Modelio**! We hope this tool is helping you with your cyber-physical systems modeling and simulation workflows.

doc/Installation.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# INTO-CPS module for Modelio
2+
3+
4+
## Description
5+
6+
**Modelio** is a powerful, open-source modeling tool that supports **UML**, **BPMN**, and **SysML** for system modeling. It is highly extensible, allowing users to add custom modules or use existing ones to tailor the tool to their specific needs.
7+
8+
### Key Features:
9+
- **SysML support**: Integrated with UML and BPMN for comprehensive system modeling.
10+
- **XMI import/export**: Enables interoperability with other modeling tools.
11+
- **Scripting support**: Built-in Jython scripting for automation and customization.
12+
- **Extensibility**: Add modules to support additional languages, methodologies, or modeling techniques.
13+
14+
For community support, visit the [Modelio Forum](http://www.modelio.org/forum/index.html).
15+
16+
## License
17+
Modelio is **open-source software**. The core application is licensed under the **GNU GPL**, while the module runtime (used for developing extensions) is licensed under the **Apache License**. This provides flexibility for reuse and embedding.
18+
19+
For full licensing details, visit the [Modelio License Page](http://www.modelio.org/about-modelio/license.html).
20+
21+
---
22+
23+
## Download and Installation
24+
25+
### Current Version
26+
The latest stable version of Modelio is **5.4.1**.
27+
28+
### Download
29+
Binary distributions for **Windows** and **Linux** are available on the [Modelio Download Page](http://www.modelio.org/downloads/download-modelio.html).
30+
31+
### Installation Instructions
32+
1. Download the appropriate binary archive for your operating system.
33+
2. Extract the archive to your desired installation directory.
34+
3. Follow the instructions in the [Modelio Quick Start Guide](https://github.com/ModelioOpenSource/Modelio/wiki) for setup and configuration.
35+
36+
For version-specific details, refer to the [Modelio Version History](https://github.com/ModelioOpenSource/Modelio/releases).
37+
38+
---
39+
40+
## Installing the INTO-CPS Module
41+
42+
The **INTO-CPS module** extends Modelio's capabilities for system modeling, particularly for cyber-physical systems.
43+
44+
### Resources
45+
- **Documentation**: [INTO-CPS Documentation](todo) *(link to be updated)*.
46+
- **Latest Releases**: [INTO-CPS Releases](https://github.com/INTO-CPS-Association/sysml-profile/releases).
47+
- **Issue Reporting**: [Report an Issue](https://github.com/INTO-CPS-Association/sysml-profile/issues/new).
48+
49+
### Installation Steps
50+
1. Download the latest INTO-CPS module (`.jmdac` file) from the [Releases Page](https://github.com/INTO-CPS-Association/sysml-profile/releases).
51+
2. Add the module to the Modelio module catalog.
52+
53+
---
54+
55+
## Adding the INTO-CPS Module to Modelio
56+
57+
### Step 1: Open the Modules Catalog
58+
1. Launch Modelio.
59+
2. Navigate to **Configuration** > ![2] **Modules Catalog...**.
60+
61+
![1]
62+
63+
### Step 2: Add the Module
64+
1. Click **Add a module to the catalog...**.
65+
2. Use the file browser to locate and select the downloaded `.jmdac` file.
66+
3. Click **OK** to add the module to the catalog.
67+
68+
### Step 3: Install the Module in a Project
69+
70+
71+
72+
1. Open or create a project in Modelio.
73+
2. Expand the **Modules Catalog** by clicking the [![4]] icon.
74+
3. Select the **INTO-CPS module** from the catalog.
75+
4. Click the [![5]] icon to install the module in your project.
76+
77+
![3]
78+
79+
[1]: img/module_catalog.png
80+
[2]: img/modulecatalog.png
81+
[3]: img/en-installingmodules.png
82+
[4]: img/maximize.png
83+
[5]: img/add.png
84+
85+
86+
---
87+
88+
## Modelio Documentation
89+
For further guidance, refer to the following resources:
90+
- [Modelio User Manual](https://github.com/ModelioOpenSource/Modelio/wiki/Modelio-User-Documentation) *(wiki)*.
91+
- [Installing and Configuring Modules](https://github.com/ModelioOpenSource/Modelio/wiki/Modeler-_modeler_managing_projects_configuring_project_modules) *(wiki)*.
92+
93+
---

doc/QuickGuide.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# INTO-CPS Diagrams
2+
3+
Two specialized diagrams have been defined within the INTO-CPS project to support system modeling:
4+
5+
---
6+
7+
## 1. Architecture Diagram
8+
- **Purpose**: Specializes the SysML block diagram to specify a system's architecture in terms of its components.
9+
- **Creation**:
10+
1. Right-click on a **Package** in the Modelio project explorer.
11+
2. Select **Create Diagram** > **Architecture Diagram** from the context menu.
12+
3. Name the diagram and start defining the system architecture.
13+
14+
![1]
15+
16+
*Screenshot: Creating an Architecture Diagram.*
17+
18+
---
19+
20+
## 2. Connection Diagram
21+
- **Purpose**: Specializes the SysML internal block diagram to describe the internal configuration and connections between system components.
22+
- **Creation**:
23+
1. Right-click on a **SysML Block** in the Modelio project explorer.
24+
2. Select **Create Diagram** > **Connection Diagram** from the context menu.
25+
3. Name the diagram and define the internal connections.
26+
27+
![2]
28+
29+
*Screenshot: Creating a Connection Diagram.*
30+
31+
---
32+
33+
34+
35+
# FMI Features
36+
37+
The INTO-CPS module provides two commands to integrate SysML modeling with the **Functional Mock-up Interface (FMI)** standard, specifically the `modelDescription.xml` file defined in the [FMI 2.0 Specification][5].
38+
39+
---
40+
41+
## 1. FMI Import
42+
- **Purpose**: Imports a `modelDescription.xml` file to create a corresponding SysML Block in Modelio.
43+
- **Steps**:
44+
1. Right-click on a **Package** in the Modelio project explorer.
45+
2. Select **INTO-CP module** > **Reverse FMI** from the context menu.
46+
3. Browse and select the `modelDescription.xml` file to import.
47+
48+
![3]
49+
50+
*Screenshot: Importing an FMI file.*
51+
52+
---
53+
54+
## 2. FMI Export
55+
- **Purpose**: Exports a SysML Block as a `modelDescription.xml` file. Note that this only exports the interface description, not the behavior.
56+
- **Steps**:
57+
1. Right-click on a **SysML Block** in the Modelio project explorer.
58+
2. Select **INTO-CPS module** > **Generate FMI** from the context menu.
59+
3. Choose the destination folder and save the file.
60+
61+
![4]
62+
63+
*Screenshot: Exporting an FMI file.*
64+
65+
---
66+
67+
# Connection Export
68+
69+
## Generating a Configuration from a BlockInstance
70+
- **Purpose**: Exports the configuration of a `BlockInstance` as a Maestro co-simulation configuration file in JSON format.
71+
- **Steps**:
72+
1. Select the desired `BlockInstance` in the Modelio project explorer.
73+
2. Right-click and choose **INTO-CPS** > **Generate Configuration**.
74+
3. Provide a relevant name for the configuration file.
75+
4. Click **Generate** to create the JSON file.
76+
77+
![6]
78+
79+
*Screenshot: Generating a configuration.*
80+
81+
![7]
82+
83+
*Screenshot: Naming the configuration file.*
84+
85+
---
86+
87+
## References
88+
- [FMI 2.0 Specification][5]: Official documentation for the Functional Mock-up Interface standard.
89+
90+
[1]: img/architecture.png
91+
[2]: img/connection.png
92+
[3]: img/reversefmi.png
93+
[4]: img/generatefmi.png
94+
[5]: https://www.fmi-standard.org/downloads
95+
[6]: img/sysml-generateconfig.png
96+
[7]: img/sysml-configuration-name.png
97+
98+
---
99+

doc/UsersGuide.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Modelio for INTO-CPS SysML modelling
2+
3+
The Modelio tool and its SysML/INTO-CPS
4+
profile extension provide the diagramming starting point. This section describes the Modelio extension that provides INTO-CPS-specific modelling
5+
functionality to the SysML modelling approach.
6+
7+
The INTO-CPS extension module is based on the Modelio SysML extension
8+
module, and extends it in order to fulfill INTO-CPS modelling requirements
9+
and needs. Figure 28 shows an example of a simple INTO-CPS Architecture
10+
Structure Diagram under Modelio. This diagram shows a _System_, named
11+
“System” (An abstract description of an INTO-CPS multi-model)
12+
, composed of two EComponents of kind _Subsystem_, named “SubSystem” (Abstract descriptions of INTO-CPS constituent models). These Subsystems have an internal Variable called “variable” of type String and expose two FlowPorts named “portIn” and “portOut”. The
13+
type of data going through these ports is respectively defined by types In and Out of kind StrtType.
14+
15+
![Example INTO-CPS multi-model](img/ug28_multimodel.png)
16+
17+
Figure 28: Example INTO-CPS multi-model.
18+
19+
Figure 29 illustrates the main graphical interface after Modelio and the
20+
INTO-CPS extension have been installed. Of all the panes, the following
21+
three are most useful in the INTO-CPS context.
22+
23+
1. The Modelio model browser, which lists all the elements of your model in tree form.
24+
2. The diagram editor, which allows you to create INTO-CPS design architectures and connection diagrams.
25+
3. The INTO-CPS property page, in which values for properties of INTOCPS subsystems are specified.
26+
27+
![Modelio for INTO-CPS](img/ug29_modeliogui.png)
28+
29+
30+
## Creating a New Project
31+
32+
first step will be to create, as depicted in Figure 30, a Modelio project:
33+
1. Launch Modelio.
34+
2. Click on File → Create a project....
35+
3. Enter the name of the project.
36+
4. Enter the description of the project.
37+
6. Click on Create to create and open the project.
38+
39+
40+
![alt text](img/ug30_newproject.png)
41+
42+
Once you have successfully created a Modelio project, you have to install the Modelio extensions required for INTO-CPS modelling, i.e. both Modelio SysML and INTO-CPS extensions, as described in the [installation guide](Installation.md)
43+
44+
If both modules have been correctly installed, you should be able to create,
45+
under any package, an **INTO-CPS Architecture Structure Diagram** in order
46+
to model the first subsystem of your multi-model. For that, in the Modelio
47+
model browser, right click on a _Package_ element then in the _INTO-CPS_
48+
entry, choose _Architecture Structure Diagram_ as shown in Figure 31. Once
49+
you are sure that the modules have been correctly installed. You are able to
50+
start your INTO-CPS SysML modelling.
51+
52+
![Creating an Architecture Structure diagram](img/ug31_archi_struct_dia.png)
53+
Figure 31: Creating an Architecture Structure diagram.
54+
55+
## Architecture Structure Diagram
56+
57+
INTO-CPS SysML modelling activitIES can be succinctly described as the creation and population of INTO-CPS SysML diagrams.
58+
59+
The Architecture Structure Diagram (ASD) specialises SysML block definition diagrams (BDDs) to support the specification of a multi-model architecture described in terms of a systems components, which will be represented by FMUs. Figure 31 shows you how to create an Architecture Structure Diagram.
60+
61+
Figure 32 represents an example of an Architecture Structure Diagram. Besides creating an Architecture Structure Diagram from scratch and specifying by hand the blocks of your system, the INTO-CPS extension allows the user to create a block from an existing _modelDescription.xml_ file. A _modelDescription.xml_ file is an artifact defined in the FMI standard which specifies, in XML format, the public interface of an FMU.
62+
63+
![Example Architecture Structure diagram](img/ug32_ex_archi_dia.png)
64+
65+
Figure 32: Example Architecture Structure diagram.
66+
67+
To import a _modelDescription.xml_ file:
68+
1. Right click in the Modelio model browser on a Package element, then in the INTO-CPS entry choose Import Model description, as shown in Figure 33.
69+
2. Select the desired modelDescription.xml file (or the .fmu file that should contain a modelDescription.xml file ) in your installation and click on Import (Figure 34).
70+
71+
![Importing an existing model description.](img/ug33_import.png)
72+
Figure 33: Importing an existing model description.
73+
74+
![Model description selection.](img/ug34_modeldesc.png)
75+
Figure 34: Model description selection.
76+
77+
This import command creates an Architecture Structure Diagram describing
78+
the interface of an INTO-CPS block corresponding to the _modelDescription.xml_ file imported, cf. Figure 35.
79+
80+
![Result of model description import.](img/ug35_res_model_import.png)
81+
Figure 35: Result of model description import.
82+
83+
84+
## Connection diagram
85+
The SysML Connection diagram defines the components of the system and their connections. The internals of these block instances are created in the various modeling tools and exported as FMUs. The modeling tools Overture, 20-sim and OpenModelica support importing the interface definition (ports) of the blocks in the Connection diagram by importing a (FMI) _modelDescription.xml_ file containing the block name and its interface definition.
86+
87+
Once you have created several SysML blocks , either from scratch or by importing _modelDescription.xml_ files, you must eventually connect instances of them in an INTO-CPS Connection Diagram. To create an INTO-CPS Connection diagram, as for an INTO-CPS Architecture Structure Diagram, right click on a _Package_ element, then in the INTO-CPS entry choose _Connection Diagram_, as shown in Figure 36.
88+
89+
![ Creating a Connection diagram.](img/ug36_new_connection_dia.png)
90+
Figure 36: Creating a Connection diagram.
91+
92+
93+
94+
95+
Figure 37 shows the result of creating such a diagram.
96+
97+
![Unpopulated Connection diagram.](img/ug37_empty_connection_dia.png)
98+
Figure 37: Unpopulated Connection diagram.
99+
100+
Once you have created all desired block instances and their ports by using the dedicated command in
101+
the Connection Diagram palette, you will be able to model their connections
102+
by using the connector creation command (Figure 38).
103+
104+
![Populated Connection diagram.](img/ug38_full_connection_dia.png)
105+
Figure 38: Populated Connection diagram.
106+
107+
108+
At this point your blocks have been defined and the connections have been set. The next step is
109+
to simulate your multi-model using the INTO-CPS Application. For that you
110+
must first generate a configuration file from your Connection diagram. Select
111+
the top element in the desired Connection diagram, right click on it and in
112+
the INTO-CPS entry choose Generate configuration, as shown in Figure 39.
113+
114+
In the final step, choose a relevant block instance defining the interconnections of simulators and click on Generate. This will create a configuraiton json file for Maestro engine.
115+
116+
![Generating a configuration file for Maestro](img/ug39_gen_config.png)
117+
Figure 39: Generating a configuration file.
118+
119+
## Exporting FMI modelDescription.xml
120+
121+
Once you finished modelling the system components with Architecture Structure Diagram (ASD) you may export the SysML block as _modelDescription.xml_ for FMU packaging.
122+
123+
Follow these steps to export a modelDescription.xml file from Modelio:
124+
1. In Modelio, right-click on the model block in the tree.
125+
2. Select INTO-CPS → Generate Model Description (see Figure 40).
126+
3. Choose a file name containing the text _modelDescription.xml_ and click Export.
127+
128+
![Exporting a modelDescription.xml file.](img/ug40_export_model.png)
129+
Figure 40: Exporting a modelDescription.xml file.
130+
131+
# TODO: DSE Modelling
132+
1.24 MB
Binary file not shown.

doc/img/add.png

1.29 KB
Loading

doc/img/architecture.png

46.1 KB
Loading

doc/img/connection.png

42.7 KB
Loading

doc/img/en-installingmodules.png

57.1 KB
Loading

0 commit comments

Comments
 (0)