Why do two optimization toolboxes produce two different results?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a Quadratic Program to be solved:
min (h2-G2*phi2)'*W2*(h2-G2*phi2)
subject to: D*phi2>a
where h2=[109085.919608444 459933.363318136 100340.525393388 668230.037176691 175880.986764044 597041.601537766 186270.889983192 981230.967844572]';
W2 and G2 are too complex so that they are shown in figures:
The data is uploaded to the website.
I use “quadprog” and “SeDuMi” to solve the quadratic programming problems. But the results are different. The results are shown as follow:
SeDuMi: phi2 = [15.8407983652723 224712.855054258 49190.7060861108 -139558.381444911 -182685.449767951 -14593.7826296176]';
quadprog: phi2 = [0 224658.368498995 49166.3250817687 -139602.451899739 -182822.341031919 -14652.8624815402]';
In the two phi2 vectors shown above, the first elements are different, but other corresponding elements' values are similar.
Would you tell me the reason?
Thanks a lot, Jack
댓글 수: 0
답변 (2개)
Marc
2014년 6월 15일
Without knowing more about your system... both seem to give similar answers.
hi2 = [15.8407983652723 224712.855054258 49190.7060861108 -139558.381444911 -182685.449767951 -14593.7826296176]'; >> (h2-G2*phi2)'*W2*(h2-G2*phi2)
ans =
0.61067314010686
>> phi2 = [0 224658.368498995 49166.3250817687 -139602.451899739 -182822.341031919 -14652.8624815402]'; >> (h2-G2*phi2)'*W2*(h2-G2*phi2)
ans =
0.610669863650048
Both algorithms give you very similar objective functions with different values for phi, which suggests both are doing similar things. Why, they get to the same answer with different values of phi2 is much more complex.
We know that a simple, 2nd order polynomial has 2 roots. So is it surprising that your set of equations/constraints has more than one mathematical answer?
Not knowing more about your actual equations, it appears that your first variable may be less significant than your others with respect to minimizing your objective function.
If this is a physical system, one would hope to have some reality checks in the values of phi2. Like if phi2(1) was a mole fraction, then the being outside 0 and 1 would simply not be physically true. Again, without knowing what the system is physically it is hard to comment.
Is there any reason to believe that phi2(1) is relevant to describing your system?
Matt J
2014년 6월 15일
편집: Matt J
2014년 6월 15일
You didn't attach the constraint data "D" and "a" in the .mat file you posted, so we can't do a full analysis. However, the condition number of the Hessian of the unconstrained system is rather large
>> cond(G2.'*W2*G2)
ans =
1.0151e+06
Depending on what the constraints are, and various other settings, I can see the solvers thinking there are multiple solutions.
참고 항목
카테고리
Help Center 및 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!