Page 1 of 1

How to convert lookup extrapolate function to stella functio

Posted: Thu Apr 05, 2007 5:26 pm
by vensimer
Hi,
i have a vensim model which used LOOKUP EXTRAPOLATE function, which can specify the output if the input is out of the range of Lookup Table. But i cant find the equivalent function in the STELLA. Can anyone tell me how to use similar function in STELLA ?
IF the Vensim model is like :
LOOKUP EXTRAPOLATE(lookup table, input)
How to convert it into STELLA model?
Thank you so much!
Vensimer

converting lookup

Posted: Thu Apr 05, 2007 6:39 pm
by LAUJJL
Hi

One solution that will always work, is to transform the lookup into a succession of linear functions.

For example if the input is X and the output is Y then;
Define n functions that look like: G (x) = if then else ( x between a and b, l(x), 0),
H(x) = if then else (x between b and c, m(x),0) etc… where l(x) and m(x) are linear functions
The lookup will then be equivalent to : y = G (x) + H(x) + I(x) etc…
One of the advantage of such a formulation is that you can use the parameters of the lookup in
the optimization, which you could not currently do in Vensim. (It may be now possible with the new vector lookup function).
Regards.
JJ

Posted: Fri Apr 06, 2007 12:45 am
by bob@vensim.com
At the risk of hijacking this thread with the VECTOR LOOKUP function it is possible to optimize over elements of a Lookup Function. This should, however, be done with caution. If the Lookup is meant to have a regular shape (eg S curved adjutement with flat tails) this will likely break down.

I am not sure of the Stella function but in Dynamo it was called TABXL.