Which solver solves PSD constrained convex non-linear problem

I have a problem with a vector variable $$w \in \mathbb{R}^n$$ and a symmetric matrix variable $$V \in \mathbb{R^{n \times n}}$$. I am solving a problem which is roughly like:

\begin{align} \begin{array}{ll} \max & \sqrt{\operatorname{trace}(A^\top V A)} + a^\top w + \operatorname{entropy}(w) \\ \mathrm{s.t. }& \text{some linear constraints over w, and V}\\ & V \succeq ww^\top \end{array} \end{align} where by Schur complement the last constraint can be: \begin{align} \begin{pmatrix} V & w \\ w^\top & 1 \end{pmatrix} \succeq 0. \end{align}

So, I have a positive semi-definiteness constraint, some linear constraints, and the function that I am maximizing is concave because the square root of a linear function is concave, as well as the entropy.

I am using YALMIP - MATLAB combination to call a solver. However, MOSEK cannot solve this. I know MOSEK can solve entropy maximization over some conic constraints (exponential cone solver), but this problem is not being able to solve.

Am I using MOSEK wrongly? Would you expect MOSEK to solve this problem? If not, which convex optimization solver shall I try using?

• As discussed below, this is solvable using YALMIP + Mosek now with the bug fix in the latest develop branch. Also make sure to use convexity aware operator sqrtm and not general nonlinear function sqrt. – Johan Löfberg Mar 28 '20 at 17:31
• @JohanLöfberg Shall I check here for the difference between sqrt and sqrtm: yalmip.github.io/squareroots The thing is, trace is scalar so I don't get why it is beneficial to use sqrtm. – independentvariable Mar 28 '20 at 20:02
• It doesn't have anything to do with scalar vs matrix in YALMIP. sqrtm is convexity aware and modelled by SOCP cones, sqrt is a callback based. – Johan Löfberg Mar 29 '20 at 8:03
• ...and I got it backwards. sqrt is the operator to use, sqrtm is the general nonlinear – Johan Löfberg Mar 29 '20 at 13:54

EDIT: Per comment below by YALMIP deveeloper Johan Lofberg, the bug in YALMIP was a typo, which has now been corrected and available at https://github.com/yalmip/YALMIP/archive/develop.zip . Using this newest develop version of YALMIP, Mosek should now be able to solve the problem.

Edited to reflect YALMIP developer's acknowledgement that there is a bug in YALMIP.

Mosek should be able to solve this, and indeed can (see below) under CVX 2.2.

There is a bug in YALMIP which results in an error message when entropy is used in combination with an SDP constraint with the solvers Mosek or SCS.

For example,

X=sdpvar(3,3);optimize(X>=0,-entropy(X(:)),sdpsettings('solver','mosek','debug',1))

Unrecognized function or variable 'sdpDAta'.
Error in normalizeExponentialCone (line 236)
sdpDAta(end,size(model.F_struc,2)) = 0;
Error in callmosek>call_mosek_lpqpsocpsdp (line 84)
[model,output] = normalizeExponentialCone(model);
Error in callmosek (line 51)
[x,D_struc,problem,r,res,solvertime,prob] = call_mosek_lpqpsocpsdp(model);
Error in solvesdp (line 361)
eval(['output = ' solver.call '(interfacedata);']);
Error in optimize (line 31)
[varargout{1:nargout}] = solvesdp(varargin{:});


Similarly with SCS as solver (which absent the YALMIP bug, also should be able to solve this).

See the YALMIP forum topic Entropy + SDP constraint with Mosek and SCS: Unrecognized function or variable 'sdpDAta' which I just opened, to which the YALMIP developer, Johan Lofberg, has now responded, acknowledging the bug.

CVX 2.2 + Mosek 9.1 as solver can handle this.

cvx_begin sdp
variable V(3,3) symmetric
variable w(3)
maximize(sqrt(A'*V*A)+a'*w+sum(entr(w)))
% Insert other constraints here
[V w;w' 1] >= 0
cvx_solver mosek
cvx_end

• Johan replied to my YALMIP forum topic, acknowledging that is is a bug. Anyhow, as I mentioned in the answer. CVX 2.2 + Mosek as solver can handle this, using syntax not all that different than YALMIP. – Mark L. Stone Mar 28 '20 at 12:07
• It's been fixed in the develop branch now (typo in code, simply change sdpDAta to sdpData on the line that crashes in matlab...) – Johan Löfberg Mar 28 '20 at 17:06
• @Johan Löfberg Thanks. I guess you held the shift key for a fraction of a second longer than you should have during coding. – Mark L. Stone Mar 28 '20 at 17:15
• Yes, and obviously I am missing a test in my test suite. – Johan Löfberg Mar 28 '20 at 17:30
• This is a great answer, thanks Mark! @JohanLöfberg thanks for updating YALMIP! – independentvariable Mar 28 '20 at 17:57