numerical problem of quadprog

1 回表示 (過去 30 日間)
Mingyang Sun
Mingyang Sun 2021 年 4 月 13 日
コメント済み: Bruno Luong 2021 年 4 月 13 日
Hi, I am trying to solve a badly scaled quadprog problem
H = [5e15, -1.66e15, 1.02e9, -1.23e10;
-1.66e15, 1.11e15, 1.42e6, 8.3e9;
1.02e9, 1.42e6, 2.5e6, 93;
-1.23e10, 8.32e9 , 93, 5e5 ]
f = [-4.76e7, 3.49e7, -2.19, 2.31e3]'
Aieq = [1/2, -1/3, 0, 0]
bieq = 0
when I try to use quadprog(H,-f,Aieq,bieq), MATLAB indicates problem successfully solved, but if you check inequality constraint manually, Aieq * x = a very very small positive number.
What is the best way to solve this numerical problem?
  1. set 'ConstraintTolerance' to a small number?
  2. set bieq = a very small negative number?
  3. rescale matrix H and f?
  5 件のコメント
Mingyang Sun
Mingyang Sun 2021 年 4 月 13 日
Thanks a lot for your replying, can I let
scal = sqrt(vecnorm(H))
and do
H_adj = H./(scal.'*scal); f_adj = f./scal.'
and
quadprog(H_adj,-f_adj,Aieq,bieq)?
Bruno Luong
Bruno Luong 2021 年 4 月 13 日
You have also to modify Aieq.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by