[kepler-users] add a complex formula on Kepler - group expressions?

Ilkay Altintas altintas at sdsc.edu
Thu Dec 14 10:58:09 PST 2006


Karen,

Looks like you're on the right track. Putting them into a composite  
actor is a good solution.

You can just carry the part of the workflow you want to have in the  
composite by cutting and pasting it into a composite actor and adding  
ports for the input/output of that part to the composite.

You can use workflow parameters if you want to interact with  
variables in your expressions through the composite actor interface  
(by double-clicking) instead of having to open the composite actor  
every time you want to change a parameter.

HTH,
-ilkay

On Dec 14, 2006, at 10:17 AM, Karen Tang wrote:

> Hi Matt,
>
> Thanks for your help, the expression component works for my  
> calculation.
> Because  my calculation formula  is long and includes 14 constants  
> and 3
> parameters(T, P, S), I divided it into 6 expressions. Currently I have
> all 6 expressions on my workflow. But I am thinking the workflow  
> will be
> more user friendly if I can put these expression actors into one
> composite actor. Am I on the right track? If yes, please give me some
> instructions. If not, what is the best way to do it? Please advise.
>
> To make it clear, here is the expressions:
>
>     * Oxygen:    V1*Oxsat*exp(Pcor*P) -- final output
>     * V1:            exp(ATa+S*BTa)
>     * Oxsat:        Soc*(V+Voffset)*exp(Tcor*T)
>     * ATa:          a1+a2*(100/Ta)+a3*log(Ta/100)+a4*(Ta/100)
>     * BTa:          b1+b2*(Ta/100)+b3*pow((Ta/100),2)
>     * Ta:            T0+T
>
> Regards,
>
> Karen
>
> Matthew Jones wrote:
>
>> Hi Karen,
>>
>> You probably will want to use one of the expression actors to
>> calculate a complex formula.  Your main choices are:
>>
>> Expression: allows arithmetic and statistical operations on data,
>> including power functions and logarithms, that can be expressed as a
>> single statement
>>
>> RExpression: allows scripts of arbitrary complexity to be run on  
>> the R
>> System for statistical computing, including simple arithmetic, vector
>> and matrix operations, and complex statistical operations.  R is a
>> full-featured scientific computing language.
>>
>> MatlabExpresion: similar to the RExpression, but obviously depends on
>> the Matlab system for its execution
>>
>> Any of these systems should be able to do what you want. To use  
>> these,
>> you just drag the appropriate actor to the canvas, add named input
>> ports, and then create the expression referring to those named ports.
>> For example, if you created input ports with names "x" and "y" you
>> could write an expression like this:
>>
>> log(x) + log(y)
>>
>> and the output will be emitted on the output port.  With the
>> RExpression actor you also create named output ports to map your
>> script variables to the appropriate outputs.
>>
>> Hope this helps.
>>
>> Matt
>>
>> Karen Tang wrote:
>>
>>> Hi,
>>>
>>> I am new in Kepler and  I need to have a complicated formula in the
>>> workflow. The formula should take three inputs (web services'
>>> outputs), do a complex calculation (including exponent, logrithm)
>>> then generate a single value.
>>>
>>> How can I add the formula in Kepler? Do I need to have this in a  
>>> Java
>>> class, then do it follow steps listed in your archived message
>>> (http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler- 
>>> users/2006-March/000068.html)?
>>> I couldn't succeed. Can you give more detailed instructions? An
>>> example will be great.
>>>
>>> My goal is to enable users(ocean scientists around the world) use
>>> workflows I created. I am using Windows XP.
>>>
>>> Thanks in advance.
>>>
>>> Karen
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Kepler-users mailing list
>>> Kepler-users at ecoinformatics.org
>>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/ 
>>> kepler-users
>>>
>>>
>>
>
>
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/ 
> kepler-users



-- 
Ilkay ALTINTAS
Assistant Director, National Laboratory for Advanced Data Research  
(NLADR)
Manager, Scientific Workflow Automation Technologies (SWAT) Lab
San Diego Supercomputer Center(SDSC), UCSD
9500 Gilman Drive, MC: 0505  La Jolla, CA  92093-0505
phone: (858) 822-5453                        fax: (858) 534-8303
                 web: http://users.sdsc.edu/~altintas


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20061214/f24f85b6/attachment.html>


More information about the Kepler-users mailing list