From the course: Systems Engineering with SysML

SysML tools

- [Instructor] There is a wide range of tools available for SysML modeling. As SysML is part of a broader systems engineering paradigm, the tools used in model-based systems engineering provide SysML functionalities, some of which are listed here. As SysML v2 is new and rapidly evolving, the tools are keeping pace to expand their feature set to support SysML v2. You can find a list of such tools at the link shown here. This list is updated by MBSE 4 You. That is a publishing platform for content related to model-based systems engineering. The OMG release repository provides plugins for two tools: Eclipse and Jupyter Labs, both of which are widely used programming IDEs. To model in Eclipse, we need to install Eclipse, Java JDK in version 11 or above, PlantUML, Graphviz and SysML project and libraries. For Jupyter Labs, we need Java JDK and Miniconda with Python 3.x. Jupyter Plugin also uses Graphviz for rendering images and SysML libraries, but they are integrated into the plugin so we do not need to install them separately. Along with the plugins, the repo provides installation instructions and helpful tips to set up the modeling environment. Let's take a quick look at both of these tools starting with Eclipse. Once you have installed the components required for Eclipse, the folder structure will look like this. The KerML folder has KerML projects. SysML folder has SysML projects. And the library files, which we will be using in SysML, are in the sysml.library project. This project has three sets of libraries we could use in our models. The kernel library provides the foundational constructs for modeling. For example, it has a file called Scaler Values KerML that defines number data types such as integer, real, et cetera. Systems library provides support for SysML specific constructs such as a Part, a Port, UseCases and States. The domain library provides definitions required for a specific domain. A good example would be the quantities and units that are specific to a domain. So in a way, domain libraries build upon systems libraries, which in turn builds upon the kernel libraries. Finally, let's create a simple model to see how all this works. For that, we go into SysML project, and there I have this folder for the course, inside which I create a folder, sample. And in that I create a new file, sample.sysml. Now in this I can start defining the components of my model. So here I have part def Oven and let's say part def HeatingElement. Now, part testOven of type Oven that has a part, heatingElement of type HeatingElement. This is the textual model. Now to view its graphical representation, I'll have to open the PlantUML view for which I go into window, show view, other, navigate to PlantUML and choose the PlantUML option. And you will be able to see the graphical representation of this model. As you make changes to this model, you can see the model continues to update itself dynamically. So I'm adding an attribute, temperature and the model is dynamically updated. This model can be viewed in several different views offered by SysML and also supported by Eclipse. And for that go to the kebab icon on the top right and here you can see different types of diagrams. Currently, we are looking at the tree view. We can change it to the view supported by the model, and in this example, we could view the interconnection view of the model. We will be learning about these different types of views in the upcoming lessons. Let's now move on to Jupyter to see how that works. Once again, the SysML repo has all the updated installation and set up instructions. So, once we have the environment set up, we can go to the command prompt and say, Jupyter Lab. You should be in the folder where you want to create your model. This will start up the server and open the IDE in a browser window. Now, we can start creating our model. Make sure you choose the SysML option, Here, I will just copy paste the code that I created before. One key difference that I want to make sure of is that this code should be put in a package. So I say package, test, sample. And to run this code, I can simply press this arrow or shift enter and you can see that the package has been compiled. Now, to view the graphical representation, I will say %viz. This is the Graphviz tool for rendering the image and then provide the view that you're interested in. I want to see the tree view, followed by the package name, which is test sample. Run this cell and you can see the model generated. Similarly, you can change the view and instead of tree, we can say interconnection and you will be able to see a different view here. As you can see, both tools, Eclipse and Jupyter are fairly intuitive to use and to create SysML models. I personally prefer Eclipse because of its ability to dynamically generate the graphical views and that is what we will be using for the rest of the course. With that, let's now start building some SysML models, starting with structural modeling.

Contents