[kepler-users] Kepler-users Digest, Vol 90, Issue 10

Jonathan Boright boright at isciences.com
Thu Nov 15 06:24:43 PST 2012


Alvin,

One simple way to get your desired results is to use the PN director.
You'll need to control the number of firings by setting the
firingCountLimit in your constant (array) actor.
I've attached an example.

Good luck!

Jon

On Wed, Nov 14, 2012 at 7:11 PM, <kepler-users-request at kepler-project.org>wrote:

> Send Kepler-users mailing list submissions to
>         kepler-users at kepler-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
> or, via email, send a message with subject or body 'help' to
>         kepler-users-request at kepler-project.org
>
> You can reach the person managing the list at
>         kepler-users-owner at kepler-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Kepler-users digest..."
>
>
> Today's Topics:
>
>    1.  ArrayToSequence Actor (Alvin Sebastian)
>    2. Re:  ArrayToSequence Actor (Edward A. Lee)
>    3. Re:  ArrayToSequence Actor (Sean Riddle)
>    4. Re:  ArrayToSequence Actor (Alvin Sebastian)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 15 Nov 2012 09:23:10 +1000
> From: Alvin Sebastian <a.sebastian at qut.edu.au>
> To: "kepler-users at kepler-project.org"
>         <kepler-users at kepler-project.org>
> Subject: [kepler-users] ArrayToSequence Actor
> Message-ID:
>         <60495E34E2CF58448A44DE567C6FAF24492A298084 at QUTEXMBX03.qut.edu.au>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi All,
>
> I am a new Kepler user who somehow stuck at how to do a specific thing in
> Kepler.
> I am using a SDF director to run a simple sequential workflow only once.
> However, in the middle of the workflow, there would be an actor that
> outputs an array with arbitrary length. I want to process each element of
> the array using another actor all in the same iteration, and it seems the
> easiest way to do that is by using the ArrayToSequence actor. However, the
> actor requires arrayLength parameter to be set prior to running the
> workflow. Is there a way to make the arrayLength parameter dynamic and
> automatically set to the length of the array received by the input port?
>
> Regards,
>
> Alvin
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121115/fc574277/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Wed, 14 Nov 2012 15:26:10 -0800
> From: "Edward A. Lee" <eal at eecs.berkeley.edu>
> To: Alvin Sebastian <a.sebastian at qut.edu.au>
> Cc: "kepler-users at kepler-project.org"
>         <kepler-users at kepler-project.org>
> Subject: Re: [kepler-users] ArrayToSequence Actor
> Message-ID: <50A42892.5000507 at eecs.berkeley.edu>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
>
> You could use IterateOverArray.
>
> Edward
>
>
> On 11/14/12 3:23 PM, Alvin Sebastian wrote:
> > Hi All,
> >
> > I am a new Kepler user who somehow stuck at how to do a specific thing
> > in Kepler.
> >
> > I am using a SDF director to run a simple sequential workflow only once.
> > However, in the middle of the workflow, there would be an actor that
> > outputs an array with arbitrary length. I want to process each element
> > of the array using another actor all in the same iteration, and it seems
> > the easiest way to do that is by using the ArrayToSequence actor.
> > However, the actor requires arrayLength parameter to be set prior to
> > running the workflow. Is there a way to make the arrayLength parameter
> > dynamic and automatically set to the length of the array received by the
> > input port?
> >
> > Regards,
> >
> > Alvin
> >
> >
> >
> > _______________________________________________
> > Kepler-users mailing list
> > Kepler-users at kepler-project.org
> > http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: eal.vcf
> Type: text/x-vcard
> Size: 330 bytes
> Desc: not available
> URL: <
> http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121114/8f6ab9de/attachment-0001.vcf
> >
>
> ------------------------------
>
> Message: 3
> Date: Wed, 14 Nov 2012 15:32:00 -0800
> From: Sean Riddle <swriddle at gmail.com>
> To: Alvin Sebastian <a.sebastian at qut.edu.au>
> Cc: "kepler-users at kepler-project.org"
>         <kepler-users at kepler-project.org>
> Subject: Re: [kepler-users] ArrayToSequence Actor
> Message-ID:
>         <CAAjdownfKV5X=
> OEvNnJvDZzZDRnyWT2NtntAjEeRpiN0-p5UYQ at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> If the boolean parameter "enforceArrayLength" is set to false, the
> arrayLength parameter will have no effect, and it will work dynamically as
> you would expect. This does violate the contract implicit in SDF, though,
> that each actor has a constant token production and consumption rate. If
> the actor is only invoked once, though, I doubt that will be a problem.
>
> - Sean
>
> On Wed, Nov 14, 2012 at 3:23 PM, Alvin Sebastian <a.sebastian at qut.edu.au
> >wrote:
>
> > Hi All,****
> >
> > ** **
> >
> > I am a new Kepler user who somehow stuck at how to do a specific thing in
> > Kepler.****
> >
> > I am using a SDF director to run a simple sequential workflow only once.
> > However, in the middle of the workflow, there would be an actor that
> > outputs an array with arbitrary length. I want to process each element of
> > the array using another actor all in the same iteration, and it seems the
> > easiest way to do that is by using the ArrayToSequence actor. However,
> the
> > actor requires arrayLength parameter to be set prior to running the
> > workflow. Is there a way to make the arrayLength parameter dynamic and
> > automatically set to the length of the array received by the input port?
> *
> > ***
> >
> > ** **
> >
> > Regards,****
> >
> > ** **
> >
> > Alvin****
> >
> > _______________________________________________
> > Kepler-users mailing list
> > Kepler-users at kepler-project.org
> > http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121114/eada377f/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 4
> Date: Thu, 15 Nov 2012 10:11:03 +1000
> From: Alvin Sebastian <a.sebastian at qut.edu.au>
> To: "kepler-users at kepler-project.org"
>         <kepler-users at kepler-project.org>
> Subject: Re: [kepler-users] ArrayToSequence Actor
> Message-ID:
>         <60495E34E2CF58448A44DE567C6FAF24492A29809A at QUTEXMBX03.qut.edu.au>
> Content-Type: text/plain; charset="us-ascii"
>
> Thanks for all the responses.
>
> I have looked into IterateOverArray, but the documentation is not very
> clear and I have no idea at all of how to use it. It has no input nor
> output ports by default.
>
> Setting "enforceArrayLength" to false while using SDF does not work at
> all. With DDF, it works but it also keeps iterating indefinitely. How do I
> create a workflow where an actor can consume any number of input token
> dynamically without keep repeating?
>
> As a simple example using SDF director (iterations set to 1), I have a
> constant actor with value {1,2,3}. I connect the output port of that actor
> to the input port of ArrayToSequence, and then connect a Display actor to
> it. What I want is an output of:
> 1
> 2
> 3
> whenever I click the run button once.
> This would be very easy if I set the value of arrayLength to 3, but is
> there any other way to achieve the same result without having to know the
> length of the input array before running the workflow?
>
>
> Alvin
>
>
>
> From: Sean Riddle [mailto:swriddle at gmail.com]
> Sent: Thursday, 15 November 2012 9:32 AM
> To: Alvin Sebastian
> Cc: kepler-users at kepler-project.org
> Subject: Re: [kepler-users] ArrayToSequence Actor
>
> If the boolean parameter "enforceArrayLength" is set to false, the
> arrayLength parameter will have no effect, and it will work dynamically as
> you would expect. This does violate the contract implicit in SDF, though,
> that each actor has a constant token production and consumption rate. If
> the actor is only invoked once, though, I doubt that will be a problem.
>
> - Sean
> On Wed, Nov 14, 2012 at 3:23 PM, Alvin Sebastian <a.sebastian at qut.edu.au
> <mailto:a.sebastian at qut.edu.au>> wrote:
> Hi All,
>
> I am a new Kepler user who somehow stuck at how to do a specific thing in
> Kepler.
> I am using a SDF director to run a simple sequential workflow only once.
> However, in the middle of the workflow, there would be an actor that
> outputs an array with arbitrary length. I want to process each element of
> the array using another actor all in the same iteration, and it seems the
> easiest way to do that is by using the ArrayToSequence actor. However, the
> actor requires arrayLength parameter to be set prior to running the
> workflow. Is there a way to make the arrayLength parameter dynamic and
> automatically set to the length of the array received by the input port?
>
> Regards,
>
> Alvin
>
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at kepler-project.org<mailto:Kepler-users at kepler-project.org>
> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121115/1b4e2552/attachment.html
> >
>
> ------------------------------
>
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at kepler-project.org
> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>
>
> End of Kepler-users Digest, Vol 90, Issue 10
> ********************************************
>



-- 
---------------------------------
Jonathan Boright
Research Scientist
ISciences, LLC
61 Main Street, Suite 200
Burlington, VT 05401
802 864-2999
boright at isciences.com
http://www.isciences.com
http://www.terraviva.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121115/91ff88c0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Array2Seq_PN.kar
Type: audio/midi
Size: 4853 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121115/91ff88c0/attachment-0001.kar>


More information about the Kepler-users mailing list