How i can solve a large size problem through fmincon

1 vue (au cours des 30 derniers jours)
Divyansh
Divyansh le 24 Juil 2014
Commenté : Alan Weiss le 25 Juil 2014
I am having a large size problem (7000 optimization variables) and i just wanted to use the fmincon to calculate the solution. But fmincon is running very slow infact taking days to solve the problem. H I tried with providing gradient of obj and constraint function as well as provided the hessian also. But still it is running very slow. Hessian is calculated as
H = sparse(GL.dy_location(:,1),GL.dy_location(:,2),GL.dy,GL.dy_size(1),GL.dy_size(2));
H = 1/2*(H + H.');
and then provided this to fmincon. Can i do something further to make fmincon run fast. do providing the sparsity pattern will help?? If yes then how to provide it for such a large matrice if it is represented in the above form.

Réponses (1)

Alan Weiss
Alan Weiss le 24 Juil 2014
You need to ensure that your options are set correctly. If you are providing the gradient of the objective function then I assume that you have a nonlinear constraint function. The only fmincon algorithm that can use a Hessian function for nonlinear constraints is the 'interior-point' algorithm.
For that algorithm, you have to provide a Hessian that includes Lagrange multipliers, not just a matrix of second derivatives of the objective function. For details, see this example, or the Hessian portion of the fmincon function reference page.
Alan Weiss
MATLAB mathematical toolbox documentation
  2 commentaires
Divyansh
Divyansh le 25 Juil 2014
i am already providing the lagrange multipliers and all...my question is how to make fmincon run fast
Alan Weiss
Alan Weiss le 25 Juil 2014
If you are passing a Hessian correctly to fmincon then there is no need to pass a Hesian sparsity pattern, because fmincon uses this pattern only to aid it in computing the Hessian numerically.
Did you validate your gradient and Hessian with the DerivativeCheck option? If your gradient or Hessian are incorrect then fmincon will be very slow, or may fail.
But, if you did everything correctly, then I do not know what else you can do to speed things along.
Alan Weiss
MATLAB mathematical toolbox documentation

Connectez-vous pour commenter.

Catégories

En savoir plus sur Surrogate Optimization dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by