<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Muhammad,<br>
      This is an excellent question and something I've been meaning to
      try to answer in the Ptolemy II faq.<br>
      <br>
      I just added something to the Ptolemy II faq about this:<br>
<a class="moz-txt-link-freetext" href="http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIfaq.htm#parameterSweeps">http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIfaq.htm#parameterSweeps</a><br>
      says:<br>
      <blockquote type="cite">
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        <dt> <a name="parameterSweeps"><b>4.11 How do a do a parameter
              sweep?</b></a>
        </dt>
        <dd> A Parameter Sweep is when a model is run a number of times
          with different parameters to perhaps find an optimal solution.
          For details, see <a
href="http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/ParameterSweeps#in_browser"
            target="_top">http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/ParameterSweeps</a>.
        </dd>
      </blockquote>
<a class="moz-txt-link-freetext" href="http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/ParameterSweeps">http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/ParameterSweeps</a><br>
      says:<br>
      <br>
      <blockquote type="cite">
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        <h1 class="titlepage">Parameter Sweeps
        </h1>
        <div id="rightbody"> </div>
        <div id="wikitext">
          <p>A Parameter Sweep is when a model is run a number of times
            with different parameters to perhaps find an optimal
            solution. </p>
          <p class="vspace">These two articles in Wikipedia might be of
            interest.
          </p>
          <ul>
            <li><a class="urllink"
                href="https://en.wikipedia.org/wiki/Design_of_experiments"
                rel="nofollow">Design of Experiments (DoE)</a>
              (Wikipedia)
            </li>
            <li><a class="urllink"
                href="https://en.wikipedia.org/wiki/Monte_carlo_simulation"
                rel="nofollow">Monte Carlo Simulation</a> (Wikipedia)
            </li>
          </ul>
          <p class="vspace">One way to do optimization in Ptolemy II
            would be to do a parameter sweep on a model by using the
            higher order component (HOC) actors
            such as ModelReference. </p>
          <p class="vspace">See the ModelReference actor:
          </p>
          <ul>
            <li>Docs: <a class="urllink"
href="http://sisyphus.eecs.berkeley.edu:8079/hudson/job/ptII/javadoc/ptolemy/actor/lib/hoc/ModelReference.html"
                rel="nofollow">http://sisyphus.eecs.berkeley.edu:8079/hudson/job/ptII/javadoc/ptolemy/actor/lib/hoc/ModelReference.html</a>
            </li>
            <li>Demo:
              ptolemy/actor/lib/hoc/demo/ModelReference/ModelReference.xml
            </li>
          </ul>
          <p class="vspace">and RunCompositeActor
          </p>
          <ul>
            <li><a class="urllink"
href="http://sisyphus.eecs.berkeley.edu:8079/hudson/job/ptII/javadoc/ptolemy/actor/lib/hoc/RunCompositeActor.html"
                rel="nofollow">http://sisyphus.eecs.berkeley.edu:8079/hudson/job/ptII/javadoc/ptolemy/actor/lib/hoc/RunCompositeActor.html</a>
            </li>
          </ul>
          <p>Tests:
          </p>
          <ul>
            <li>ptII/ptolemy/actor/lib/hoc/test/auto/DEInPNInRunCompositeActor.xml
            </li>
            <li>ptII/ptolemy/actor/lib/hoc/test/auto/RunCompositeActor.xml
            </li>
            <li>ptII/ptolemy/actor/lib/hoc/test/auto/RunCompositeActor2.xml
            </li>
            <li>ptII/ptolemy/actor/lib/hoc/test/auto/RunCompositeActor3.xml
            </li>
            <li>ptII/ptolemy/actor/lib/hoc/test/auto/RunCompositeActor4.xml
            </li>
          </ul>
          <p class="vspace">It is also possible to use a state machine:
          </p>
          <ul>
            <li>$PTII/ptolemy/domains/modal/demo/MultipleRuns/MultipleRuns.xml
            </li>
          </ul>
          <p class="vspace">Another way is to invoke the model multiple
            times from the command line and pass in different command
            line arguments. Properly escaping a string can be tricky.
          </p>
          <ul>
            <li>See <a class="urllink"
href="http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIfaq.htm#invoking%20Ptolemy%20II"
                rel="nofollow">http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIfaq.htm#invoking%20Ptolemy%20II</a>?
            </li>
          </ul>
          <h2>Ptolemy/Kepler papers that cover Parameter Sweeps</h2>
          <ul>
            <li>Jianwu Wang, "<a class="urllink"
                href="http://chess.eecs.berkeley.edu/pubs/806/"
                rel="nofollow">Distributed Execution Architectures in
                Ptolemy II</a>," 9th Biennial Ptolemy Miniconference,
              February 16, 2011
            </li>
            <li>Jianwu Wang, Altintas, I., Hosseini, P.R., Barseghian,
              D., Crawl, D., Berkley, C., Jones, M.B., "<a
                class="urllink"
href="http://users.sdsc.edu/%7Ejianwu/JianwuWang_files/Accelerating%20Parameter%20Sweep%20Workflows%20by%20Utilizing%20Ad-hoc%20Network%20Computing%20Resources%20-%20an%20Ecological%20Example%20%28SWF%202009%29.pdf"
                rel="nofollow">Accelerating Parameter Sweep Workflows by
                Utilizing Ad-hoc Network Computing Resources: an
                Ecological Example</a>," Services - I, 2009 World
              Conference on, 6-10 July 2009. <a class="urllink"
                href="http://dx.doi.org/10.1109/SERVICES-I.2009.9"
                rel="nofollow">DOI</a>
            </li>
            <li> David Abramson, Blair Bethwaite, Colin Enticott,
              Slavisa Garic, Tom Peachey, "<a class="urllink"
                href="http://link.springer.com/chapter/10.1007%2F978-3-642-01970-8_11"
                rel="nofollow">Parameter Space Exploration Using
                Scientific Workflows</a>," Computational Science – ICCS
              2009, Lecture Notes in Computer Science Volume 5544, 2009,
              pp 104-113. </li>
          </ul>
          <h2>Ptolemy/Kepler Mailing List mentions of Parameter Sweeps</h2>
          <ul>
            <li><a class="urllink"
href="https://groups.google.com/forum/#%21msg/bcvtb/O0yofsqczOs/lNK1skgh5iQJ"
                rel="nofollow">Monte Carlo Simulation In BCVTB</a>
              October, 2012.
            </li>
            <li><a class="urllink"
href="https://lists.eecs.berkeley.edu/sympa/arc/ptolemy-hackers/2008-01/msg00007.html"
                rel="nofollow">Re: [kepler-users] System Dynamics Actor?</a>
              Jan. 2008.
            </li>
          </ul>
        </div>
      </blockquote>
      <br>
      On 9/18/13 6:14 AM, Muhammad Usama wrote:<br>
    </div>
    <blockquote
cite="mid:CAMgTkN4VXP1Bo4ddL+0EC0_yUN3r+tSfGoZKwnAKhnWWoF6Xmw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Is there any way I can automate workflows? e.g. set the
          range of results which are required and then the workflow
          executes in loop and on each iterations some parameters are
          adjusted until the results meet the defined criteria?<br>
          <br>
        </div>
        Is there anyway I can do that in kepler? or is there any other
        system where I can do that?<br clear="all">
        <div>
          <div><br>
            -- <br>
            <div>Muhammad Usama</div>
            <div>2011-NUST-MS-CS-009</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kepler-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Christopher Brooks, PMP                       University of California
Academic Program Manager & Software Engineer  US Mail: 337 Cory Hall
CHESS/iCyPhy/Ptolemy/TerraSwarm               Berkeley, CA 94720-1774
<a class="moz-txt-link-abbreviated" href="mailto:cxh@eecs.berkeley.edu">cxh@eecs.berkeley.edu</a>, 707.332.0670           (Office: 545Q Cory)
</pre>
  </body>
</html>