Hi,

I am currently trying to use CVX to solve an optimization problem. I already know an approximate bound for the solution from an alternative way of approaching the underlying problem, which is significantly below 1. Thus, I had expected obtaining solutions that are smaller or equal to my bound via CVX.

However, it seems like CVX only finds the solution 1, which surprised me (cvx_status is “solved”). Therefore, I manually tried what happens when I slightly change the optimal variables CVX determined, and found that this indeed gives a solution smaller than 1, while still satisfying all constraints.

This left me back puzzled and I do not know what I am doing wrong.

To ease debugging, I managed to break the whole issue down to a minimal (still-not-working-as-expected) example, which I attached below and also use to illustrate what I found.

In case it helps solving my issue, I am using CVX Version 2.2, Build 1148 on MATLAB R2023b on Windows 10.

I appreciate any help/advice to find out what I am doing wrong!

Thank you in advance!

clear

W1 = [[1 0 0 -2]; [0 0 0 0]; [0 0 0 0]; [-2 0 0 1]];

W2 = [[0 0 0 0];[0 0.5 0 0]; [0 0 0.5 0]; [0 0 0 0]];w1sc = -1;

w2sc = 2.5E-8;d = size(W1,1)/2;

aM = zeros(d,d);

aM(1,1) = 1;

M = kron(aM,eye(d));cvx_solver SDPT3

cvx_begin

`variable y0 variable y1 variable z nonnegative objf = y0+z*w1sc + y1 * w2sc minimize objf subject to y0 * eye(d^2) + z * W1 +y1*W2 - M >= 0`

cvx_end

fprintf(“\n Result optimization: %f \n”, objf)

fprintf(“\n y0 = %f”, y0)

fprintf(“\n y1 = %f”, y1)

fprintf(“\n z = %f”, z)fprintf(“\n-----------------------------\n”);

fprintf(“Let us slighly change the coefficients: \n”);y0tilde = y0 - 0.01;

y1tilde = y1;

ztilde = z+0.012;fprintf(“\n y0 → y0 - 0.01 = %f”, y0tilde)

fprintf(“\n y1 → y1 = %f”, y1tilde)

fprintf(“\n z → z + 0.012 = %f”, ztilde)altRes = y0tilde + ztilde*w1sc + y1tilde * w2sc;

fprintf(“\n\n Then, the manually found result smaller than CVX result: %d < %d \n”, altRes, objf);fprintf("\n while still all eigenvalues are positive: ")

eVals = eig(y0tilde * eye(d^2) + ztilde * W1 +y1tilde*W2 - M)fprintf(“\n So, all constraints are still fulfilled - the manually found values should be still feasible (?)”)