About tranjectories

98 views
Skip to first unread message

stefanady

unread,
Apr 24, 2008, 2:46:35 AM4/24/08
to Tempo Tools
I have a set of messages, and every message contains a ttl (time to
live) variable. Is there any way to
check those ttl values using a tranjectory? For example I want to
delete a message form the set, when its ttl expires. I tried to use a
for loop inside the tranjectory but the compiler doesn't support
that. I would be thankful if you could give me a piece of advice.

Carleton Coffrin

unread,
Apr 24, 2008, 10:24:31 PM4/24/08
to tempo...@googlegroups.com
Trajectories are mostly read only.  They are designed to only modify evolve variables in a continuous fashion.  In a trajectory you can check if the TTL has expired and stop the evolution, but there is no way to modify the set of messages.

We might be able to make more suggestions if we had the complete TIOA model.

-Carleton

stefanady

unread,
May 2, 2008, 4:14:42 PM5/2/08
to Tempo Tools
Is there any way to use a for loop into a tranjectory? Because I would
like to check a set of ttl values.
> > that.  I would be thankful if you could give me a piece of advice.- Hide quoted text -
>
> - Show quoted text -

Carleton Coffrin

unread,
May 2, 2008, 4:42:26 PM5/2/08
to tempo...@googlegroups.com
On Fri, May 2, 2008 at 4:14 PM, stefanady <stef...@yahoo.gr> wrote:

Is there any way to use a for loop into a tranjectory? Because I would
like  to check a set of ttl values.

Yes.  The exists quantifier ( \E <var> <predicate>) should work.  We even have a special version of the quantifiers for working with collections (\E <var> in <collection> where <predicate>).  Here is an example,


automaton A

  states 

    now: Real := 0;

    ttl: Set[Real] := {5, 10, 20, 40};

      

  trajectories

    trajdef t

      stop when \E stopTime in ttl where now >= stopTime;

      evolve d(now) = 1;

      

  schedule

    do

      for x:Nat where x < 10 do

        follow t duration 1;

      od

    od


I hope this helps.
-Carleton

Reply all
Reply to author
Forward
0 new messages