## Parametric Calculations using Stereotype Tag Values

Moderator: Moderators

### Parametric Calculations using Stereotype Tag Values

Is it possible to use Stereotype Tag Values in Parametric diagram calculations? In most of the Parametric examples I’ve seen, the only way to do mathematical calculations is to use Block Value Property attributes.

In our model, we are using Stereotypes to capture properties for elements, specifically for the Parts depicted in an Internal Block Diagram. If we are using Tagged Values to capture element properties (i.e. weight) instead of using Block Attribute Value Properties, can we perform Parametric calculations in MagicDraw using those Tag Values?
danw@g2-ops.com
Forum Beginner

Posts: 35
Posts Rating:0
Joined: Thu Aug 02, 2012 7:32 pm

### Re: Parametric Calculations using Stereotype Tag Values

Hi,

No, Cameo Simulation Toolkit cannot use the tagged values to perform the Parametric calculation. Only the values of the features at run-time can be used.

Please consider that, the using of the stereotype means you are extending the model element, not the thing that it represents.
For example, if you have a Part (Property element) represent the usage of the Ball (Here, the Ball is a class or a block that types the Part), when you applied stereotype which contains weight tag definition to the Part. The tagged value of the weight would be considered as a kind of an attribute of the Part (Property Element), not the ball.

Another sample, <<Block>> stereotype has a tag definition isEncapsulated:Boolean[0..1]. If you create a block Ball, then isEncapsulated is like a kind of an attribute of the block Ball, not the ball (real ball).

Cameo Simulation Toolkit, simulate the system represented by the model. Therefore, it supports only the values of the features, not the tagged values.

So, we would suggest to create a new property (value property), e.g. weight:Real, for the Ball. Then, you can use InstanceSpecification to specify the values of your system. This is the mechanism for specifying the values of the designed system in the UML/SysML.

Best regards,

Kritsana U.
kritsana_u
Forum Expert

Posts: 116
Posts Rating:3
Joined: Wed Jan 27, 2010 3:02 am

### Re: Parametric Calculations using Stereotype Tag Values

The problem with that case Kritsana is that you can’t easily see the populated values of the property when you want to represent the parts as an icon.

For instance, if we want to have an Internal Block Diagram that has several different parts, or Balls to continue your example, and have each Ball have a different weight, my understanding is that the way to do that is by using Context Specific Values. However, the only way to easily see the populated value of the context specific value, in this case the weight, is to not represent the Ball as an icon. In this case we don’t suppress Context Specific Values and they will show up for each Ball in the Context Specific Value block area. However if we want to represent each Ball as an icon, there seems to be no way to view the Context Specific Value for Weight.

In contrast, by using Stereotypes we can easily have a different weight value for each Part (Ball), easily see the tag values by either displaying them next to the icon, or by adding them to the Property window (by using Customizations). It just seems like we can’t leverage the Tag Values for Parametric calculations. Would you say this is correct?
danw@g2-ops.com
Forum Beginner

Posts: 35
Posts Rating:0
Joined: Thu Aug 02, 2012 7:32 pm

### Re: Parametric Calculations using Stereotype Tag Values

Hi,

Cameo Simulation Toolkit uses the reference implementation of the fUML standard. A run-time object will be an instance of your design block.
Parametric engine also works on the fUML run-time model. So, this is the reason that Cameo Simulation Toolkit does not support the tagged values in Parametric execution.

Sorry for your inconvenience.

Best regards,

Kritsana U.
kritsana_u
Forum Expert

Posts: 116
Posts Rating:3
Joined: Wed Jan 27, 2010 3:02 am