How to solve a QCLP using fmincon? Is there a faster method?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a Quadratically Constrained Linear Program, and it is most probably convex. Basically, I want to maximize a linear function, subject to constraints that involve squares of some variables. How can I use fmincon() to solve it?
Is there a faster way in Matlab to do this?
0 comentarios
Respuestas (2)
John D'Errico
el 6 de Feb. de 2015
Just read the help (better yet, the doc) for fmincon. You will learn more by doing so than you will by me parroting that information to you anyway.
Set up a linear objective function. The inequality constraint(s) go in nonlcon. Since you will have no equality constraints, don't forget to return an empty vector for that argument.
You can probably gain a fair amount by supplying the gradient analytically, since they are so simple to generate. As well, supply the gradient of the constraints, as these should also be trivial to compute. This avoids fmincon being forced to make multiple function calls to approximate the gradients using finite differences.
And fmincon should be quite efficient on a linear problem.
0 comentarios
Ver también
Categorías
Más información sobre Nonlinear Optimization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!