Hello,
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]);
cvx_begin('quiet')
cvx_precision('best');
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) )
subject to
vLambda >= v0;
cvx_end
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?
Thank You.
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.
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.
Hi,
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.
Thank You.
@mcg, Any chance addressing this issue?
Thank You.
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.
@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?
Thank You.
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.