<div>Yes, SDF requires fixed token production/consumption rates which doesn't go well with "conditional execution" / "data-dependent routing" of tokens.</div><div>There's also the  <span class="Apple-style-span" style="border-collapse: collapse; color: rgb(31, 66, 124); font-family: 'Lucida Grande', Verdana, Lucida, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; "><a title="Kepler Newsletter September 2008" class="internal-link" href="https://kepler-project.org/users/newsletter/2008-09-kepler-news.pdf" style="color: rgb(0, 91, 183); text-decoration: none; font-size: 0.95em; border-bottom-width: 1px; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; background-color: rgb(255, 255, 255);">September 2008 <span class="highlightedSearchTerm">Kepler</span> <span class="highlightedSearchTerm">Newsletter</span></a> </span>which explains this use case.</div>

<div><br></div><div>Here's a part of it (partial; get the newsletter for the rest):</div><div><br></div><div><img src="cid:ii_12e1be642a9a501f" alt="2011-02-12_1359.png" title="2011-02-12_1359.png"><br></div><div><br>

</div><div>Bertram</div><br><br><div class="gmail_quote">On Thu, Feb 10, 2011 at 2:01 PM, Christopher Brooks <span dir="ltr"><<a href="mailto:cxh@eecs.berkeley.edu">cxh@eecs.berkeley.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Hao,<br>
See:<br>
<a href="http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/ptII/doc/codeDoc/ptolemy/backtrack/automatic/ptolemy/actor/lib/BooleanSwitch.html" target="_blank">http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/ptII/doc/codeDoc/ptolemy/backtrack/automatic/ptolemy/actor/lib/BooleanSwitch.html</a><br>


<br>
"Note that the this actor may be used in Synchronous Dataflow (SDF) models, but only under certain circumstances. Specifically, downstream actors will be fired whether a token is sent to them or not. This will only work if the downstream actors specifically check to see whether input tokens are available."<br>


<br>
Models that have branches that can change during execution are<br>
not usually SDF because the number of tokens can change during<br>
execution.  SDF statically schedules the firing of tokens<br>
depending on the number of tokens produced or consumed.<br>
<br>
Try using DDF.<br>
<br>
Try searching the net and groups for BooleanSwitch, see<br>
<a href="https://kepler-project.org/users/faq#the-booleanswitch-actor-is" target="_blank">https://kepler-project.org/users/faq#the-booleanswitch-actor-is</a><br>
<br>
_Christopher<div><div></div><div class="h5"><br>
<br>
On 2/10/11 12:46 PM, Hao Qian wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Hi,<br>
<br>
Under the SDF director, how to branch the workflow according to some condition, like an “if – else –“ statement? There is a “Boolean Switch” actor, but the document says it cannot be used under SDF<br>
director.<br>
<br>
Thanks!<br>
<br>
Hao<br>
<br>
<br>
<br></div></div>
_______________________________________________<br>
Kepler-users mailing list<br>
<a href="mailto:Kepler-users@kepler-project.org" target="_blank">Kepler-users@kepler-project.org</a><br>
<a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><br>
</blockquote>
<br>
-- <br>
Christopher Brooks, PMP                       University of California<br>
CHESS Executive Director                      US Mail: 337 Cory Hall<br>
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774<br>
ph: 510.643.9841                              (Office: 545Q Cory)<br>
home: (F-Tu) 707.665.0131 cell: 707.332.0670<br>
_______________________________________________<br>
Kepler-users mailing list<br>
<a href="mailto:Kepler-users@kepler-project.org" target="_blank">Kepler-users@kepler-project.org</a><br>
<a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><br>
</blockquote></div><br>