How to solve a QCLP using fmincon? Is there a faster method?
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
John D'Errico
2015 年 2 月 6 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Nonlinear Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!