Optimization "AMOEBA" [message #68099] |
Fri, 18 September 2009 02:53  |
Nicki
Messages: 14 Registered: September 2009
|
Junior Member |
|
|
Hey!
I need some help with amoeba (i'm a total IDL beginner...). For a
start (get to understand how it works) I want to solve a pretty
simple, 1-dim. problem. I'm having a parabola -x^2+4x+9 and I want to
get the maximum with the help of AMOEBA. How do I do that? (Let's say
starting point P0=5 and scale is 4).
This is what it looks like now:
FUNCTION FUNC, P
x=P[0]
y=-x^2.+4.*x+5.
ydes=9.1
RETURN, MIN(ydes^2-y^2)
END
R=AMOEBA(1.0e-1, SCALE=5, P0=0.05, FUNCTION_VALUE=fval)
PRINT, 'x_Value:', r, $
'error:', fval[0]
END
As a result i get for the x_value -1 and for the error - Inf.... But
why?! I mean the maximum of the function is at x=2 and this is within
the scale...
Maybe somebody can give me some help
|
|
|
|