| Dear everyone , dear Sergey :
 I have a multi parameter function that needs optimization,
 
 The least squares problem, where F (x, y, z)=ax+by+cz, with coefficients a, b>>c, results in the gradient of z being much smaller than that of a and b. The range of parameters is approximately x [2-5] y [1-3] z [-0.08~0.08]. How to dynamically adjust gradients to improve the accuracy of z
 
 Expand the derivative of z to adjust the scale to be roughly the same as the derivative of x and y?
 
 
 
 
 minbleicstate state;
 minbleicreport rep;
 double epsg = epsg0 ;
 double epsf = epsf0 ;
 double epsx = epsx0 ;
 ae_int_t maxits =   1000 ; //
 
 minbleiccreate(x, state);
 minbleicsetbc(state, bndl, bndu);
 
 //==Is this the order of magnitude for setting parameters related to their coefficients? Is the usage correct here for me?
 //real_1d_array xScale;
 //int LenS = x.length();
 //xScale.setlength(pn);
 //int nt_num = LenS/5;
 //for(int j=0;j<nt_num;j++){
 //	xScale[0 * nt_num + j] =  100;
 //	xScale[1*nt_num+j] = 100 ;
 //	xScale[2 * nt_num + j] = 1;
 //	xScale[3*nt_num+j] = 0.5 ;
 //	xScale[4*nt_num+j] = 0.5 ;
 //}
 //minbleicsetscale(state,xScale);
 //minbleicsetprecscale(state);
 
 minbleicsetcond(state, epsg, epsf, epsx, maxits);
 //minbleicoptguardsmoothness(state);
 alglib::minbleicoptimize(state, func_grad,NULL,ptr);
 
 //minlmsetacctype(state,1)
 const xparams _params = alglib::xdefault;
 minbleicrestartfrom(state,x,_params);
 minbleicresults(state, x, rep);
 
 
 |