Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » UML TimeEvent in MetaModel
UML TimeEvent in MetaModel [message #1709625] Tue, 29 September 2015 16:17 Go to next message
Muhammad Kashif is currently offline Muhammad KashifFriend
Messages: 52
Registered: April 2015
Member
Hi,

I am using Eclipse Luna SR2 have created a stereotype in papyrus. I have defined a stereotype named "S1" having an attribute "a1".

"a1" is typed by UML metaclass "TimeEvent".

Now When I apply that stereotype "S1" to a model element, I need to set the value of "a1", which will be a "TimeEvent".

I set the value of that "TimeEvent" as Integer value 3.

Now my question is that what will it be? e.g., 3sec, 3min or 3 hours etc? What unit of time it will take by default?

if I use any other suffix of time other than its default..How can I?

Please help..

Thankyou and Regards
Ali,
Re: UML TimeEvent in MetaModel [message #1709694 is a reply to message #1709625] Wed, 30 September 2015 13:01 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Ali,

It is up to you as the modeler to decide which time units are
applicable to the time expressions in your models. The UML does not
prescribe any units, nor any standard means of qualifying time
expressions with units of measure. In fact, there is no provision for
units of measure of any quantity whatsoever.

This is a good use case for profiles: you might extend metaclasses
such as Expression and ValueSpecification with a stereotype that
carries unit-of-measure information. In fact, the OMG provides some
profiles that do just this for specific domains: e.g., MARTE for
analysis of real-time systems includes an entire sub-language for value
specifications (the VSL). Some of these profiles are available at
Eclipse in the UML Profile Repository (UPR) project.

HTH,

Christian


On 2015-09-29 16:17:19 +0000, Ali Khan said:

> Hi,
> I am using Eclipse Luna SR2 have created a stereotype in papyrus. I
> have defined a stereotype named "S1" having an attribute "a1".
>
> "a1" is typed by UML metaclass "TimeEvent".
> Now When I apply that stereotype "S1" to a model element, I need to set
> the value of "a1", which will be a "TimeEvent".
> I set the value of that "TimeEvent" as Integer value 3.
> Now my question is that what will it be? e.g., 3sec, 3min or 3 hours
> etc? What unit of time it will take by default?
>
> if I use any other suffix of time other than its default..How can I?
>
> Please help..
>
> Thankyou and Regards
> Ali,
Re: UML TimeEvent in MetaModel [message #1709765 is a reply to message #1709694] Wed, 30 September 2015 18:21 Go to previous messageGo to next message
Muhammad Kashif is currently offline Muhammad KashifFriend
Messages: 52
Registered: April 2015
Member
No Message Body
Re: UML TimeEvent in MetaModel [message #1709766 is a reply to message #1709765] Wed, 30 September 2015 18:46 Go to previous messageGo to next message
Muhammad Kashif is currently offline Muhammad KashifFriend
Messages: 52
Registered: April 2015
Member
Hi,

Thanks for your response, It was helpful..

By extending a stereotype from valuespecification and expression, the problem of unit can be solved. i.e., we can set the unit of time.
But I will validate the model using eclipse validator.
How will the eclipse validator understand that unit?
e.g., I created "second" as unit for time and i want the transition from one state to another after 5 seconds, how the validator will add the delay of 5 secs?

The problem can be solved using MARTE, but i want to avoid the use of MARTE.

Any suggestions in this regard would be appreciated..

Thanks in advance
Regards,
Re: UML TimeEvent in MetaModel [message #1709840 is a reply to message #1709766] Thu, 01 October 2015 13:00 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Ali,

What do you mean by a validator adding a delay of 5 seconds?
Validators don't ever change the model: they only check it for
problems. If you write constraints in your profile to check conditions
involving time expressions, then of course you are writing them, so you
can make them understand your stereotype and its time units.

Cheers,

Christian


On 2015-09-30 18:46:43 +0000, Ali Khan said:

> Hi,
> Thanks for your response, It was helpful..
>
> By extending a stereotype from valuespecification and expression, the
> problem of unit can be solved. i.e., we can set the unit of time.
> But I will validate the model using eclipse validator.
> How will the eclipse validator understand that unit?
> e.g., I created "second" as unit for time and i want the transition
> from one state to another after 5 seconds, how the validator will add
> the delay of 5 secs?
>
> The problem can be solved using MARTE, but i want to avoid the use of MARTE.
>
> Any suggestions in this regard would be appreciated..
>
> Thanks in advance
> Regards,
Re: UML TimeEvent in MetaModel [message #1710024 is a reply to message #1709840] Fri, 02 October 2015 17:55 Go to previous messageGo to next message
Muhammad Kashif is currently offline Muhammad KashifFriend
Messages: 52
Registered: April 2015
Member
Hi,
Thanks for answering..

I want to ask that the UML does not provide any unit for time, then what does actually means?

I have used "WaitTimeAction" in activity Diagram to manage the delay..But not sure how it works on profile level.

The way you said that we can extend a stereotype from "valuespecification" and "Expression" to create the unit for time. Let me show you a profile's portion built on your suggestion (See Attachment)..I have extended it from "Transition only because i need to apply it on transition.
Why are we doing this as ultimately we are typing by "TimeEvent"?

If the problem above can be resolved and we succesfully create "second" as unit of time, but the again it is not a built-in unit for time then how the validator will take that unit(second)?

Hope you understand the problem...
Any help in this regard would be appreciated..

Thanks

Re: UML TimeEvent in MetaModel [message #1710729 is a reply to message #1710024] Thu, 08 October 2015 17:24 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi,

I can only repeat what I said before: by the UML's not prescribing any
particular model of time units or other units of measure, this means
that it is up to the modeler to decide the meaning of time and other
measures. Certainly, Papyrus does not impose any additional time
semantics.

In the profile diagram, I don't see anything like what I had suggested.

* I do not see an enumeration of time units (cf.
java.util.concurrent.TimeUnit in the JDK)
* I do not see a stereotype with an attribute that would hold a time unit
* I do see a stereotype extending ValueSpecification, but it has an association
with the TimeEvent metaclass that doesn't seem useful

I thought the problem was that the values specified in TimeEvent and
similar metaclasses for measures of time didn't have, as defined in the
UML, units of measure. That's why I suggested a stereotype extending
ValueSpecification (which in UML provides the time measurement via a
TimeExpression element) to add an attribute specifying the unit of
measure. I have no other suggestion to offer.

HTH,

Christian


On 2015-10-02 17:55:54 +0000, Ali Khan said:

> Hi,
> Thanks for answering..
>
> I want to ask that the UML does not provide any unit for time, then
> what does actually means?
>
> I have used "WaitTimeAction" in activity Diagram to manage the
> delay..But not sure how it works on profile level.
>
> The way you said that we can extend a stereotype from
> "valuespecification" and "Expression" to create the unit for time. Let
> me show you a profile's portion built on your suggestion (See
> Attachment)..I have extended it from "Transition only because i need to
> apply it on transition.
> Why are we doing this as ultimately we are typing by "TimeEvent"?
>
> If the problem above can be resolved and we succesfully create "second"
> as unit of time, but the again it is not a built-in unit for time then
> how the validator will take that unit(second)?
>
> Hope you understand the problem...
> Any help in this regard would be appreciated..
>
> Thanks
>
>
> <image>
Previous Topic:Modifying fontHeight of StereotypeBrace
Next Topic:C++ standard types
Goto Forum:
  


Current Time: Wed Apr 24 17:29:56 GMT 2024

Powered by FUDForum. Page generated in 0.03691 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top