ModelBuilder

Below is a browsable image of the model.

  • For an executable version,
  • To view or save the MoML file for this model, click here.
ModelBuildermodel <h2>SDF Director</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>iterations</td><td>AUTO</td><td>-1</td></tr><tr><td>vectorizationFactor</td><td>1</td><td>1</td></tr><tr><td>allowDisconnectedGraphs</td><td>false</td><td>false</td></tr><tr><td>allowRateChanges</td><td>false</td><td>false</td></tr><tr><td>constrainBufferSizes</td><td>true</td><td>true</td></tr><tr><td>period</td><td>0.0</td><td>0.0</td></tr><tr><td>synchronizeToRealTime</td><td>false</td><td>false</td></tr><tr><td>startTime</td><td>&nbsp;</td><td>null</td></tr><tr><td>stopTime</td><td>&nbsp;</td><td>null</td></tr></table> <h2>JavaScript2</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>script</td><td>function fire() {\\n  alert(&quot;Counted to &quot; + get(count));\\n}</td><td>function fire() {\\n  alert(&quot;Counted to &quot; + get(count));\\n}</td></tr></table> <h2>ExecuteActor</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>firingCountLimit</td><td>0</td><td>0</td></tr></table> <h2>JavaScript</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>script</td><td>importPackage(Packages.ptolemy.actor);\\nimportClass(Packages.ptolemy.actor.lib.Ramp);\\nimportClass(Packages.ptolemy.actor.lib.FileWriter);\\nimportClass(Packages.ptolemy.actor.lib.SetVariable);\\nimportClass(Packages.ptolemy.domains.sdf.kernel.SDFDirector);\\nimportClass(Packages.ptolemy.data.expr.Parameter);\\n\\nfunction fire() {\\n  var toplevel = new TypedCompositeActor();\\n  var ramp = new Ramp(toplevel, &quot;ramp&quot;);\\n  var writer = new FileWriter(toplevel, &quot;writer&quot;);\\n  var setVariable = new SetVariable(toplevel, &quot;setVariable&quot;);\\n  setVariable.variableName.setExpression(&quot;count&quot;);\\n  new Parameter(toplevel, &quot;count&quot;).setExpression(&quot;-1&quot;);\\n\\n  var relation = toplevel.connect(ramp.output, writer.input);\\n  setVariable.input.link(relation);\\n\\n  var director = new SDFDirector(toplevel, &quot;SDFDirector&quot;);\\n  director.iterations.setExpression(valueOf(iterations).toString());\\n\\n  send(toplevel, actor);\\n}</td><td>importPackage(Packages.ptolemy.actor);\\nimportClass(Packages.ptolemy.actor.lib.Ramp);\\nimportClass(Packages.ptolemy.actor.lib.FileWriter);\\nimportClass(Packages.ptolemy.actor.lib.SetVariable);\\nimportClass(Packages.ptolemy.domains.sdf.kernel.SDFDirector);\\nimportClass(Packages.ptolemy.data.expr.Parameter);\\n\\nfunction fire() {\\n  var toplevel = new TypedCompositeActor();\\n  var ramp = new Ramp(toplevel, &quot;ramp&quot;);\\n  var writer = new FileWriter(toplevel, &quot;writer&quot;);\\n  var setVariable = new SetVariable(toplevel, &quot;setVariable&quot;);\\n  setVariable.variableName.setExpression(&quot;count&quot;);\\n  new Parameter(toplevel, &quot;count&quot;).setExpression(&quot;-1&quot;);\\n\\n  var relation = toplevel.connect(ramp.output, writer.input);\\n  setVariable.input.link(relation);\\n\\n  var director = new SDFDirector(toplevel, &quot;SDFDirector&quot;);\\n  director.iterations.setExpression(valueOf(iterations).toString());\\n\\n  send(toplevel, actor);\\n}</td></tr><tr><td>iterations</td><td>100</td><td>100</td></tr></table>