At 05:53 AM 6/3/2004, Philippe.Dumont wrote:
 Stephen Andrew Neuendorffer wrote:

I'm a bit at a loss as to why it must execute N1 times? In seems to me
like the N1 firings of HT1 and the N2 firings of HT2 could be hidden inside the
actor, but without more information about where the desired number of firings is coming
from, I couldn't hazard a guess as to the right way to represent it.

"The N1 firings of HT1 and the N2 firings of HT2 could be hidden inside" I do agree with you, but I don't know how to proceed...

In fact in our model, there are two levels :

The first is the one I described in my last mail.
Each HT (Hierarchical Task), contains the second level :

When I take an input token, I cut it in N parts, I do a computation on
each part. At the end I take the N results of the computation
and I produce the result token. So I use N "firings" to do the N computations. I don't have the choice
because I need to increment a counter in the firing method of the director.

OK, so I see two ways to approach this: 1) represent the extraction and composition of the N parts explicitly. 2) have it happen implicitly.

I'm not sure what you are interested in:
1) is pretty straightforward (use an ArrayToSequence to
extract the N tokens, send them through an actor, and then use a Downsampler to
discard all but the last output)


2) I could picture doing a couple of ways, depending on how you are representing the primitive operation
and what is important about it. The Director.transferInputs and transferOutputs methods could be overridden
to do what you want to do. The primary downside to this is that you end up with an extra layer of hieararchy.
The IterateOverArray actor (actor.lib.hoc) implements one way of hiding the extra hierarchy in the user interface.
It overrides the director to behave as a "ArrayToSequence", followed by an actor, followed by "SequenceToArray"
It sounds like you want something similar, but with a DownSampler instead of a SequenceToArray.



The director is an SDF director.

I try to use the "iterate" method but i don't know how to use it properly.
I can't use the "preinitialize" or "initialize" method because all the methods "preinitialize" or "initialize" of all the HT must be executed before a fire.
I would like to call it between "initialize" and "prefire". I think it's the best solution. But I do not know if it is possible ?

I don't understand what you are trying to do here...

Steve



----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to