numerical problem of quadprog
이전 댓글 표시
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?
- set 'ConstraintTolerance' to a small number?
- set bieq = a very small negative number?
- rescale matrix H and f?
댓글 수: 5
Bruno Luong
2021년 4월 13일
I think this must be the priority:
- rescale matrix H and f?
Mingyang Sun
2021년 4월 13일
Bruno Luong
2021년 4월 13일
편집: Bruno Luong
2021년 4월 13일
There is MATLAB function normalize to help you to do such thing.
It is on recent version only though.
Roughly the "ideal" method is to change the decision variable to y, where
sqrtm(H)*y = x
so that the Hessian becomes identity with respect to y.
A quick and dirty rescaling is then
sqrt(diag(H)).*y = x
Mingyang Sun
2021년 4월 13일
Bruno Luong
2021년 4월 13일
You have also to modify Aieq.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Quadratic Programming and Cone Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!