Page 1 of 1

Optimize Lookup

Posted: Wed Feb 10, 2010 7:06 pm
by karankhosla
Greetings!

Please see model attached.

I use "time" to get values from an array, "investment profile," into the variable "investment".

1) The value of "investment" is slightly different from that of the values in the "investment profile" array; since the value of the time step is one full period, the simulation is run over 10 periods and there are 10 elements in the array - should there be any interpolation?

2) I can't figure out how to optimize the lookup table; the control panel gives me the following error when I choose "investment profile"as a "currently active parameter" - "ERROR: No usable constant name. 0<=investment profile<=10".

Thanks!

vector lookup optimize

Posted: Wed Feb 10, 2010 9:33 pm
by LAUJJL
Hi Karan

I do not see where is the problem.

You just have to set the optimizer to policy (not calibration) with the vpd file and pen to optimize with the weight -1 and take the profile array as parameters with bounds for instance between 0 and 10.
Joined the vpd, voc and vdf files.
Regards.
JJ

Posted: Thu Feb 11, 2010 6:10 am
by karankhosla
aha! Thanks JJ!

Best Wishes,

Karan

Posted: Thu Feb 11, 2010 9:11 am
by LAUJJL
Hi Karan

I try to avoid optimizing lookups. Befor doing it I try to fit the lookup by an algebraic formula. The advantage is that you have generally much less parameters to optimize (the parameters of the algebraic formula) and most important it keeps the shape of the lookup consistent. Otherwise when you optimize directly a lookup you may get strange results totally independant from one another, generating an irrealistic curve. I do this when the parameters of the lookup are not independant (the parameters draw a specific curve shape). If the parameters are totally independant which to my opinion is estremely rare for a lookup, you are obliged to optimize directly the lookup parameters.
This remark is especillay valid for multidimensional lookups.
Or lookups with more than one input variable.
It eases too multivariate sensibility analysis and using synthesim.
Regards.
JJ

Posted: Thu Feb 11, 2010 10:17 am
by karankhosla
Very good advice. I had in fact "fitted" the curve (for the actual problem the data is s shaped) and optimized the co-effecients but I thought it would be good to learn how to use the lookup - again, as always, thanks for your time JJ!

Posted: Thu Feb 11, 2010 10:32 am
by LAUJJL
The advice is valid for any type of lookup. A good formula for a S shape is the logit function which is well appropriate for demand depending from price for example.
JJ

Posted: Mon Feb 15, 2010 8:54 pm
by tomfid
Another obvious candidate for a functional form is a polynomial of time, e.g.

decision = constant + a*time + b*time^2 ...

A much better option, if possible, is to create a feedback rule, e.g.

decision = constant + a*level_1 + b*level_2 ...

Posted: Tue Feb 16, 2010 7:13 am
by karankhosla
Thanks Tom!