GSL does not currently support constrained optimization directly. You could, however, introduce a large penalty if your parameters are outside the desired range. In your residual function, check if x is outside [x_min,x_max] and set the output f_i to a large value. This will discourage the solver from exploring that part of parameter space.
Patrick On 08/18/2018 05:14 AM, Brijesh Upadhaya wrote: > Hi, > > I am new to GSL and I want to use non-linear least-square fitting to fit a > data set with 2000 data points. The function has 14 parameters in total. I > tried using gsl_multifit_nlinear_driver () to solve the problem. > > It works nice but I want the parameters to be in certain range: x_min <= > xpar <= x_max. How to fix the lower and upper bounds (Or I missed something > in the gsl-2.5 documentation!). Some of the parameters in my model don't > have any physical meaning if not bounded. > > I have another question as well!. I want to do a multi-objective > optimization using GSL-2.5 but I couldn't locate any routine in the > documentation. I have 40 data set having 2000 points each and I need to > obtain 14 parameters (Global minimum). > > with kind regards, > Brijesh