<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi ckw, <br>
    Sorry about that.  Ptolemy models from the devel tree used to open
    in Kepler, but there was a bug.<br>
    <br>
    The first error is:<br>
    Java.lang.ClassNotFoundException:
    ptolemy.vergil.basic.layout.kieler.LayoutHint<br>
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br>
        at java.security.AccessController.doPrivileged(Native Method)<br>
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br>
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)<br>
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br>
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)<br>
        at java.lang.Class.forName0(Native Method)<br>
        at java.lang.Class.forName(Class.java:247)<br>
        at
    ptolemy.moml.MoMLParser._handlePropertyElement(MoMLParser.java:5380)<br>
        at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:2898)<br>
    <br>
    This is from the layout facility (which is completely awesome now). 
    In Kepler-2.2, clicking "Skip Remaining Errors" yields:<br>
    <br>
    ptolemy.kernel.util.IllegalActionException: No Kepler ID was or
    could be assigned to model: java.lang.ClassCastException:
    ptolemy.kernel.util.StringAttribute cannot be cast to
    org.kepler.moml.NamedObjId<br>
        at
org.kepler.gui.frame.KeplerGraphTableau.<init>(KeplerGraphTableau.java:352)<br>
    <br>
    <br>
    It turns out that if the user opens a Kepler-2.2 model in Vergil
    (outside of Kepler) and saves it, the org.kepler.moml.NamedObjId
    will be replaced with a StringAttribute.  Then, if the user tries to
    reopen the model in Kepler, there will be a castexception.  So, we
    get rid of the offending attribute andcreate another.   <br>
    <br>
    I checked in a fix, but this won't help you unless you are running
    the Kepler devel tree, so attached is a Kepler version of the model
    should open under Kepler-2.2.<br>
    <br>
    A couple of notes:<br>
    - Kepler-2.2 does not seem to have a way to change the name of the
    port.  I created a Parameter with the name port2, then created a
    port<br>
    and then renamed the Parameter from port2 to port.<br>
    - If you have type problems, then set the Parameter to a dummy value
    that matches your intended output.<br>
    I set the value to {1.0,2.0}, Another way to do this would be to
    remove the Parameter, run the model, copy the contents of the
    Display, add the parameter (maybe with Undo?) and then set the
    value.<br>
    - Note that I had to add a SetVariable actor to the output and the
    port is *unconnected*.  My last model did not have this.<br>
    <br>
    _Christopher<br>
    <br>
    <br>
    <br>
    On 10/31/11 10:06 PM, kianwee chen wrote:
    <blockquote
cite="mid:CAHwgn_y6iFNKG=nUv3eTRCjpXjfKeyCP4Oby-A_1am2=JvvbJg@mail.gmail.com"
      type="cite">Hi thanks, however the file attached gives error when
      I try to open it with kepler. I read the documentation, when I
      tried it out doesnt seems to work. How do I fix the error msg ?
      would like to look at the example you send me I think will be very
      helpful for me. <br>
      <br>
      regards<br>
      ckw<br>
      <br>
      <div class="gmail_quote">On Tue, Nov 1, 2011 at 2:54 AM,
        Christopher Brooks <span dir="ltr"><<a
            moz-do-not-send="true" href="mailto:cxh@eecs.berkeley.edu">cxh@eecs.berkeley.edu</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> Hi ckw,<br>
            <br>
            The documentation for Run Composite Actor describes how to
            use the output port<br>
            <br>
            <a moz-do-not-send="true"
href="http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/ptII/doc/codeDoc/ptolemy/actor/lib/hoc/RunCompositeActor.html"
              target="_blank">http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/ptII/doc/codeDoc/ptolemy/actor/lib/hoc/RunCompositeActor.html</a><br>
            says:<br>
            <br>
            <blockquote type="cite">
              <p> If this actor has output ports and the contained model
                is executed, then upon completion of that execution, if
                this actor has parameters whose names match those of the
                output ports, then the final value of those parameters
                is sent to the output ports. If such a parameter is an
                instance of Variable (or its derived class Parameter),
                then its contained token is sent to the output token.
                Otherwise, if it is an instance of Settable, then a
                string token is produced on the output with its value
                equal to that returned by getExpression() of the
                Settable. Output ports should not be multiports. If they
                are, then all but the first channel will be ignored. A
                typical use of this actor will use the SetVariable actor
                inside to define the value of the output port. </p>
            </blockquote>
            <br>
            Unfortunately, Kepler had no documentation for this actor,
            so there was no easy way for you to find this information.<br>
            <br>
            I created " <span><span>Documentation for some actors such
                as Run Composite Actor is empty</span></span>"<br>
            <a moz-do-not-send="true"
              href="http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5529"
              target="_blank">http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5529</a><br>
            <br>
            Attached is a modified model with a parameter named "port6".<br>
            <font color="#888888"> <br>
              _Christopher</font>
            <div>
              <div class="h5"><br>
                <br>
                <br>
                <br>
                <br>
                On 10/27/11 9:15 PM, kianwee chen wrote:
                <blockquote type="cite">This is my attempt to create the
                  loop in the loop in kepler using the run composite
                  actor. I manage to get what I wanted but however it
                  seems that run composite actor is not allowed to have
                  an output port ? <br>
                  <br>
                  In the run composite actor I manage to process the
                  array and produce another array of doubles, I want to
                  output it out and use it for some comparison but
                  however whenever I put an output port in the run
                  composite actor there is an error. <br>
                  <br>
                  regards <br>
                  ckw<br>
                  <br>
                  <div class="gmail_quote">On Wed, Oct 26, 2011 at 1:58
                    PM, kianwee chen <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:chenkianwee@gmail.com"
                        target="_blank">chenkianwee@gmail.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      I downloaded your workflow and try it out and it
                      works, then I did some changes to it, in which I
                      move the sequence to array node inside the
                      composite actor, and change the number of array to
                      20 and kept the sdf director iteration to 10,
                      amazingly the random() expression still fired 20
                      times, each giving me a different number. So it
                      seems that the sdf director is not essential to
                      the workflow instead  i just need the sequence to
                      array to control the number of times random() is
                      firing ?
                      <div> <br>
                      </div>
                      <div>Basically what I am planning to achieve with
                        this is that, the random() will generate a
                        series of numbers, it will then be map to a
                        discrete parameter (e.g. length =
                        [1,5,10,15,25], width [5,10,15,20]) then the
                        parameters are send to construct an already
                        parameterise model to develop the model. <br>
                        <div><br>
                        </div>
                        <div>ckw 
                          <div>
                            <div><br>
                              <br>
                              <div class="gmail_quote">On Tue, Oct 25,
                                2011 at 11:47 PM, Christopher Brooks <span
                                  dir="ltr"><<a
                                    moz-do-not-send="true"
                                    href="mailto:cxh@eecs.berkeley.edu"
                                    target="_blank">cxh@eecs.berkeley.edu</a>></span>
                                wrote:<br>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex">
                                  <div bgcolor="#FFFFFF" text="#000000">
                                    Hi Kianwee,<br>
                                    Problem 1 has to do with multirate
                                    systems.<br>
                                    The attached model has a top level
                                    that fires once and an inside opaque
                                    composite that fires 10 times.<br>
                                    I use a sequence to array actor to
                                    cause the inside opaque composite to
                                    fire 10 times.<br>
                                    See <cite><b><a
                                          moz-do-not-send="true"
                                          href="http://ptolemy"
                                          target="_blank">http://ptolemy</a></b>.<a
                                        moz-do-not-send="true"
                                        href="http://eecs.berkeley.edu/%7Eeal/ee225a/lab/"
                                        target="_blank">eecs.berkeley.edu/~eal/ee225a/lab/</a><b>sdf</b>.pd</cite>f<br>
                                    <br>
                                    About problem #2, the Repeat actor
                                    repeats the input, it does not cause
                                    the upstream actors to be fired.<br>
                                    <br>
                                    BTW - test cases would help here.<br>
                                    <br>
                                    Also, take a look at some of the
                                    example models in the Ptolemy II
                                    distribution. <br>
                                    In the Kepler source distribution
                                    look for models in<br>
ptolemy/src/ptolemy/domains/sdf/kernel/test/auto/<br>
                                    See also<br>
ptolemy/src/ptolemy/domains/sdf/lib/test/auto/DynamicRateChange.xml<br>
                                    <br>
                                    _Christopher
                                    <div>
                                      <div><br>
                                        <br>
                                        On 10/25/11 3:06 AM, kianwee
                                        chen wrote: </div>
                                    </div>
                                    <blockquote type="cite">
                                      <div>
                                        <div>Hi all kepler users, I am
                                          trying to do a loop in a loop,
                                          something like a for loop in a
                                          for loop. The task is as
                                          follow :<br>
                                          <br>
                                          1.) So what I did was I setup
                                          a sdf director and set the
                                          iteration to 1, then create a
                                          composite actor and put a sdf
                                          director in it and set the
                                          iteration to 10. I was hoping
                                          that it would be for 1
                                          iteration outside, the
                                          composite actor will do the
                                          action 10 times inside, thus
                                          creating a looop within a
                                          loop. However it did not work.<br>
                                          <br>
                                          2.) I went on to try to do a
                                          repeat actor,  it worked, as I
                                          am using random() to produce
                                          10 different random number.
                                          The repeat gives me 10 same
                                          number. Thus its not good
                                          enough. <br>
                                          <br>
                                          Tried to find examples on this
                                          issue but did not manage to
                                          find it. Cause I read about
                                          the opaque composite actor and
                                          I thought the 1.) should have
                                          worked. <br>
                                          <br>
                                          Thanks <br>
                                          ckw<br>
                                          <br>
                                          <fieldset></fieldset>
                                          <br>
                                        </div>
                                      </div>
                                      <pre>_______________________________________________
Kepler-users mailing list
<a moz-do-not-send="true" href="mailto:Kepler-users@kepler-project.org" target="_blank">Kepler-users@kepler-project.org</a>
<a moz-do-not-send="true" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
</pre>
                                    </blockquote>
                                    <font color="#888888"> <br>
                                      <pre cols="72">-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: <a moz-do-not-send="true" href="tel:510.643.9841" value="+15106439841" target="_blank">510.643.9841</a>                                (Office: 545Q Cory)
home: (F-Tu) <a moz-do-not-send="true" href="tel:707.665.0131" value="+17076650131" target="_blank">707.665.0131</a> cell: <a moz-do-not-send="true" href="tel:707.332.0670" value="+17073320670" target="_blank">707.332.0670</a> </pre>
                                    </font></div>
                                </blockquote>
                              </div>
                              <br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </blockquote>
                <br>
                <pre cols="72">-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: <a moz-do-not-send="true" href="tel:510.643.9841" value="+15106439841" target="_blank">510.643.9841</a>                                (Office: 545Q Cory)
home: (F-Tu) <a moz-do-not-send="true" href="tel:707.665.0131" value="+17076650131" target="_blank">707.665.0131</a> cell: <a moz-do-not-send="true" href="tel:707.332.0670" value="+17073320670" target="_blank">707.332.0670</a> </pre>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
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 </pre>
  </body>
</html>