<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
There is also IterateOverArray, see<br>
<a class="moz-txt-link-freetext" href="http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/ptII/doc/codeDoc/ptolemy/actor/lib/hoc/IterateOverArray.html">http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/ptII/doc/codeDoc/ptolemy/actor/lib/hoc/IterateOverArray.html</a><br>
and<br>
<a class="moz-txt-link-freetext" href="http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/ptII/ptolemy/actor/lib/hoc/demo/IterateOverArray/IterateOverArray.htm">http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/ptII/ptolemy/actor/lib/hoc/demo/IterateOverArray/IterateOverArray.htm</a><br>
<br>
Christopher wrote:<br>
<blockquote type="cite">DirectoryListing produces an Array an
output.
<br>
If you know the number of files in the directory in advance, then
you can use ArrayToSequence and have a SDF Director.
<br>
The reason you need to know the number of files is because you
need to know the size of the array so that SDF can calculate a
schedule. An alternative is to set the allowRateChanges in
SDFDirector to true, see DirectorySDFRateChange.xml
<br>
One issue with this model is that it does not terminate naturally.
<br>
<br>
Or, you can use the PN Director and terminate the model with a
test that looks for a file name that has already been seen.
<br>
<br>
An alternative is to put the DirectoryListing inside a Composite
that has a SDF Director. I ran in to issue with terminating the
model though. Attached is DirectoryListing2.xml.
<br>
<br>
I'm probably missing an easier way to do this though.
<br>
<br>
See also
<br>
<a class="moz-txt-link-freetext"
href="https://kepler-project.org/users/faq#how-do-i-branch">https://kepler-project.org/users/faq#how-do-i-branch</a>
<br>
<br>
_Christopher
</blockquote>
<br>
<br>
<br>
On 4/26/12 7:37 AM, Stefan Proell wrote:
<blockquote cite="mid:4F995D9E.7070604@sba-research.org" type="cite">Dear
Tomasz,
<br>
thank you very much for your reply. I know the tutorial pages, but
I was wondering if there exists a
<br>
simpler way for retrieving a list of files and store the files
located at the URLs on my machine. I attached a screen shot of my
current attempt, which works but seems a bit complicated for
performing a rather simple task.
<br>
After using the DirectoryListing Actor, I already have an array
of the URL-Strings. There also exists an ArrayElement-Actor, which
I thought would iterate over the elements by itself. What I needed
to do was to use a Ramp (for-loop) and a manually created index to
iterate over the elements in the ArrayElement-Actor. Is there a
more compact solution?
<br>
<br>
I ask because in the workflow I try to design there are several
iteration steps, the depicted one is actual the easiest. When I
have to design such a complicated structure for every such
iteration, the result will be unreadable and hard to understand
for other users.
<br>
<br>
Thank you very much in advance,
<br>
kind regards,
<br>
Stefan
<br>
<br>
Am 2012-04-26 16:29, schrieb Tomasz Żok:
<br>
<blockquote type="cite">Dear Stefan,
<br>
<br>
please take a look at this tutorial session:
<br>
<a class="moz-txt-link-freetext" href="http://scilla.man.poznan.pl:8080/confluence/x/oAFU">http://scilla.man.poznan.pl:8080/confluence/x/oAFU</a>
<br>
<br>
You can jump straight to sections dedicated to looping in
Kepler, there are
<br>
several possible solutions presented.
<br>
<br>
Best regards,
<br>
Tomek
<br>
<br>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kepler-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" 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: 510.643.9841 (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670 </pre>
</body>
</html>