In the meantime, I managed to fabricate a feedback loop to solve this problem under PN. Attached the test workflow. It increases the number of threads in the workflow by 4. We will soon see if we can use this in Bruce's and my workflows.

Nonetheless, I am still interested in how one can solve this problem, the simpler the better.

Norbert



     Norbert Podhorszki
   ------------------------------------
     University of California, Davis
     Department of Computer Science
     1 Shields Ave, 2236 Kemper Hall
     Davis, CA 95616
     (530) 752-5076
     [EMAIL PROTECTED]
     ----------------------------------
<?xml version="1.0" standalone="no"?>
<!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
    "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd";>
<entity name="test_f_A_x_2" class="ptolemy.actor.TypedCompositeActor">
    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="6.1.devel">
    </property>
    <property name="PN Director" class="ptolemy.domains.pn.kernel.PNDirector">
        <property name="initialQueueCapacity" class="ptolemy.data.expr.Parameter" value="5000">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[-20.0, -360.0]">
        </property>
    </property>
    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={113, 84, 1041, 968}, maximized=false}">
    </property>
    <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[768, 832]">
    </property>
    <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="0.8">
    </property>
    <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{414.0, -105.0}">
    </property>
    <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Workflow to produce from two token streams&#10;    A    (a single token)&#10;and&#10;    1,2,3...   (unknown number of tokens in advance)&#10;the stream&#10;    f(A,1), f(A,2), ...&#10;&#10;&#10;The Repeat composite is transparent, so there is no problem with &#10;sending different number of tokens to its input ports.">
        </property>
        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:436:1">
        </property>
        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
            </property>
        </property>
        <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#DocumentationActor">
        </property>
        <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[-30.0, -20.0]">
        </property>
    </property>
    <property name="Annotation2" class="ptolemy.vergil.kernel.attributes.TextAttribute">
        <property name="textColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.5, 0.0, 1.0}">
        </property>
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Author: Norbert Podhorszki, UC Davis">
        </property>
        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:436:1">
        </property>
        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
            </property>
        </property>
        <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#DocumentationActor">
        </property>
        <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[-25.0, 200.0]">
        </property>
    </property>
    <entity name="Single Fire Constant" class="org.geon.ConstOnce">
        <property name="value" class="ptolemy.data.expr.Parameter" value="&quot;A&quot;">
        </property>
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
            </property>
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="25">
            </property>
            <property name="boxColor" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 1.0, 1.0, 1.0}">
            </property>
        </property>
<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:128:1">
        </property>
        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.geon.ConstOnce">
            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:997:1">
            </property>
        </property>
        <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ConstantActor">
        </property>
        <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Constant">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[10.0, -240.0]">
        </property>
    </entity>
    <entity name="Ramp" class="ptolemy.actor.lib.Ramp">
        <property name="firingCountLimit" class="ptolemy.data.expr.Parameter" value="7">
        </property>
        <property name="init" class="ptolemy.data.expr.Parameter" value="1">
        </property>
        <property name="step" class="ptolemy.actor.parameters.PortParameter" value="1">
        </property>
<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong, Edward A. Lee</configure></property>
<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The Ramp actor increments its initial value by a specified amount when the actor iterates. The actor outputs the incremented value.

The first time the actor fires, it outputs the value of the init parameter. The increment value, specified with either the step port or parameter, will only be added on the following iteration. To add an increment to the first iteration, use the Accumulator actor.

The actor accepts values of any type that support addition.</configure></property>
<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the incremented value.</configure></property>
<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An input port that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.</configure></property>
<property name="port:step" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An input port that accepts the amount by which the output is incremented on each iteration. The port accepts a value of any type that supports addition. The value is an integer and defaults to 1.</configure></property>
<property name="prop:firingCountLimit" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The number of iterations that transpire before the actor indicates that it is finished. If firingCountLimit is set to zero, the actor has no limit imposed.</configure></property>
<property name="prop:step" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount by which the output is incremented on each iteration. The port accepts a value of any type that supports addition. The default is the integer 1.</configure></property>
<property name="prop:init" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The value produced by the Ramp on its first iteration. The default value is the integer 0.</configure></property>
</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:5:1">
        </property>
        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.Ramp">
            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:881:1">
            </property>
        </property>
        <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#IterativeMathOperationActor">
        </property>
        <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#IterativeOperation">
        </property>
        <property name="semanticType222" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowInput">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[-15.0, -110.0]">
        </property>
    </entity>
    <entity name="f" class="ptolemy.actor.lib.Expression">
        <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="&quot;f(&quot;+a+&quot;,&quot;+b+&quot;)&quot;">
            <property name="_hide" class="ptolemy.data.expr.Parameter" value="true">
            </property>
        </property>
<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Xiaojun Liu, Edward A. Lee, Steve Neuendorffer</configure></property>
<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The Expression actor evaluates a specified expression (e.g., an addition or multiplication operation), which may reference the values of user-specified input port
, the current time, or the actor's iteration count. The actor outputs the value of the evaluated expression. 

Expressions are specified in the Kepler expression language via the expression parameter. For more information about the expression language, see http://ptolemy.eecs.berkeley.edu/papers/05/ptIIdesign1-intro/ptIIdesign1-intro.pdf. 

By default, the expression parameter is empty, and attempting to execute the actor without first specifying an expression generates an error. Expressions can refer to the values of inputs by the port name; to the current time by the identifier "time"; and to the current iteration count by the identifier "iteration." 

input port are created by the user and correspond to variables used in the specified expression. Currently, the Expression actor does not support input multiports. The actor requires all of its inputs to be present. If inputs are not all present, then the actor will generate an error. 

Note: the Expression actor can be used instead of many of the arithmetic actors, such as AddSubtract, MultiplyDivide, and TrigFunction. However, those actors will be usually be more efficient, and sometimes more convenient to use.</configure></property>
<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the value of the evaluated expression. The actor automatically determines the type based on the type of the input.</configure></property>
<property name="prop:expression" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An expression to evaluate. Expressions are specified in the Kepler expression language. For more information about the expression language, see http://ptolemy.eecs.berkeley.edu/papers/05/ptIIdesign1-intro/ptIIdesign1-intro.pdf. By default, the parameter is empty, and attempting to execute the actor without first specifying an expression generates an error. Expressions can refer to the values of inputs by the port name; to the current time by the identifier "time"; and to the current iteration count by the identifier "iteration."</configure></property>
</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:75:1">
        </property>
        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.Expression">
            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:950:1">
            </property>
        </property>
        <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#MathOperationActor">
        </property>
        <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
        </property>
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
            </property>
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[345.0, -100.0]">
        </property>
        <port name="a" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
        </port>
        <port name="b" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
        </port>
    </entity>
    <entity name="Display" class="ptolemy.actor.lib.gui.Display">
        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={586, 491, 450, 300}, maximized=false}">
        </property>
        <property name="_paneSize" class="ptolemy.actor.gui.SizeAttribute" value="[440, 241]">
        </property>
        <property name="rowsDisplayed" class="ptolemy.data.expr.Parameter" value="10">
        </property>
        <property name="columnsDisplayed" class="ptolemy.data.expr.Parameter" value="40">
        </property>
        <property name="suppressBlankLines" class="ptolemy.data.expr.Parameter" value="false">
        </property>
<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong, Edward A. Lee</configure></property>
<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The Display actor reads tokens of any type via its input multiport. The actor displays each token on a separate line in a text display window.

Specify the size of the text display window with the rowsDisplayed and columnsDisplayed parameters. Simply resizing the window onscreen does not persistently change the size; when the saved model is re-opened, the new size is forgotten. 

If the input happens to be a string token, then the actor strips the surrounding quotation marks before displaying the value. 

Select the suppressBlankLines parameter to specify that the actor not add blank lines to the display. By default, the actor will add blank lines.

Note: this actor can consume large amounts of memory. It is not advisable to use it to display large output streams.</configure></property>
<property name="port:input" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that accepts tokens of any type.</configure></property>
<property name="prop:suppressBlankLines" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether the actor should display blank lines (the default) or suppress them.</configure></property>
<property name="prop:rowsDisplayed" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical size of the display, in rows. The value is an integer that defaults to 10.</configure></property>
<property name="prop:columnsDisplayed" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal size of the display, in columns. The value is an integer that defaults to 40.</configure></property>
<property name="prop:title" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The title of the text display window. If specified, the value will appear in the title bar of the text display window.</configure></property>
</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:7:1">
        </property>
        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.gui.Display">
            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:883:1">
            </property>
        </property>
        <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#TextualOutputActor">
        </property>
        <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#TextualOutput">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[465.0, -120.0]">
        </property>
    </entity>
    <entity name="Repeater" class="ptolemy.actor.TypedCompositeActor">
        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:449:1">
        </property>
        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.TypedCompositeActor">
            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:449:1">
            </property>
        </property>
        <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Actor">
        </property>
        <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
        </property>
        <property name="semanticType222" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Workflow">
        </property>
<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong</configure></property>
<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Composite actor is an aggregation of actors. It may have a local director, which is responsible for executing the contained actors. A Composite actor with a local director is called an opaque actor. Composite actors with no local director are non-opaque.

To create a composite actor, drag-and-drop the Composite actor onto the Workflow canvas. Right-click the actor and select Open Actor from the drop-down menu. A new Kepler application window will open for designing the composite.</configure></property>
</property>        <property name="_location" class="ptolemy.kernel.util.Location" value="[130.0, -190.0]">
        </property>
        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={453, 236, 873, 795}, maximized=false}">
        </property>
        <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 659]">
        </property>
        <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
        </property>
        <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{376.0, 36.5}">
        </property>
        <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
            <property name="text" class="ptolemy.kernel.util.StringAttribute" value="A feedback loop which&#10; - gets the input token only once&#10; - emits the input whenever a trigger comes on the other input port&#10;&#10;There must be no director here, since the input ports &#10;receive different number of tokens.">
            </property>
            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:436:1">
            </property>
            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
                </property>
            </property>
            <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#DocumentationActor">
            </property>
            <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[140.0, -210.0]">
            </property>
        </property>
        <property name="Annotation2" class="ptolemy.vergil.kernel.attributes.TextAttribute">
            <property name="textColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.5, 0.0, 1.0}">
            </property>
            <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Author: Norbert Podhorszki, UC Davis">
            </property>
            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:436:1">
            </property>
            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
                </property>
            </property>
            <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#DocumentationActor">
            </property>
            <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[140.0, 260.0]">
            </property>
        </property>
        <port name="in" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[198.5, 99.5]">
            </property>
        </port>
        <port name="trigger" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[198.5, 199.5]">
            </property>
        </port>
        <port name="out" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[523.5, -50.5]">
            </property>
        </port>
        <entity name="BooleanSelect" class="ptolemy.actor.lib.BooleanSelect">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[258.5, 69.5]">
            </property>
            <port name="control" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="NORTH">
                </property>
            </port>
        </entity>
        <entity name="SampleDelay" class="ptolemy.domains.sdf.lib.SampleDelay">
            <property name="initialOutputs" class="ptolemy.data.expr.Parameter" value="{false}">
            </property>
<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Steve Neuendorffer, Edward A. Lee</configure></property>
<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The SampleDelay actor outputs a set of tokens that are used when a workflow starts up as initial input values. The actor is used to break dependency cycles created by directed loops [feedback loops??] in SDF models. 

Feedback loops, created when an actor cycles its own output into its input port, can create "deadlock" errors under an SDF Director. The deadlock errors occur because the actor depends on its own output value as an initial input. To fix this problem, use a SampleDelay actor to inject an initial value into the workflow.

Specify an array of initial values with the initialOutputs parameter. By default, the actor produces a single integer token, {0}.</configure></property>
<property name="port:input" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An input port that accepts tokens of any type.</configure></property>
<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the initial tokens.</configure></property>
<property name="prop:initialOutputs" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The values produced when the workflow is initialized. The value must be an array token, and defaults to an array that contains a single integer token, {0}.</configure></property>
</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:365:1">
            </property>
            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.domains.sdf.lib.SampleDelay">
                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1131:1">
                </property>
            </property>
            <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ControlActor">
            </property>
            <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowControl">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[308.5, -5.5]">
            </property>
            <port name="input" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="EAST">
                </property>
            </port>
            <port name="output" class="ptolemy.actor.TypedIOPort">
                <property name="output"/>
                <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="WEST">
                </property>
            </port>
        </entity>
        <entity name="repeater" class="ptolemy.actor.lib.Expression">
            <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="a">
                <property name="_hide" class="ptolemy.data.expr.Parameter" value="true">
                </property>
            </property>
<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Xiaojun Liu, Edward A. Lee, Steve Neuendorffer</configure></property>
<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The Expression actor evaluates a specified expression (e.g., an addition or multiplication operation), which may reference the values of user-specified input port
, the current time, or the actor's iteration count. The actor outputs the value of the evaluated expression. 

Expressions are specified in the Kepler expression language via the expression parameter. For more information about the expression language, see http://ptolemy.eecs.berkeley.edu/papers/05/ptIIdesign1-intro/ptIIdesign1-intro.pdf. 

By default, the expression parameter is empty, and attempting to execute the actor without first specifying an expression generates an error. Expressions can refer to the values of inputs by the port name; to the current time by the identifier "time"; and to the current iteration count by the identifier "iteration." 

input port are created by the user and correspond to variables used in the specified expression. Currently, the Expression actor does not support input multiports. The actor requires all of its inputs to be present. If inputs are not all present, then the actor will generate an error. 

Note: the Expression actor can be used instead of many of the arithmetic actors, such as AddSubtract, MultiplyDivide, and TrigFunction. However, those actors will be usually be more efficient, and sometimes more convenient to use.</configure></property>
<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the value of the evaluated expression. The actor automatically determines the type based on the type of the input.</configure></property>
<property name="prop:expression" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An expression to evaluate. Expressions are specified in the Kepler expression language. For more information about the expression language, see http://ptolemy.eecs.berkeley.edu/papers/05/ptIIdesign1-intro/ptIIdesign1-intro.pdf. By default, the parameter is empty, and attempting to execute the actor without first specifying an expression generates an error. Expressions can refer to the values of inputs by the port name; to the current time by the identifier "time"; and to the current iteration count by the identifier "iteration."</configure></property>
</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:75:1">
            </property>
            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.Expression">
                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:950:1">
                </property>
            </property>
            <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#MathOperationActor">
            </property>
            <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
                </property>
                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[408.5, 119.5]">
            </property>
            <port name="a" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
            </port>
            <port name="b" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
            </port>
        </entity>
        <entity name="Constant" class="ptolemy.actor.lib.Const">
            <property name="value" class="ptolemy.data.expr.Parameter" value="true">
            </property>
<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:1:1">
            </property>
            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.Const">
                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:877:1">
                </property>
            </property>
            <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ConstantActor">
            </property>
            <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Constant">
            </property>
            <property name="kar" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:kar:57:1">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
                </property>
                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="40">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[433.5, 14.5]">
            </property>
            <port name="output" class="ptolemy.actor.TypedIOPort">
                <property name="output"/>
                <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="WEST">
                </property>
            </port>
            <port name="trigger" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="multiport"/>
                <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="EAST">
                </property>
            </port>
        </entity>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <vertex name="vertex1" value="[478.5, -50.5]">
            </vertex>
        </relation>
        <relation name="relation3" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation4" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation6" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation5" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <link port="in" relation="relation5"/>
        <link port="trigger" relation="relation6"/>
        <link port="out" relation="relation2"/>
        <link port="BooleanSelect.trueInput" relation="relation2"/>
        <link port="BooleanSelect.falseInput" relation="relation5"/>
        <link port="BooleanSelect.control" relation="relation4"/>
        <link port="BooleanSelect.output" relation="relation"/>
        <link port="SampleDelay.input" relation="relation3"/>
        <link port="SampleDelay.output" relation="relation4"/>
        <link port="repeater.output" relation="relation2"/>
        <link port="repeater.a" relation="relation"/>
        <link port="repeater.b" relation="relation6"/>
        <link port="Constant.output" relation="relation3"/>
        <link port="Constant.trigger" relation="relation2"/>
    </entity>
    <relation name="relation3" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
    </relation>
    <relation name="relation4" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
        <vertex name="vertex1" value="[85.0, -90.0]">
        </vertex>
    </relation>
    <relation name="relation5" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
    </relation>
    <relation name="relation8" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
    </relation>
    <link port="Single Fire Constant.output" relation="relation5"/>
    <link port="Ramp.output" relation="relation4"/>
    <link port="f.output" relation="relation3"/>
    <link port="f.a" relation="relation8"/>
    <link port="f.b" relation="relation4"/>
    <link port="Display.input" relation="relation3"/>
    <link port="Repeater.in" relation="relation5"/>
    <link port="Repeater.trigger" relation="relation4"/>
    <link port="Repeater.out" relation="relation8"/>
</entity>

Reply via email to