I downloaded your workflow and try it out and it works, then I did some changes to it, in which I move the sequence to array node inside the composite actor, and change the number of array to 20 and kept the sdf director iteration to 10, amazingly the random() expression still fired 20 times, each giving me a different number. So it seems that the sdf director is not essential to the workflow instead i just need the sequence to array to control the number of times random() is firing ?<div>
<br></div><div>Basically what I am planning to achieve with this is that, the random() will generate a series of numbers, it will then be map to a discrete parameter (e.g. length = [1,5,10,15,25], width [5,10,15,20]) then the parameters are send to construct an already parameterise model to develop the model. <br>
<div><br></div><div>ckw <br><br><div class="gmail_quote">On Tue, Oct 25, 2011 at 11:47 PM, Christopher Brooks <span dir="ltr"><<a href="mailto:cxh@eecs.berkeley.edu">cxh@eecs.berkeley.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF" text="#000000">
Hi Kianwee,<br>
Problem 1 has to do with multirate systems.<br>
The attached model has a top level that fires once and an inside
opaque composite that fires 10 times.<br>
I use a sequence to array actor to cause the inside opaque composite
to fire 10 times.<br>
See
<cite><b><a href="http://ptolemy" target="_blank">http://ptolemy</a></b>.<a href="http://eecs.berkeley.edu/~eal/ee225a/lab/" target="_blank">eecs.berkeley.edu/~eal/ee225a/lab/</a><b>sdf</b>.pd</cite>f<br>
<br>
About problem #2, the Repeat actor repeats the input, it does not
cause the upstream actors to be fired.<br>
<br>
BTW - test cases would help here.<br>
<br>
Also, take a look at some of the example models in the Ptolemy II
distribution. <br>
In the Kepler source distribution look for models in<br>
ptolemy/src/ptolemy/domains/sdf/kernel/test/auto/<br>
See also<br>
ptolemy/src/ptolemy/domains/sdf/lib/test/auto/DynamicRateChange.xml<br>
<br>
_Christopher<div><div></div><div class="h5"><br>
<br>
On 10/25/11 3:06 AM, kianwee chen wrote:
</div></div><blockquote type="cite"><div><div></div><div class="h5">Hi all kepler users, I am trying to do a loop in a
loop, something like a for loop in a for loop. The task is as
follow :<br>
<br>
1.) So what I did was I setup a sdf director and set the iteration
to 1, then create a composite actor and put a sdf director in it
and set the iteration to 10. I was hoping that it would be for 1
iteration outside, the composite actor will do the action 10 times
inside, thus creating a looop within a loop. However it did not
work.<br>
<br>
2.) I went on to try to do a repeat actor, it worked, as I am
using random() to produce 10 different random number. The repeat
gives me 10 same number. Thus its not good enough. <br>
<br>
Tried to find examples on this issue but did not manage to find
it. Cause I read about the opaque composite actor and I thought
the 1.) should have worked. <br>
<br>
Thanks <br>
ckw<br>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
Kepler-users mailing list
<a href="mailto:Kepler-users@kepler-project.org" target="_blank">Kepler-users@kepler-project.org</a>
<a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
</pre>
</blockquote><font color="#888888">
<br>
<pre cols="72">--
Christopher Brooks, PMP University of California
CHESS Executive Director US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774
ph: <a href="tel:510.643.9841" value="+15106439841" target="_blank">510.643.9841</a> (Office: 545Q Cory)
home: (F-Tu) <a href="tel:707.665.0131" value="+17076650131" target="_blank">707.665.0131</a> cell: <a href="tel:707.332.0670" value="+17073320670" target="_blank">707.332.0670</a> </pre>
</font></div>
</blockquote></div><br></div></div>