0

I am trying to create a 'model library' in SysML using Papyrus in order to implement a domain-specific modelling elements to be use & reuse in different projects. In the 'model library' I need to have model Block elements such as "Hardware" & "Software".

As far as I understand from the book "A Practical Guide to SysML" in Chapter 15 "CUSTOMIZING SysML FOR SPECIFIC DOMAINS", it is needed to use 'Model Libraries' in order to customise SysML for specific domains.

In my understanding, a 'model library' is a type of a Package which can be created easily in Papyrus 5.0 using SysML profile 1.6 (the nightly version which is the latest release of 1.6).

I also found a screenshot of a diagram in which a SysML Block is used as a "Hardware" block (not stereotype). I need to implement that in a model library but I didn't find the way to create 'model library' in Papyrus and don't know how to create the "Hardware" block.

Can you please explain how to accomplish these?

Appreciate your help.

Edit 1: I found these URLs useful:

Discussion regarding the use of Model library over StereoType: https://www.eclipse.org/forums/index.php/t/1085784/

Using StereoType: https://www.eclipse.org/forums/index.php/t/1100964/

Shobeira
  • 29
  • 5

1 Answers1

1

A model library is just a package, that the modeler intends to be used by multiple projects. To make this known, apply the stereotype «modelLibrary» to it. It is still a package, so everything that can be done with a package can be done with it. So, create a Block, name it Hardware and you are done.

Another question is, how to use a package in another model. This depends on your tool, but there should be some method of opening a package from another model in your model.

Axel Scheithauer
  • 2,758
  • 5
  • 13
  • Many thanks. I was able to implement it in Papyrus but not StarUML. Can you please give me a hint on how to use the "Hardware" block in as an element in the Diagrams and in other packages (The "Hardware" block created in the modelLibrary now but I am not able to make use of it). Should I relate the ModelLibrary to the model somehow or they have been connected automatically already as they are in the same Model? (Is it needed to do some kind of "Add registered package" or "import pachage"? – Shobeira Jun 02 '21 at 09:12
  • 1
    The `Hardware`-Block should be used to generalize all your hardware blocks directly or indirectly. Just model a generalization between the blocks you want to model as hardware and your library `Hardware`-Block. This way, any properties of your library block will be inherited. For example hardware usually has a mass. For this to work, you don't need to import the package. However, if you want to make visible that your model uses this library, the import relationship can do this. – Axel Scheithauer Jul 12 '21 at 06:59