Why do two optimization toolboxes produce two different results?

3 vues (au cours des 30 derniers jours)
Jack
Jack le 15 Juin 2014
Commenté : Jack le 15 Juin 2014
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

Réponses (2)

Marc
Marc le 15 Juin 2014
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?
  1 commentaire
Jack
Jack le 15 Juin 2014
I want to estimate the location and the velocity of a source. When (h2-G2*phi2)'*W2*(h2-G2*phi2) reaches the minimum the corresponding phi2 contains the square of location and velocity, that is phi2=[x^2;y^2;z^2;x_dot^2;y_dot^2;z_dot^2].
Could you tell me how can I get the same solvers when I use “quadprog” and “SeDuMi” to solve the quadratic programming problems?
Thanks.

Connectez-vous pour commenter.


Matt J
Matt J le 15 Juin 2014
Modifié(e) : Matt J le 15 Juin 2014
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.
  1 commentaire
Jack
Jack le 15 Juin 2014
I so sorry that I forgot to upload the constraint data "D" and "a". The constraint data is very simple. D = [1,0,0,0,0,0;0,1,0,0,0,0;0,0,1,0,0,0]; a = [0,0,0]';That means the first three elements of phi2 must be nonnegative.
Thanks.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by