[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.uml2] Re: correct mapping of a dynamic simulation model (simulink model) to a UML model

Hello James,

thank you for the answer and the explaining picture. "A picture is worth a thousand words" :-) In the attachment, I put a picture of the dynamic model, in this case a Simulink model, that I would like to map to a UML based model. You can also find the picture here: http://www.mathworks.com/products/simulink/demos.html?file=/products/demos/shipping/simulink/sldemo_bounce.html

I still have some problems to do the mapping. This mapping problem sure isn't the easiest. As you can see in the dynamic model, no pins are used to describe inputs and outputs of blocks, as the in- and ouputs are continuous values. The emphasis is also not on these in - and output signals as the edges between the blocks are sufficient to easily and precisely describe the information flow between the blocks. I could imagine mapping the blocks to OpaqueActions and the edges to ControlFlows. But I still need to put the parameters (not the in or output parameters, but the ones defining the behavior of a block) of every block somewhere in my UML model. A block might have many parameters, and a ReadVariableAction to access each parameter of a block would result in many "overweight" ReadVariableActions in the UML model. Clearly, if variables could be added directly to actions, that would fix the problem immediately. But as I understand the UML spec, that is not possible or is there a trick? I could map every parameter of a block to a constraint of an OpaqueAction and define a SpecificationLiteral under the constraint to define the value of the parameter. I think this is the easiest way to "attach" some variables to an action, but it would misinterpret the semantic behind the "Constraint" element.

The mapping between the UML model and the dynamic simulation model should be as easiest as possible, so that no one gets lost in the UML model. I'm not restricting myself to activity diagrams. If there is a better and nicer way to do the mapping (for example: blocks -> Instances of classes, Edges between blocks-> InformationFlows between instances), I would be grateful for any ideas or clarification.

Axel





James Bruck schrieb:
Just to clarify a bit more...

The pins correspond to parameters of the behavior.  An operation is the
specification of the behavior.

Also, your diagram might look something like the following attachment.

- James.

"James Bruck" <jbruck@xxxxxxxxxx> wrote in message
news:ei8817$ohp$1@xxxxxxxxxxxxxxxxxxxx

Hi Axel,

Q. How can I describe a parameter of an operation?
A. Parameters of operations correspond to pins in Actions.   The Action
refers to some behavior ie, the operation.   The pins correspond to
parameters on the operation.  They do not directly refer to the parameters
but correspond positionally to the parameters of the operation.  I believe
there have been previous postings on this if you do a search.

Q. ... you say "k is a parameter of the operation" how can I access it.
A. I'm a little confused on how you want to use k, I don't think you want

a

simple InputPin as the you would for x. I think what you want is to

create

a Variable under the Activity.   You can then use ReadVariableActions and
AddVariableActions to read and write the value of that variable.     Then,
you can model what you want completely with an OpaqueBehavior ( ie. A
CallBehaviorAction with its Behavior referring to an OpaqueBehavior ).

You

can then create an InputPin for X, an OutputPin for Y and refer to a
ReadVariableAction for k.

I'm still a little uncertain what exactly you are trying to do.  For
example, do you not have Classes or classifiers that can hold operations?
Are you restricting yourself to Activity diagrams only.

Let me know what you finally decide on ... sounds interesting.

Cheers,

- James.


"AxelR" <reichwein@xxxxxxxxxxxxxxxxxxxx> wrote in message news:ei814a$8tp$1@xxxxxxxxxxxxxxxxxxxx

Hello James,

thank you for the answer.

I also considered CallOperationAction and I really wish to model the
dynamic simulation model as an activity diagram. I understand the
concept of input and ouput parameters of an operation, described by the
Input- and OutputPins. But how can I describe a parameter of an

operation?

For example: y = k*x
x is the input, y is the output, and k is a parameter of the operation.
And k is variable, it can be any number. I want to place the value of k
somehow in the UML model, so that the user can easily access it and
change it. Where should I place this operation dependent parameter?

Should I place it as a parameter that belongs to the operation?

Thank you for the help.

Axel




James Bruck schrieb:

Hi Axel,

Consider CallOperationAction. CallOperationActions refer to an

operation

of a Class.  They own InputPins that correspond to parameters of the
operation and
OutputPin's that correspond to the return parameter.
I think you can show what you want using InputPins and OutputPins.

You

can

use ObjectFlow's between the pins.
You seem to be on the right track with Activity Diagrams.

Alternatively, if you want to model the structure of a certain

structured

classifier you can consider using Composite Structure Diagrams. You

can

model properties using parts or roles and connect them using

Connectors.

Ports are also useful for modeling interaction points on structured
classifiers.

If you want to convey how a group of associated parts contribute to
accomplish one particular task you might consider creating a

collaboration

with roles in it's structure diagram and show how the roles are
inter-connected.

Sequence diagrams could also be of some use if you want to model

general

instances or specific instances ( a particular run ) of executing

code.

Creating a profile and stereotypes would be a final step if you have
concepts specific to your domain that you wish to emphasize.  ( Keep

in

mind

that you could just use keywords as a "ultra-light weight" way of
emphasizing your concepts. )

... a little vague but I hope this helps....

Cheers,

- James.



"AxelR" <reichwein@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:ei7ob0$qt6$1@xxxxxxxxxxxxxxxxxxxx


Hello,

I need some help on how to model a dynamic simulation model(for e.g. a
Simulink model) in UML. The dynamic simulation model consists of

blocks

with certain characteristics that are connected to each other. For
example: an input block sends a constant value to another block, which
integrates this input value over time, and this result is sent to
another block and so on...

I am asking myself what is the best way to map the information

included

in a dynamic simulation model into a UML model with domain specific
stereotypes, in this case specific to the dynamic simulation model.

I first thought it would be practical to map the blocks of the dynamic
simulation to actions in an activity, which would be connected by
control flows, like this:
dynamic simulation model -> Activity, blocks -> Actions, Edges between
blocks-> ControlFlows

However as actions do not have properties (as classes and instances
have), how can I map the parameters of the blocks to the actions? The
block parameters would need to be in a stereotype applied to the

action.

But this would mean, that a stereotype would be needed for every
possible blocktype. This wouldn't be a flexible solution as new
blocktypes can be defined any time, and the creation of new

stereotypes

would be forced and cumbersome. I would appreciate a solution, where

the

stereotypes needed for this domain specific modeling, are minimal in
quantity and size. Ideally this mapping would be wishful: Parameter of

a

Block -> Property of an Action

Is there something about actions and activities that I missed to

realize

a correct mapping? Or should I try another approach, for example:
dynamic simulation model -> Class containing references to all blocks
included in the dynamic model, blocks -> Instances of classes, Edges
between blocks-> InformationFlows between instances  ?

I would appreciate any help.

Axel













PNG image