I'm trying to minimize a function that sometimes has a minimum that's
constant over some extended 'area'
The minimizers nmsimplex and nmsimplex2 bounce around and never exit (
until the iteration limit ).
To reproduce change the return statement in in the example function my_f
in the manual to:
double rv = 10.0 * (x - dp[0]) * (x - dp[0]) + 20.0 * (y - dp[1]) *
(y - dp[1]) + 30.0;
if( rv < 31 ) return 31.0; else return rv;
or even simpler, just
return 31;
I tried it with gsl 1.15 in linux ( and 1.8 and 1.14 in windows )
gcc -Wall -c -DHAVE_INLINE mm.c
gcc mm.o -lgsl -lgslcblas
~/gsl/mm$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3