Yes, SDF requires fixed token production/consumption rates which doesn't go well with "conditional execution" / "data-dependent routing" of tokens. There's also the September 2008 Kepler Newsletter<https://kepler-project.org/users/newsletter/2008-09-kepler-news.pdf> which explains this use case.
Here's a part of it (partial; get the newsletter for the rest): [image: 2011-02-12_1359.png] Bertram On Thu, Feb 10, 2011 at 2:01 PM, Christopher Brooks <cxh at eecs.berkeley.edu>wrote: > Hi Hao, > See: > > http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/ptII/doc/codeDoc/ptolemy/backtrack/automatic/ptolemy/actor/lib/BooleanSwitch.html > > "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." > > Models that have branches that can change during execution are > not usually SDF because the number of tokens can change during > execution. SDF statically schedules the firing of tokens > depending on the number of tokens produced or consumed. > > Try using DDF. > > Try searching the net and groups for BooleanSwitch, see > https://kepler-project.org/users/faq#the-booleanswitch-actor-is > > _Christopher > > > On 2/10/11 12:46 PM, Hao Qian wrote: > >> Hi, >> >> 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 >> director. >> >> Thanks! >> >> Hao >> >> >> >> _______________________________________________ >> Kepler-users mailing list >> Kepler-users at kepler-project.org >> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users >> > > -- > Christopher Brooks, PMP University of California > CHESS Executive Director US Mail: 337 Cory Hall > Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774 > ph: 510.643.9841 (Office: 545Q Cory) > home: (F-Tu) 707.665.0131 cell: 707.332.0670 > _______________________________________________ > Kepler-users mailing list > Kepler-users at kepler-project.org > 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/20110212/fd568729/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: 2011-02-12_1359.png Type: image/png Size: 110781 bytes Desc: not available URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20110212/fd568729/attachment-0001.png>