Hi Jonathan,

Thank you very much. I just realized that the parameter also controls the 
iterations.

Regards,

Alvin

From: [email protected] 
[mailto:[email protected]] On Behalf Of Jonathan Boright
Sent: Friday, 16 November 2012 12:25 AM
To: [email protected]
Subject: Re: [kepler-users] Kepler-users Digest, Vol 90, Issue 10

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, 
<[email protected]<mailto:[email protected]>>
 wrote:
Send Kepler-users mailing list submissions to
        [email protected]<mailto:[email protected]>

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
        
[email protected]<mailto:[email protected]>

You can reach the person managing the list at
        
[email protected]<mailto:[email protected]>

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 <[email protected]<mailto:[email protected]>>
To: "[email protected]<mailto:[email protected]>"
        
<[email protected]<mailto:[email protected]>>
Subject: [kepler-users] ArrayToSequence Actor
Message-ID:
        
<[email protected]<mailto:[email protected]>>
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" <[email protected]<mailto:[email protected]>>
To: Alvin Sebastian <[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>"
        
<[email protected]<mailto:[email protected]>>
Subject: Re: [kepler-users] ArrayToSequence Actor
Message-ID: 
<[email protected]<mailto:[email protected]>>
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
> [email protected]<mailto:[email protected]>
> 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 <[email protected]<mailto:[email protected]>>
To: Alvin Sebastian <[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>"
        
<[email protected]<mailto:[email protected]>>
Subject: Re: [kepler-users] ArrayToSequence Actor
Message-ID:
        
<CAAjdownfKV5X=oevnnjvdzzzdrnywt2ntntajeerpin0-p5...@mail.gmail.com<mailto:[email protected]>>
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 
<[email protected]<mailto:[email protected]>>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
> [email protected]<mailto:[email protected]>
> 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 <[email protected]<mailto:[email protected]>>
To: "[email protected]<mailto:[email protected]>"
        
<[email protected]<mailto:[email protected]>>
Subject: Re: [kepler-users] ArrayToSequence Actor
Message-ID:
        
<[email protected]<mailto:[email protected]>>
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:[email protected]<mailto:[email protected]>]
Sent: Thursday, 15 November 2012 9:32 AM
To: Alvin Sebastian
Cc: [email protected]<mailto:[email protected]>
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 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
 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
[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
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
[email protected]<mailto:[email protected]>
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
[email protected]<mailto:[email protected]>
http://www.isciences.com
http://www.terraviva.net
_______________________________________________
Kepler-users mailing list
[email protected]
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users

Reply via email to