<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I'm not that familiar with Kepler's ExternalExecution actor, but it
    looks like it uses ptolemy.actor.lib.Exec.<br>
    <br>
    The Exec actor reads data from an input port, executes a subprocess
    and places the output on the output port.<br>
    <br>
    You would need p1 to pass parameters to Dakota in a format that
    Dakota would understand.<br>
    You would need to process the Dakota output into a format that your
    p3 process would understand.<br>
    <br>
    In Synchronous Dataflow, you would need to put a SampleDelay in the
    loop.<br>
    I've attached a XML file where the initial value of the SampleDelay
    is the string "Foo"<br>
    The output of the SampleDelay is connected to the input of the
    ExternalExecution actor.<br>
    The ExternalExecution actor executes the command<br>
    sed s/Foo/Bar/<br>
    During the first iteration, the value of the input is "Foo", so the
    ExternalExecution actor substitutes "Bar".<br>
    For the second and subsequent iterations, the output is "Bar".<br>
    <br>
    I'm not sure how Dakota take parameters.  Typically, these sorts of
    tools can take parameters via a file, via the command line or via an
    input.<br>
    You would need to write code that would take the value of Kepler
    parameters and generate Dakota parameters.<br>
    See the ExpressionReader, ExpressionWriter, Token To Expression and
    Expression To Token actors.<br>
    <br>
    _Christopher<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 12/5/12 9:25 AM, Jose Borreguero
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAEee4gUxPhhtaUDkiwENVzB87=7vbn4TQCzEk6-OBrJnyEO1gA@mail.gmail.com"
      type="cite"><font color="#000099">Dear kepler users,<br>
        <br>
        Newbie to kepler and trying to figure out how to embed a call to
        the Dakota optimization package within a workflow. <br>
        <br>
        When I start the workflow, I spawn a new process (process ID
        p1). Using the ExternalExecution actor will create a new process
        for Dakota (p2). The problem is that Dakota create i turn a new
        process (p3) in order to evaluate the cost function for a given
        set of values of the parameters to be optimized. This cost
        function is a multi-step calculation which I wanted to model as
        part of the overall workflow. The problem is that the cost
        function has process ID p3, but the workflow has process ID p1.
        How can I connect all these different processes in a single
        workflow? Is this possible?<br>
        <br>
        Below is a very simplified workflow. Because it is an
        optimization process, there is a loop between Dakota and
        CostFunction evaluations.<br>
        <br>
InitParams(p1)----->ExternalActorDakota(p2)------>CompositeActorCostFunction(p3)---|<br>
                                                                 
        ^                                                                   
                                              |<br>
                                                                 
        |_____________________________________________________|<br>
        <br>
        Any help is much appreciated<br clear="all">
      </font>
      <div><span style="color:rgb(0,0,153)">Jose</span><br>
      </div>
      <br>
      <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>
    <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>