How can I evaluate the results of SQP optimization algorithm in MATLAB?

5 views (last 30 days)
I have implemented SQP optimization algorithm in MATLAB for estimating the force distribution in muscles. I am happy with the results but the problem is that I am getting them by loosening TolCon value (0.1) which is far away of the default value (1e-6). In addition, Constraint violation included in the output data is between 4-12 . Where does the loosening TolCon affect the model mathematically? By this situation, are my results reliable?
  2 Comments
Alan Weiss
Alan Weiss on 29 Mar 2018
Sorry, but I think that we don't have enough information to help you diagnose your case. Are you fitting parameters of a function to data, or are you doing something else? Why did you have to loosen the TolCon tolerance? Do you have nonlinear constraints, linear constraints, or just bounds? What happens when you use the default interior-point algorithm with default tolerances? Can you show us code snippets, your fmincon call, error messages, anything?
Alan Weiss
MATLAB mathematical toolbox documentation
Reza KAMALIFARD
Reza KAMALIFARD on 29 Mar 2018
Edited: Reza KAMALIFARD on 29 Mar 2018
Hi
Thanks for reply,
I am trying to minimize a quadratic function (86 variables) with upper and lower bound for each variable. I also have non linear constrains. The optimization results are satisfying because I am comparing them with experimental data. I already have tried interior point but I am not happy with results and I am getting negative exitflaf values. By using SQP and default values for constraint I am getting satisfying results but with positive exitflag values. Relaxing tolerances would lead to positive exitflag values but I do not know my results are reliable or not. Am I allowed to relax the tolerance up to 0.1?
options = optimset('Display','off','MaxIter',1500,'LargeScale','off','TolFun',.1,'TolX',1e-6,'TolCon',.05,...
'MaxFunEvals',1e4,'algorithm','sqp','GradObj','off');
C = @(X)Criterion_Lagrange_Multipliers(X,W);
[X,~,exitflag,output] = fmincon(C,Xini,[],[],Aeq,Beq,Xmin,Xmax,[],options)
Model.X(:,1,i) = X;

Sign in to comment.

Answers (1)

Alan Weiss
Alan Weiss on 29 Mar 2018
Your options do not make a lot of sense -- for example, the 'LargeScale' option does not do anything when you set an 'Algorithm' option, and setting Display to 'off' doesn't help you to understand what is happening with your problem.
If you have a quadratic problem with linear equality constraints and nonlinear constraints as well, then there are mainly two problems that can happen:
  1. Your nonlinear constraints make the problem nonconvex, so the solution you obtain is a local solution, but not necessarily a global solution.
  2. Your problem is infeasible, meaning there are no points that satisfy all your constraints, and the resulting "solution" is spurious.
The main way to deal with problem 1 is to start from a variety of initial points and take the best solution you find.
For help dealing with problem 2, see Converged to an Infeasible Point.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!