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

Matthew Jones jones at nceas.ucsb.edu
Thu Dec 14 23:44:03 PST 2006


Hi Karen,

Glad it worked.

A composite sounds like a fine idea.  Just create a new composite from 
the tree (drag and drop), then add ports for all of your input 
parameters and for one output parameter.  Copy your expression actors to 
the inside of the composite, hook up the ports to the right ports of the 
expression actors, and now you have a composite that does the whole 
computation and can be saved in the library for re-use.  Before you save 
it you might want to right-click and add documentation so that you have 
a good description of what the actor does.

Cheers,
Matt

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 
>>>
>>>
>>
> 
> 
> 



More information about the Kepler-users mailing list