[kepler-dev] Re: [kepler-cvs] kepler/src/org/sdm/spa ArrayToSequence.java

xiaowen xin2 at llnl.gov
Wed Jul 7 16:19:19 PDT 2004


Hi Steve,

Doh!  Shame on me for not seeing that non-deterministic merge. *blush*

You're completely right that the expression you proposed would be much 
cleaner and correct too.

I've attached my latest attempt to do this, this time without the 
accumulator.  I've simplified it to two SampleDelay actors and one 
Expression actor.  Will you please glance over it?


Thanks!
Xiaowen

Stephen Andrew Neuendorffer wrote:
> I'm not sure that this does what you want..
> 
> Note that having the '0' and the '1' connected to the same relation 
> results in a non-deterministic merge: The bane of process networks.  
> Probably the PN director should detect this and throw an exception.  I 
> think what you mean is an expression like:
> 
> reset ? 0 : input
> 
> My suggestion would be to try doing it without the accumulator...  You 
> should be able to do this with one sampleDelay and one reasonably simple 
> expression actor.
> 
> Steve
> 
> At 02:58 PM 7/7/2004, xiaowen wrote:
> 
>> Hi Steve,
>>
>> Thanks much for your suggestion and help in better understanding how I 
>> might implement the actor without writing Java code!  I haven't used 
>> the SampleDelay actor before, but now I see how I can use it to get 
>> the behavior I want.
>>
>> I've spent some time thinking about how I can work in the reset 
>> functionality and I think I've got a solution.
>>
>>            ---------
>> reset  --> | count | ---> count
>> update --> ---------
>>
>> For each element the workflow processes, Count first takes in a reset 
>> token, outputs a count token, then takes in an update token.
>>
>> So except for the first iteration, we can think of it as taking in the 
>> update token for (element n) and the reset token for (element n+1) at 
>> the same time, then outputting the count token for (element n+1).
>>
>> The way to take care of the first iteration is to use a SampleDelay 
>> actor to produce an extra update token.
>>
>> I've attached a workflow demonstrating what I mean.  If you get a 
>> chance, will you please take a look at it and tell me what you think?
>>
>>
>> Thanks!
>> Xiaowen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my-count.xml
Type: text/xml
Size: 11557 bytes
Desc: not available
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20040707/55a0c5c6/attachment.xml>


More information about the Kepler-dev mailing list