<span style="font-family: courier new,monospace;">Dear Keplerites:</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">I have been making steady progress understanding how to write actors for Kepler using the PythonScript actor. However, I have hit a stumbling block in my attempts to set input_tokenConsumptionRate. </span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">To illustrate my problem, I have attached a simple workflow with an actor titled "IntTokenSum" written with the PythonScript actor. This actor is designed to add some number of integer tokens from it's "input" port. The number of tokens is defined by the "windowsize" port. The number of tokens to consume with each "fire" is defined with the "blocksize" port. The current version works as desired with the exception of the blocksize input prot (it always takes on the value of the windowsize input port).</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Q1: As the script is currently configured, the windowsize parameter works as advertised. However, I can't seem to get the blocksize parameter to work. I've tried a number of approaches to setting the input_tokenConsumptionRate per the java code for several actors (e.g., DownSample). But now I'm wondering if that is the correct approach. Perhaps its the call to self.input.get that needs to be changed. Correct output on Display2 should be the sequence: 1, 3, 5, 7, 9, 11, 13, 15, 17</span>.<br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Q2: I'd also like to use an actor along these lines under the SDF director with portparameters for windowsize and blocksize. But can't figure out how to to this with the PythonScript actor. Is this possible? If so, I would welcome guidance.</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Q3: Finally, it should be fairly easy to make this actor polymorphic. I think this can be done by changing the line:</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> val = val + it.intValue()</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">to</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> val = it.add(val)</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">But I am not sure how to initialize val to the additive identity (generalized notion of zero).</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">