I’m solving an optimization problem using CVX(MATALB). The status is solved, but the solution doesn’t satisfy the constraint. Can you give me some advice for it? My code is listed below, thank you so much!
cvx_solver sedumi
cvx_precision best
cvx_begin
variable W(param.Nt,param.Nt,param.K) complex hermitian
variable t(param.K,1) nonnegative
minimize (trace(sum(W,3)))
subject to
for k = 1:param.K
W(:,:,k) == semidefinite(param.Nt)
end
for k = 1:param.K
W_sum = sum(W,3)-W(:,:,k);
Q = real(kron(transpose(W(:,:,k)*param.denominator-W_sum),V));
R = real(Q*vec(param.H_hat(:,:,k)));
c = real(vec(param.H_hat(:,:,k))'*R)-param.Pnoise;
d2 = (param.sigma(k)^2*chi2inv(1-param.pout,2*param.Nt*param.N))/2;
[Q+t(k)*eye(param.Nt*param.N), R;
R', c-t(k)*param.d2(k)] == semidefinite(param.Nt*param.N+1);
end
cvx_end
Can the MOSEK solver solve my problem? I have changed my solver to MOSEK, and the result is following. It shows “Solved” again, but the result still doesn’t satisfy the constraints.
OK. Thank you! This is the output of MOSEK. The variable W should be a set of semidefinite matrixes. The result is inaccurate, but it reports solved. Can you give some advice to adjust to solve the problem?
The maximum violation reported by Mosek is of order 1e-13, so you must work much harder to convince us that the result is not accurate enough. For example by providing a fully reproducible code with input data and a computation of the expression which proves the result violates some constraint.
Do ou realize that in floating-point arithmetic you can rarely expect the results to ideally satisfy constraints? For example the solution of x <=0 can be something like x=-1e-9 and that is perfectly normal. The same with eigenvalues. See 7 Practical optimization — MOSEK Modeling Cookbook 3.3.0
Hi Michal can you please help me correct this cvx code it’s been 3 week since i’m working on writing cvx code of power optimization and trajectory optimization, now in trajectory optimization i get this error, how should i fix it?
please see the picture and tell me something, i really need help. Thank you so much.
I don’t know. But “false” can have many meanings. Working reliably for all data sets and all starting values is not the same as working for some of them. I’m also not saying whether your code is “correct” or not This is the last I have to say on this. if someone else wants to weigh in, that is up to them.
Even after using Mosek latest version, same problem occurs for my problem also. Status is solved, but some of the constraints (2 users satisfy, remaining not) don’t satisfy the constraints. How can we believe that the problem is actually solved using the CVX tool, sir?
Should I work with input data provided to the solver or Should I change the solver or any other optimization tools? Please help me in this Sir
You should how a complete reproducible problem, with all input data, and all CVX and solver output, together with your evidence of constraints not being satisfied by more than a feasibility tolerance. And of course, you checked to make sure Mosek did not issue any warnings about large or near zero elements,