How I can solve linear programming with multiple quadratic and linear constraints?

Hello, I have a programming problem, with linear objective function and some quadratic and linear constraints. the way to solve a problem with quadratic constraints is to form it in matrix form:
X'.Q.X = b
But I can not form multiple quadratic constrains in this form and I think it can be used for just one constraint? how can I solve such a problem?

 採用された回答

Bruno Luong
Bruno Luong 2020 年 9 月 6 日

1 投票

Use FMINCON

3 件のコメント

Maria Ra
Maria Ra 2020 年 9 月 6 日
Thank you I will check.
There is not any way to use that form? I am using this toolbox:
And here "quadratic constraints" is written several times, so it should be possible, and I prefer to do that because of some considerations.
I'm not aware any MATLAB stock optimization function that can deal specifically with quadratic constraints.
Such constraint is considered like generic non-linear constraints by MATLAB (nonlcon argument of FMINCON), and user must provide the code . You just need to compute a bunch of
ceqi = x'*Qi*x - bi
and put them in the vector.
This is quite straighforward formatting if you have Qi and bi available in some form, for example cell array for Qi, and standard array for bi:
function [c,ceq] = mycon(x, ...)
% Bring in somehow
% Qc = { Q1, Q2, ... Qn }
% b = [b1, b2, ... bn]
% x is your decision variable
ceq = arrayfun(@(Qci,bi) x'*Qci{1}*x - bi, Qc, b);
...
end
Maria Ra
Maria Ra 2020 年 9 月 7 日
I am going to use fmincon for my problem. thank you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeQuadratic Programming and Cone Programming についてさらに検索

質問済み:

2020 年 9 月 6 日

コメント済み:

2020 年 9 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by