[kepler-dev] PN + DDF
Edward A. Lee
eal at eecs.berkeley.edu
Wed Aug 23 20:07:20 PDT 2006
I'm checking in a fix, and cc'd the author of DDFDirector, so he
can check whether he agrees with the fix. I've also added your example
to the test suite. Thanks for providing it.
The problem was subtle. It turns out that when DDF is inside
some other domain, and no consumption rates are specified on input
ports, then it would transfer all available input tokens before
firing any actors inside. However, if the outside is PN, then input
tokens are _always_ available (hasToken() always returns true
at an input port). Hence, the DDFDirector was stuck in an infinite
loop transferring input tokens.
My change to DDFDirector is simple. The transferInputs() methods
transfers at most one token if no rates are specified. Notice that
this is the right behavior also if the outside domain is SDF!
The previous behavior would result in non-sdf behavior even
if the inside DDF composite semantically exhibited SDF behavior
at its boundaries. So I'm pretty sure this is the semantics we want...
At 10:25 AM 8/21/2006, Norbert Podhorszki wrote:
>I am experiencing trouble with smooth co-operation of PN and DDF
>models in the current head of ptolemy.
>Namely, a stream of tokens in a PN workflow simply disappears when
>diving into a DDF controlled subwf. See DDFtest.xml.
>If I put the DDF composite within an SDF composite, then it works as
>expected. See DDFtest2.xml
>My Kepler workflows definitely need DDF to handle branching combined
>with single-thread execution, so please, do not just say, DDF is
>experimental... They worked for several months but I realized this
>morning that this was because there was an SDF always between PN and DDF.
>PS: I will consider SDF Case, I promise, but I have loops as well in DDF.
> Norbert Podhorszki
> University of California, Davis
> Department of Computer Science
> 1 Shields Ave, 2236 Kemper Hall
> Davis, CA 95616
> (530) 754-8188
> pnorbert at cs.ucdavis.edu
>Kepler-dev mailing list
>Kepler-dev at ecoinformatics.org
Edward A. Lee
Professor, Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
More information about the Kepler-dev