How to solve a QCLP using fmincon? Is there a faster method?

3 views (last 30 days)
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?

Answers (2)

John D'Errico
John D'Errico on 6 Feb 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.

Torsten
Torsten on 6 Feb 2015

Community Treasure Hunt

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

Start Hunting!