Hey guys,
Trying to optimize a problem through alglib's minasa system, and I'm getting a weird problem. Well, two weird problems. They may be related:
1. The optimization process never terminates -- even when set to a very low number of iterations.
2. If I set breakpoints inside my ndimensional_grad function, I find that the argument array (double[] x) gets set to NaN after a couple runs.
Any ideas? The initial guess is all zeros, and my grad function never assigns a value to the argument array. Here's the code that calls minasa:
Code:
double[] x = new double[] { 0, 0, 0, 0, 0 };
double[] bndl = new double[5];
double[] bndu = new double[5];
//omitted: a for loop that populates bndl with zeros and bndu with maximums according to my problem -- all positive numbers
double epsg = 0.0000000001;
epsg = 0;
double epsf = 0;
double epsx = 0;
int maxits = 10;
alglib.minasastate state;
alglib.minasareport rep;
alglib.minasacreate(x, bndl, bndu, out state);
alglib.minasasetcond(state, epsg, epsf, epsx, maxits);
alglib.minasaoptimize(state, function_name, null, null);
alglib.minasaresults(state, out x, out rep);