2

I'm trying to solve a non-linear constraint optimization problem using MatLab's fmincon function with SQP algorithm. This solver has been successfully applied on my problem, as I found out during my literature research.

I know my problem's solution, but fmincon struggles to find it reliably. When running the optimization a 100 times with randomly generated start values within my boundaries, I got about 40 % good results. 'good' means that the results are that close to the optimum that I would accept it, although those 'good' results correspond with different ExitFlags. Most common are Exit Flags -2 and 2:

    ExitFlag = 2 
    Local minimum possible. Constraints satisfied. 
    fmincon stopped because the size of the current step is less than the selected value of the step size tolerance and constraints are  satisfied to within the selected value of the constraint tolerance. 

    ExitFlag = -2 
    No feasible solution found. 
    fmincon stopped because the size of the current step is less than the selected value of the step size tolerance but constraints are not satisfied to within the selected value of the constraint tolerance. 

The 'non-good' results deviate about 2% of the optimal solution and correspond to ExitFlags 2 and -2, as well.

I played around with the tolerances, but without success. When relaxing the constraint tolerance the number of ExitFlag -2 decreases and some ExitFlag 1 cases occur, but consequently the deviation from the optimal solution rises.

A big problem seems to be the step size which violates its tolerance. Often the solver exits after 2 or 3 iterations because of too small step size / norm of step size (relative change in X is below TolX).Is there a way to counteract these problems? I'd like to tune the solver In away to get appropriate results reliably.

For your information, the options used:

    options=optimset('fmincon');
    options=optimset(options,...
                     'Algorithm','sqp',...
                     'ScaleProblem','obj-and-constr',...
                     'TypicalX',[3, 50, 3, 40, 50, 50],...
                     'TolX',1e-12,...%12
                     'TolFun',1e-8,...%6
                     'TolCon',1e-3,...%6
                     'MaxFunEvals',1000,...  %1000
                     'DiffMinChange',1e-10);
Marc
  • 33
  • 1
  • 5
  • I don't understand what "step size which violates its tolerance" means. Does this just mean a step smaller than the tolerance, resulting in termination? – drhagen Jul 15 '16 at 12:58
  • Thanks for your reply! I'm talking about the 'StepTolerance' mentioned here: http://de.mathworks.com/help/optim/ug/tolerances-and-stopping-criteria.html?searchHighlight=step%20size%20tolerance – Marc Jul 15 '16 at 13:47
  • I think I know what you mean now. The word "violates" is what confused me. I usually run `fmincon` with `TolX = 0`. Though if your `TolX` is 1e-12 and those `TypicalX` values are about right, something weird is going on with your problem if you satisfy the step size tolerance before the function tolerance. – drhagen Jul 15 '16 at 15:57
  • If the optimum you 'accept' is for active constraints (meaning it is on the bound of the feasible interval) this will explain why increasing the constraint tolerance yields more imprecision in the result. Are your 'non-good' results better or worse than the good ones? Also the 2% you refer to, are those 2% of the objective function, or 2% of the design variables? – adjpayot Jul 15 '16 at 16:02
  • Thank you for your answer! Is there a way to identify what causes this 'weird' behaviour? The 2 % I'm referring to are for the objective function. – Marc Jul 21 '16 at 19:22

0 Answers0