[kepler-dev] kepler/ptolemy problem

Edward A. Lee eal at eecs.berkeley.edu
Thu Jul 7 06:12:28 PDT 2005


Digging through my email, I now find the attachment...

This is not, in fact, an SDF model. I've modified the SDFDirector
so by default it is stricter about this (specifically, it calculates
buffer sizes and enforces them). There is a parameter to relax this,
but a better solution would be to use the DDFDirector...

Edward

At 02:19 PM 7/5/2005 -0700, Dan Higgins wrote:
>Hi All,
>
>I have run into a problem with the attached workflow (test.xml). The 
>graphical representation is shown below.
>
>The model is fairly simple. The ramp iterates from 0 through 4 and the 
>first time (0) the switch should output a token which causes "Testing" to 
>be written to the output file. When the ramp output is not 0, no token 
>should be sent to the T output and nothing should be output.
>
>This model runs just fine with Kepler using PTII5.0-beta as its base. 
>However, it does NOT run when I use the head of Ptolemy CVS! (This would 
>seem to indicate that some recent change in Ptolemy is the problem, since 
>I am using identical Kepler code int the 2 cases.)
>
>The error message is "Queue is at capacity of 1" and this occurs when the 
>ramp output is 1 (i.e. it works OK for a ramp output of 0)
>
>Any ideas from anyone on what the problem is?
>
>50a74fb.jpg
>
>The stack trace is:
>
>ptolemy.kernel.util.IllegalActionException:   in .test.manager
>Because:
>Queue is at capacity of 1. Cannot put a token.
>   in .test.Text File Writer.string
>
>     at ptolemy.actor.Manager.execute(Manager.java:383)
>
>     at ptolemy.actor.Manager.run(Manager.java:951)
>
>     at ptolemy.actor.Manager$2.run(Manager.java:1003)
>
>Caused by: ptolemy.actor.NoRoomException: Queue is at capacity of 1. 
>Cannot put a token.
>   in .test.Text File Writer.string
>
>     at ptolemy.domains.sdf.kernel.SDFReceiver.put(SDFReceiver.java:296)
>
>     at ptolemy.actor.TypedIOPort.send(TypedIOPort.java:575)
>
>     at ptolemy.actor.lib.Const.fire(Const.java:113)
>
>     at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:310)
>
>     at 
> ptolemy.actor.sched.StaticSchedulingDirector.fire(StaticSchedulingDirector.java:169)
>
>     at ptolemy.actor.CompositeActor.fire(CompositeActor.java:329)
>
>     at ptolemy.actor.Manager.iterate(Manager.java:601)
>
>     at ptolemy.actor.Manager.execute(Manager.java:319)
>
>     ... 2 more
>
>Caused by: ptolemy.actor.NoRoomException: Queue is at capacity of 1. 
>Cannot put a token.
>   in .test.Text File Writer.string
>
>     at ptolemy.domains.sdf.kernel.SDFReceiver.put(SDFReceiver.java:296)
>
>     at ptolemy.actor.TypedIOPort.send(TypedIOPort.java:575)
>
>     at ptolemy.actor.lib.Const.fire(Const.java:113)
>
>     at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:310)
>
>     at 
> ptolemy.actor.sched.StaticSchedulingDirector.fire(StaticSchedulingDirector.java:169)
>
>     at ptolemy.actor.CompositeActor.fire(CompositeActor.java:329)
>
>     at ptolemy.actor.Manager.iterate(Manager.java:601)
>
>     at ptolemy.actor.Manager.execute(Manager.java:319)
>
>     at ptolemy.actor.Manager.run(Manager.java:951)
>
>     at ptolemy.actor.Manager$2.run(Manager.java:1003)
>
>
>
>
>
>
>
>--
>*******************************************************************
>Dan 
>Higgins 
><mailto:higgins at nceas.ucsb.edu>higgins at nceas.ucsb.edu
>http://www.nceas.ucsb.edu/    Ph: 805-893-5127
>National Center for Ecological Analysis and Synthesis (NCEAS)
>Marine Science Building - Room 3405
>Santa Barbara, CA 93195
>*******************************************************************
>
>
>
><?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" class="ptolemy.actor.TypedCompositeActor">
>     <property name="_createdBy" 
> class="ptolemy.kernel.attributes.VersionAttribute" value="5.1-devel">
>     </property>
>     <property name="SDF Director" 
> class="ptolemy.domains.sdf.kernel.SDFDirector">
>         <property name="_location" class="ptolemy.kernel.util.Location" 
> value="[105.0, 80.0]">
>         </property>
>     </property>
>     <property name="OutputFileName" class="ptolemy.data.expr.Parameter" 
> value="&quot;C:/work/kepler/Test.txt&quot;">
>         <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
>             <property name="_color" 
> class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
>             </property>
>         </property>
>         <property name="_smallIconDescription" 
> class="ptolemy.kernel.util.SingletonConfigurableAttribute">
>             <configure>
>           <svg>
>             <text x="20" style="font-size:14; font-family:SansSerif; 
> fill:blue" y="20">-P-</text>
>           </svg>
>         </configure>
>         </property>
>         <property name="_editorFactory" 
> class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
>         </property>
>         <property name="_location" class="ptolemy.kernel.util.Location" 
> value="[-35.0, 155.0]">
>         </property>
>     </property>
>     <property name="_windowProperties" 
> class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={131, 
> 159, 836, 787}, maximized=false}">
>     </property>
>     <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" 
> value="[600, 660]">
>     </property>
>     <property name="_vergilZoomFactor" 
> class="ptolemy.data.expr.ExpertParameter" value="1.0">
>     </property>
>     <property name="_vergilCenter" 
> class="ptolemy.data.expr.ExpertParameter" value="{152.102195945946, 341.0}">
>     </property>
>     <entity name="Ramp" class="ptolemy.actor.lib.Ramp">
>         <property name="firingCountLimit" 
> class="ptolemy.data.expr.Parameter" value="5">
>         </property>
>         <property name="_location" class="ptolemy.kernel.util.Location" 
> value="[-70.0, 295.0]">
>         </property>
>     </entity>
>     <entity name="Constant" class="ptolemy.actor.lib.Const">
>         <property name="value" class="ptolemy.data.expr.Parameter" 
> value="OutputFileName">
>         </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="{135.0, 295.0}">
>         </property>    </entity>
>     <entity name="Constant2" class="ptolemy.actor.lib.Const">
>         <property name="value" class="ptolemy.data.expr.Parameter" 
> value="&quot;Testing&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="40">
>             </property>
>         </property>
>         <property name="_location" class="ptolemy.kernel.util.Location" 
> value="[375.0, 325.0]">
>         </property>
>     </entity>
>     <entity name="Text File Writer" 
> class="org.resurgence.actor.TextFileWriter">
>         <property name="Change existing" 
> class="ptolemy.data.expr.StringParameter" value="Overwrite">
>         </property>
>         <property name="_location" class="ptolemy.kernel.util.Location" 
> value="{375.0, 440.0}">
>         </property>
>     </entity>
>     <entity name="Boolean Switch" class="ptolemy.actor.lib.BooleanSwitch">
>         <property name="BooleanSwitchIcon" 
> class="ptolemy.vergil.icon.EditorIcon">
>             <property name="_windowProperties" 
> class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds = {5, 
> 136, 815, 516}, maximized = false}">
>             </property>
>             <property name="_vergilSize" 
> class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
>             </property>
>         </property>
>         <property name="_location" class="ptolemy.kernel.util.Location" 
> value="[250.0, 355.0]">
>         </property>
>     </entity>
>     <entity name="Constant3" class="ptolemy.actor.lib.Const">
>         <property name="value" class="ptolemy.data.expr.Parameter" value="0">
>         </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="[-80.0, 425.0]">
>         </property>
>     </entity>
>     <entity name="Equals" class="ptolemy.actor.lib.logic.Equals">
>         <property name="_location" class="ptolemy.kernel.util.Location" 
> value="{100.0, 390.0}">
>         </property>
>     </entity>
>     <relation name="relation" class="ptolemy.actor.TypedIORelation">
>     </relation>
>     <relation name="relation3" class="ptolemy.actor.TypedIORelation">
>     </relation>
>     <relation name="relation4" class="ptolemy.actor.TypedIORelation">
>     </relation>
>     <relation name="relation5" class="ptolemy.actor.TypedIORelation">
>     </relation>
>     <relation name="relation6" class="ptolemy.actor.TypedIORelation">
>     </relation>
>     <relation name="relation2" class="ptolemy.actor.TypedIORelation">
>         <property name="width" class="ptolemy.data.expr.Parameter" value="1">
>         </property>
>     </relation>
>     <link port="Ramp.output" relation="relation2"/>
>     <link port="Constant.output" relation="relation3"/>
>     <link port="Constant2.output" relation="relation5"/>
>     <link port="Text File Writer.string" relation="relation5"/>
>     <link port="Text File Writer.fileToWrite" relation="relation6"/>
>     <link port="Boolean Switch.input" relation="relation3"/>
>     <link port="Boolean Switch.control" relation="relation4"/>
>     <link port="Boolean Switch.trueOutput" relation="relation6"/>
>     <link port="Constant3.output" relation="relation"/>
>     <link port="Equals.input" relation="relation"/>
>     <link port="Equals.input" relation="relation2"/>
>     <link port="Equals.output" relation="relation4"/>
></entity>
>_______________________________________________
>Kepler-dev mailing list
>Kepler-dev at ecoinformatics.org
>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev

------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 50a74fb.jpg
Type: image/jpeg
Size: 0 bytes
Desc: not available
Url : http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20050707/56bb5d9e/50a74fb-0001.jpg


More information about the Kepler-dev mailing list