Hello,
I tested both free and commercial versions of Alglib in C#.
My test works properly with the free version ~700 optimizations with N=500. But when I switch to Managed or Native version it becomes really really slow when N>150, I cannot even finish my test. I am running this on a 64bit - 4 cores - 8G windows 2008 server.
Is there any extra parameter to define in the comercial version which is not required in the free version? With the free version I was calling the following method: alglib.minbleicsetoutercond(state, _epso, _epsi). This method does not exist in the commercial version, could it explain the difference?
With the free version all my optimization ends with return code=4.
I would really appreciate your help. Thank you
Code with free version: private int OptimizeWithGradient(alglib.ndimensional_grad grad) { alglib.minbleicstate state; alglib.minbleicreport rep; alglib.minbleiccreate(_x0, out state); alglib.minbleicsetbc(state, _l, _u); if (_constraints != null) { alglib.minbleicsetlc(state, _constraints, _constraintsSide); }
alglib.minbleicsetinnercond(state, _epsg, _epsf, _epsx); alglib.minbleicsetoutercond(state, _epso, _epsi); alglib.minbleicoptimize(state, grad, null, null); alglib.minbleicresults(state, out _s, out rep);
return rep.terminationtype; }
Code with commercial version: private int OptimizeWithGradient(alglib.ndimensional_grad grad) { alglib.minbleicstate state; alglib.minbleicreport rep; alglib.minbleiccreate(_x0, out state);
alglib.minbleicsetbc(state, _l, _u);
if (_constraints != null) { alglib.minbleicsetlc(state, _constraints, _constraintsSide); }
alglib.minbleicsetcond(state, _epsg, _epsf, _epsx,_maxIts); alglib.minbleicoptimize(state, grad, null, null); alglib.minbleicresults(state, out _s, out rep);
return rep.terminationtype; }
|