July 30, 2017, 6:55pm
I have the following code:
paramN = 3;
paramB = 10;
vA = [2; 3; 9];
vA = sort(vA, 'ascend');
v1 = ones([paramN, 1]);
v0 = zeros([paramN, 1]);
variables vLambda(paramN) paramNu
% maximize( -0.25 * sum_square(vLambda + (paramNu * v1)) - (vLambda.' * vA) - (paramNu * paramB) ) %<! Doesn't Work!
% maximize( -0.25 * sum_square_abs(vLambda + (paramNu * v1)) - (vLambda.' * vA) - (paramNu * paramB) ) %<! Doesn't Work!
maximize( -0.25 * square_pos(norm(vLambda + (paramNu * v1))) - (vLambda.' * vA) - (paramNu * paramB) )
vLambda >= v0;
You can see there are 3 versions of the same Objective Function (With
% for the first 2).
In this example of numbers the first 2 fails to supply an answer whole the third succeeds.
In other numeric examples they all converge.
I know it is suggested to
Eliminate Quadratic Forms, but is this normal?
I recommend you not use the quiet option when trying to assess and diagnose solution difficulties. Then you’ll be able to see the solver output.
I solved all 3 variants with both sdpt3 and sedumi, achieving cvx_optval = 38. Things were looking a little precarious with the solvers when using cvx_precision(‘best’), but looked fine with default precision.
July 30, 2017, 9:15pm
But when you Copy & Paste what I wrote above, do you see the problem I got as well?
Is it some kind of a bug or something?
I did copy and paste. Then did edits, such as not doing quiet, changing which objective was uncommented, and changing precision and cvx_solver. My results are as I described above.
July 30, 2017, 9:44pm
I meant with
cvx_precision(‘best’) do you see the same issues as I did?
If you did, since it doesn’t happen in default precision, it is not something of CVX translation but solvers issue?
I wonder if it happens on the commercial solvers as well.
August 1, 2017, 6:58am
@mcg, Any chance addressing this issue?
(Michael C. Grant)
August 2, 2017, 2:38pm
I’m afraid it’s not likely unless someone supplies a patch. The fact that it works without
cvx_precision('best') certainly reduces any priority I might place on it.
August 2, 2017, 5:06pm
@mcg, Does the setting
cvx_precision('best') make any difference to CVX (The model it generates) or only a parameter passed to the solver?
Anyone could verify if it happens on all solvers (Free + Commercial)?
Can we just spot where the issue is?
(Michael C. Grant)
August 2, 2017, 5:54pm
I simply don’t have the time to investigate this in that manner. If you or any other volunteers can, please report your findings here.