Book a Demo

Author Topic: is it me, or is there a problem with timing diagra  (Read 4198 times)

bob_d

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
is it me, or is there a problem with timing diagra
« on: January 31, 2005, 02:34:38 pm »
I'm new at EA, but have some background in UML.

I'm trying to use timing diagrams to show the relationships between several types of events and controllers.  I can't seem to get a particular thing going, at least the way I expect (this may be the problem).

Let's say I have two lifelines going.  A message is sent by one lifeline to the other.  When the message is received by the second lifeline, I want it to change state for a fixed amount of time.  I don't want to have the state changes on the second lifeline time-achored to anything external, just to the incoming message and the elapsing of the timer triggered by the incoming message.  I can't seem to figure out how to represent this without having to add (what seem to me) extraneous and deceptive time anchors to the individual lifelines.

Anybody have any experience to give me a clue on this ?

Thanks in advance,

Bob
"Whoever undertakes to set himself up as a judge of Truth and
Knowledge is shipwrecked by the laughter of the gods." - Albert Einstein

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: is it me, or is there a problem with timing di
« Reply #1 on: January 31, 2005, 02:43:13 pm »
Without testing...

Either
a) add a "SystemClock" object to generate an elapsed time event, or
b) add a self-message of type "Delay"

hth ???
bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

bob_d

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: is it me, or is there a problem with timing di
« Reply #2 on: January 31, 2005, 04:41:56 pm »
Thanks for the quick answer, but I'm either having a knowledge gap or "brain freeze" on this.

I can't find any reference to SystemClock anywhere.  Is this an EA feature or some external element that I must "build" ?  Any hints on how/where ? (probable newbie question, but still...)

TESTED:  Self-message is disallowed in a timing diagram -- everything is grayed out unless there are two different lifelines involved in the message.  

Thanks in advance

Bob
"Whoever undertakes to set himself up as a judge of Truth and
Knowledge is shipwrecked by the laughter of the gods." - Albert Einstein

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: is it me, or is there a problem with timing di
« Reply #3 on: January 31, 2005, 05:43:53 pm »
Hmmm,  OK have you tried adding a duration constraint to the receiver.

Object:Receiver______----------------------_______________

Object:Sender_______^____________________________

The message at  ^  has a duration constraint of (say) 50 secs
This will show up in the Receiver as a constraint.

hth
Bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

bob_d

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: is it me, or is there a problem with timing di
« Reply #4 on: February 01, 2005, 08:17:36 am »
Well, the duration constraint partially works, although not well enough for my purposes.  (the diagram shows the state change in the receiver to the new state as per your ACSII pic BUT the lifeline does not show a state change at the end of the duration.)  

Let me explain what I'm trying to model (and a little "why" with that).  Although I've been in software dev for 20 years or so, my initial training is as a psychologist.  I'm trying to use UML to capture some important behavioral model information to build up a series of UML templates for some of the fundamental building blocks of behavior and interactions for later incorporation into various larger system models.  (Sort of the human behavior version of the GoF models, if you will)

The thing I'm trying to model here is what's called a fixed-interval schedule of reinforcement (henceforth called FI).  The relevant elements of an FI schedule are as follows.  (1) you have a behaving organism doing some detectable thing -- in UML-speak each occurrence of that thing generates a message, basically that it occurred. (2) these messages have no effect until a time expires (let's say after 30 seconds - this is the FI).  (3) once the timer expires, the next occurrence of the behavior being observed ( ie the message generator in item 1), causes some specific environmental change (maybe food to an experimental animal but it could be anything).  This change stays in effect for a specific amount of time and then ceases.  
"Whoever undertakes to set himself up as a judge of Truth and
Knowledge is shipwrecked by the laughter of the gods." - Albert Einstein

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: is it me, or is there a problem with timing di
« Reply #5 on: February 01, 2005, 02:05:02 pm »
Quote
... the lifeline does not show a state change at the end of the duration


Just add a state change to the Receiver lifeline at time of message 1 + delay.

bruce
« Last Edit: February 01, 2005, 02:05:23 pm by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

bob_d

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: is it me, or is there a problem with timing di
« Reply #6 on: February 02, 2005, 03:29:34 pm »
I see where I can add the state change to the receiving lifeline at a fixed time (eg 30 seconds plus the 5 second delay  so have the lifeline change state at 35).  And I see that the message itself carries information about the duration and that the information appears in the notations on the diagram.

It just seems WRONG (ie misfeature) that if the message "knows" the duration constraint that I then have to go into ANOTHER PLACE and hard-code the state change of the receiver which coincides AND IS CAUSED BY the end of the duration constraint.   There's a decoupling here that seems inappropriate.

Am I missing something subtle in how to handle EA ? Or is should this be an enhancement request (along the lines of an option so that when you specify a duration constraint, there's an optional state change in the receiver at the end of the duration).

Thanks.

Bob
"Whoever undertakes to set himself up as a judge of Truth and
Knowledge is shipwrecked by the laughter of the gods." - Albert Einstein

bob_d

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: is it me, or is there a problem with timing di
« Reply #7 on: February 02, 2005, 03:31:30 pm »
and/or another possible enhancement to allow the symbolic use of events where now only integer values are allowed ?
"Whoever undertakes to set himself up as a judge of Truth and
Knowledge is shipwrecked by the laughter of the gods." - Albert Einstein