Same program with different results


(bloo) #1

I do have some random parameters.i just curious what will lead to this.


and i tried to modify my program.now it finally get all three status.

i know this time i surely have bugs in my program,uploading it just for fun.


(Mark L. Stone) #2

You wrote

I do have some random parameters.i just curious what will lead to this

If you have been generating different random input data instantiations for different program runs, then of course you have been solving different optimization problems, even if of the same form; and therefore you can not expect to necessarily get the same results. See for instance How to sovle this QP problem in cvx?

In any event, CVX’;s successive approximation method using SDPT3 is not doing well on the problem(s) you have provided, either failing completely or ending with Inaccurate/Solved (look at the final Status). You can try sedumi to see whether that works better, or MOSEK if you have that capability. Alternatively, you can try CVX 3.0beta with scs or ecos which will avoid the successive approximation method,and may do better.