I just installed cvxquad and made a first trial. Unfortunately, I get the wrong result, as shown when running the following example code
N=10; M=3; lambda=rand(N,1); Pmax=1; B=rand(M,N); % Original CVX solution (slow!!!) cvx_begin variable p(N,1) nonnegative; maximize sum_log(1+p.*lambda); subject to B*p <= Pmax; cvx_end p_origcvx=p; % CVXQUAD solution (faster, but wrong!!!) cvx_begin variable p(N,1) nonnegative; minimize sum(rel_entr(1,1+p.*lambda)); subject to B*p <= Pmax; cvx_end p_cvxquad=p; fprintf('Optimal cost, orig CVX=%g\n',sum_log(1+p_origcvx.*lambda)); fprintf('Optimal cost, CVXQUAD=%g = cvx_optval*%g\n',sum_log(1+p_cvxquad.*lambda),N);
I use CVX Version 2.1, Build 1127 on Matlab R2018b and downloaded cvxquad today. As it should be, the equality
-sum(rel_entr(1,1+p.*lambda)) = sum_log(1+p.*lambda)
holds numerically, so the cost functions are the same not only in theory but also in practice (even though what goes on under the hood is completely different). I also have my own primal dual custom made algorithm that gives the same result as the original CVX solver, so I trust that one. Is it a bug in cvxquad or did I oversee something obvious?