[kepler-users] is it possible to embed Dakota in a Kepler workflow?
Christopher Brooks
cxh at eecs.berkeley.edu
Fri Dec 7 10:34:23 PST 2012
I'm not that familiar with Kepler's ExternalExecution actor, but it
looks like it uses ptolemy.actor.lib.Exec.
The Exec actor reads data from an input port, executes a subprocess and
places the output on the output port.
You would need p1 to pass parameters to Dakota in a format that Dakota
would understand.
You would need to process the Dakota output into a format that your p3
process would understand.
In Synchronous Dataflow, you would need to put a SampleDelay in the loop.
I've attached a XML file where the initial value of the SampleDelay is
the string "Foo"
The output of the SampleDelay is connected to the input of the
ExternalExecution actor.
The ExternalExecution actor executes the command
sed s/Foo/Bar/
During the first iteration, the value of the input is "Foo", so the
ExternalExecution actor substitutes "Bar".
For the second and subsequent iterations, the output is "Bar".
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.
You would need to write code that would take the value of Kepler
parameters and generate Dakota parameters.
See the ExpressionReader, ExpressionWriter, Token To Expression and
Expression To Token actors.
_Christopher
On 12/5/12 9:25 AM, Jose Borreguero wrote:
> Dear kepler users,
>
> Newbie to kepler and trying to figure out how to embed a call to the
> Dakota optimization package within a workflow.
>
> 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?
>
> Below is a very simplified workflow. Because it is an optimization
> process, there is a loop between Dakota and CostFunction evaluations.
>
> InitParams(p1)----->ExternalActorDakota(p2)------>CompositeActorCostFunction(p3)---|
> ^ |
> |_____________________________________________________|
>
> Any help is much appreciated
> Jose
>
>
>
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at kepler-project.org
> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121207/cec5f64a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExecLoop.xml
Type: text/xml
Size: 32812 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121207/cec5f64a/attachment-0001.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExecLoopScreenShot.png
Type: image/png
Size: 22503 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121207/cec5f64a/attachment-0001.png>
More information about the Kepler-users
mailing list