Hello everybody,
I have a function z = f(x,y) that I would like to minimize using Levenberg Marquardt optimization.
However, the variables x and y are integers.
Hence, the algorithm is stopped after few iterations because I convert the variables from double to integers when ALGLIB callback the function.
Code:
public static void function1_fvec(double[] X, double[] fi, object obj)
{
int x;
int y;
x = (int)X[0];
y = (int)X[1];
fi[0] = myOwnFunction(x,y); //x and y parameters are integers
}
f(1000,2000) = f(1000.1,2000.2) = f(1000.2,2000.1) = f(1000.2,2000.2) = ....
The algorithm stops because the function does not change anymore.
I know that there is a constraint for maximum step, but I didn't find one for minimum step.
How can I avoid a step less than 1 ?
Thank you very much for your help,
Kind regards.