Quadratic programming with just one constraint

Hi,
I have a quadratic programming problem which basically looks like
However, the equality restrictions there are only in the form , and the programm demands the matrix to be of full rank. The only constraint I want to impose is , but I don't know how to do this, since apparently I would need as many linear constraints as the . Is there a way around this?

2 件のコメント

Matt J
Matt J 2021 年 4 月 21 日
the programm demands the matrix to be of full rank.
No idea why you think so.
diego soler polo
diego soler polo 2021 年 4 月 21 日
I tried defining $A_eq$ as ones(d) and $b_eq$ as N*ones(1,d) (d is the dimension of my space), so that every constraint equation would be a copy of the only restriction I want, and I got the following error message:
error: quadprog: equality constraint matrix must be full row rank

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

 採用された回答

Matt J
Matt J 2021 年 4 月 21 日
編集済み: Matt J 2021 年 4 月 21 日

0 投票

We may have to be given your input matrices to reproduce the problem, but since ones(1,d) is full row rank, there shouldn't have been a problem, even if it were a requirement of quadprog. As you can see in the simple example below, no errors are thrown using Aeq=ones(1,d=4):
A=rand(4); A=A*A.'; %symmetrize
c=rand(4,1);
Aeq=ones(1,4); beq=4;
lb=c*0; ub=c*0+10;
quadprog(A,c,[],[],Aeq,beq,lb,ub)
Minimum found that satisfies the constraints. Optimization completed because the objective function is non-decreasing in feasible directions, to within the value of the optimality tolerance, and constraints are satisfied to within the value of the constraint tolerance.
ans = 4×1
0.0000 0.0000 3.4558 0.5442

1 件のコメント

diego soler polo
diego soler polo 2021 年 4 月 22 日
Thank you. Yes, that worked. I misunderstood the notation in the reference. It works just fine.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by