Author Topic: SysML How to define context specific value type properties contained in a proper  (Read 11522 times)

PeterHeintz

  • EA User
  • **
  • Posts: 965
  • Karma: +58/-18
    • View Profile

SysML 1.3 says this
A property can represent a role or usage in the context of its enclosing block. A property has a type that supplies its definition. A part belonging to a block, for example, may be typed by another block. The part defines a local usage of its defining block within the specific context to which the part belongs. For example, a block that represents the definition of a wheel can be used in different ways. The front wheel and rear wheel can represent different usages of the same wheel definition. SysML also allows each usage to define context-specific values and constraints associated with the individual usage, such as 25 psi for the front tires and 30 psi for the rear tires.

When I add a property typed e.g. with a ValueType to a SysML block (A) I can set the initial value (initial) in the properties dialog. But when is type a property in another Block (B) with Block (A) I cannot change the initial value of the property of type (A) in (B) anymore because the property dialog is somehow read only.

My idea is to define a Block with some ValueType properties in which I want to use as whole to type properties in various scenarios just by changing the values.
Example
Car Data
   Speed ValueType(km/h)
   Power ValueType (kW)

Lamborghini  Huracan
cd:Car Data
Speed=390
Power=456

Is it just a bug that properties of properties are read only?
Any idea to meet my goal?
Best regards,

Peter Heintz

Motlib

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Hello,

I am working with EA 10, so I cannot say if this also applies for newer versions: The initial value of an attribute is something you define in the type of a property. My understanding is that this is the value that the attribute gets if nothing else is defined. So it is related to the type, not to the instance.

To set the value of an attribute in a property, you can right-click the property it in a diagram, select Advanced -> Set Property Values... and define the actual values of the attributes there.

HTH,

Motlib


PeterHeintz

  • EA User
  • **
  • Posts: 965
  • Karma: +58/-18
    • View Profile
Thank you for that!
The thing with SysML is that there are no attributes like in Classes, but properties. And a property can be typed by a ValueType (a kind of DataType in UML).
Although the menu item has the label “Set Property Values…” it tries to set Class “Atributes” rather than SysML “Properties” of type ValueType.

The other thing is, that SysML properties can be nested, so there is a need to set values at any level of the nested properties.
A workaround could be to define constraints, but this is unfortunately only possible on a “top level” property because saving changes on lower levels is disabled.
Using a SysML spec. "Property Specific Type" could also provide a workaround but is not supported by EA.
Best regards,

Peter Heintz

RayB

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Hello Peter/Forum,

I am a new member to this forum. I came across this question posed by Peter below which is exactly the same question that I am trying to answer. Apologies for re-igniting the old post but as a solution was never posted I thought it worth bringing back up.

Context:

I have modelled a hierarchal logical breakdown of our system, taking the data from an excel spreadsheet. I am investigating the potential to export the model back to excel rather than updating the spreadsheet and then amending the model. That way our model will be the source of truth.

Current issue:

I have created a block to type the element. I created 3 generalisations, initially I had created three blocks before realising they should have been instances. I was able to get the value compartment within the blocks to display the value properties using the 'structural elements' and 'features and compartment visibility' however I haven't been able to display them in the instances, only nesting the properties so far. The values checkbox within features and compartments that is visible in for the blocks is not there for the instances, i see 8 checkboxes instead of 9.

As well as viewing those value properties I want to assign values to them such as product codes, description etc. Once I have done this I can explore the possibilities with exports to excel.

Any help with assigning values to the instances would be highly appreciated
« Last Edit: March 17, 2021, 02:38:13 am by RayB »

philchudley

  • EA User
  • **
  • Posts: 735
  • Karma: +20/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
I have met this before and there is a sort of work around, but I agree there is still a bug.

1) Define your Car data as a Block with its Value Type Properties
2) Create a Internal Block Diagram
3) Re-use your Car Data block as a Property on this diagram and name it accordingly
4) You can now add the Value properties as Parts
5) Select a Part and now you can set it's initial value BUT the value doesn't show up on the diagram (unless there some global option I have missed)
6) Right-click the Car Data property and select Features -> Set Property Values from the menu
7) You can now set default values BUT the names of the properties (value types) are NOT shown in the dialog!, You have to type them in, but once this has been done, you do see a property list with initial values.

The above is similar to setting the run state of an object instantiated from a UML class which works and displays the list of attributes from the classifier, so I guess the fact that set property values does not list the properties is a BUG in SysML

Hope the above helps

Phil
follow me on Twitter

@SparxEAGuru

RayB

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Thanks for the reply Phil,

I've now set been able to set the property values within the instances, thank you for the advice, not having the drop down list of the values had caught me out.

So now my next issue is I want value types to be added to a block, I have a feeling it might not be possible but let me know if there is a way.

I am currentlylooking at the possibility of replacing a master BOM spreadsheet with the model, that is to export from the model using the Excel Export tool whenever updates are made to recreate the spreadsheet rather than updating a spreadsheet and updating the model each time which would nullify our system modelling claims of a ‘single source of truth’.

My current model consists of numerous BDDs describing all of the system elements in logical groupings and is predominantly consisting of Blocks

The structure is essentially formed of the top level block associated by aggregation to 6 different blocks representing logical groupings of systems.  Each block contains hidden decomposition and each child diagram contains further decomposition of the system, at some points there is perhaps 7 or 8 levels of decomposition.

I would like to create a spreadsheet with the value fields: level (of decomposition), description and a few other describing features as column headers.

To create this spreadsheet obviously I would need to include these value types for every block.

The inability to add values to the blocks would prevent me using the model to recreate spreadsheet. Is this the correct assumption or is there a way around this?

Thank you to anybody that may have some input on this

philchudley

  • EA User
  • **
  • Posts: 735
  • Karma: +20/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Hi

To add a Value Type to Block, assuming Value Types have been created, ideally in a Package (or Packages)

1) On the BDD drag a Property element onto the Block
2) Ensure the Property is totally contained within the Block (you might need to resize the Block)
3) Using the Properties for the Property element, select the Property tab and you should see an Type with a navigation button ...
4) Click the ... button and select the Value Type by browsing through the tree displayed.
5) Save the changes
6) Close the dialog
7) Select the Property on the diagram and delete it by using the Delete key

This should remove the Property from the diagram, create a Value Property Part as a child of the Block and display the Values compartment n the Block

In version of EA prior to EA v15.2 the Values compartment may not be visible, if so, simply locate the Property in the Browser (it will be in the same Package as the Block) and move it as a Child element of the Block.

This is actually easier to do in EA than it is to describe it!

TIP
Step 4) above can be speeded up by setting the Package(s) where your Value Types are stored as Namespace Root(s) (Develop -> Options -> Set Package as Namespace Root))
You can then navigate directly to the Value Type package by selecting the namespace from the dropdown list in the navigation dialog

Best of luck with the Excel I/O

All the best

Phil
follow me on Twitter

@SparxEAGuru

RayB

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Thanks again for the reply,

I should have clarified I already have the value types in the block. I wanted to add the actual values for example part number 123.

I added values types another way so its good to read about the alternative, I created an IBD for the block and dragged in the part properties.