[kepler-users] [Fwd: Re: String Feedback Loop]

Christopher Brooks cxh at eecs.berkeley.edu
Thu Oct 1 08:16:55 PDT 2009


Hi Jim,
I temporarily checked your example into the ptII devel tree,
the actors are $PTII/ptolemy/actor/lib/test/LoopTest2.java
and $PTII/ptolemy/actor/lib/test/SearchTest.java.
The test is
$PTII/ptolemy/actor/lib/test/YOTCtest1.xml


When I run the model you sent, which does not have a delay in the
feedback loop, I get:

  ptolemy.actor.sched.NotSchedulableException: Actors remain that cannot be scheduled!

  Note that there are many reasons why a graph cannot be scheduled:
  * SDF Graphs with feedback loops should have an actor with a delay in the loop, such as VariableDelay.
  * The SDF director has an "allowDisconnectedGraphs"parameter, which, when true, permits  disconnected SDF graphs.
  * The token consumption rate and production rates might be mismatched.  Usually, actors produce one token or consume one token on a port.  To produce or consume multiple tokens per firing, add a 
"tokenConsumptionRate" or "tokenConsumptionRate" parameter to the appropriate port.
  For details, see the SDF chapter in Volume Three of the Ptolemy II design doc at http://ptolemy.eecs.berkeley.edu/ptolemyII/designdoc.htm
  Unscheduled actors:
  .YOTCtest1.Display .YOTCtest1.LoopTest2 .YOTCtest1.SearchTest2
  Scheduled actors:
  .YOTCtest1.Ramp


The above message is slightly wrong, it refers to VariableDelay, I just fixed
it to refer to SampleDelay.

However, even after adding a SampleDelay, I still get an error.
The problem is that LoopTest2 is not an SDF actor because its fire
method reads an input and then, depending on the value of the input,
sends a token to one or the other ports.  This means that we can't
statically schedule the firings.  Thus, the model is a DDF model.

I poked around a bit at getting this to work under DDF, but ran out
of time.

Edward, could you take a look?

_Christopher

Chad Berkley wrote:
> Hey Christopher,
> 
> I'm trying to figure out this SDF looping problem for Jim.  I tried 
> inserting a sampleDelay actor into the loop, but the SDF director still 
> says
> 
> "ptolemy.actor.NoTokenException: Attempt to get token from an empty 
> QueueReceiver.
>   in .YOTCtest1.SearchTest2.search"
> 
> I also tried removing the Ramp all together and adding a port to the 
> SearchTest actor to do the counting instead.  SDF doesn't like that either.
> 
> Do you have any experience with feedback loops in SDF?  I'm not sure 
> this loop is legal or will work.  I also tried this in DE, but I have 
> very little experience with the DE domain so it didn't work.  Any info 
> is appreciated.  The workflow and actors are attached in a tar file.
> 
> chad
> 
> 
> -------- Original Message --------
> Subject: Re: [kepler-users] String Feedback Loop
> Date: Thu, 24 Sep 2009 17:54:44 -0400
> From: Jim Amrhein <James.S.Amrhein at nasa.gov>
> To: Chad Berkley <berkley at nceas.ucsb.edu>
> References: <4ABA6F07.9060809 at nasa.gov> <4ABBDA0F.50905 at nceas.ucsb.edu>
> 
> Chad,
>    Sure. Attached are 2 custom Actors (LoopTest2 and SearchTest which
> reside in modules/giovanni/src/gov/nasa/gsfc/giovanni/) and the workflow
> YOTCtest1.xml which uses the 2 custom actors plus Ramp and Display. I
> tried to make this as simple as I could.
> As it stands now, I get an error, but if  you remove the feedback
> relation and replace it with another Display actor, you'll  see that the
> Feedback should have data following thru it.
> 
> Any advice would be appreciated.
> 
> Thanks,
>        JSA
> 
> 
> Chad Berkley wrote:
>> Hi Jim,
>>
>> It seems like this should be possible and should work.  Could you send 
>> me your workflow so I can give it a try and see if I can find the 
>> problem?
>>
>> thanks,
>> chad
>>
>>
>> Jim Amrhein wrote:
>>  
>>> Hi,
>>>    I'm trying to get a "string feedback loop" that involves multiple 
>>> actors, instead of normal single actor.
>>>    The test I'm trying to do is have a Loop Actor build a search 
>>> string based on Spatial region that gets executed in the Search Actor 
>>> until we either find results or the search region grows to be 
>>> +-90,+-180. Any results get sent back to the Loop Actor via an input 
>>> String for confirmation, before being forwarded to other actors for 
>>> processing.
>>>    The Spatial region grows by 1 degree every iteration.
>>>
>>>    The search Actor will aways return a String back to the Loop 
>>> Actor's input.
>>>    Which can either be "Found result" when a search is successful , 
>>> or "No Data" when a search fails.
>>>
>>> But, I'm running into a various set of problems based on which 
>>> Director I try to  use:
>>>
>>> When using a SDF Director I get the normal Error "Actors remain 
>>> cannot be scheduled!". I tried modify the SampleDelay actor to send 
>>> "No Data", but that didn't work and I'm not planning to use numerical 
>>> values. Eventually the "Found data" will be replaced with the actual 
>>> Results found.
>>> ...          PN Director , I see the Ramp executed once (with a value 
>>> of "1"), then execution finishes, without any further output.
>>> ...          DDF Director , The code executes without any output 
>>> (none of the STDOUT messages I have get printed, even tho the loop 
>>> completes)
>>>         Any suggestions would be appreciated.
>>>
>>> Thanks,
>>>       JSA
>>>
>>> _______________________________________________
>>> Kepler-users mailing list
>>> Kepler-users at kepler-project.org
>>> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>>>     
> 
> 

-- 
Christopher Brooks (cxh at eecs berkeley edu) University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841 fax:510.642.2718	      (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480



More information about the Kepler-users mailing list