# "Gurobi does not support the exponential cone. "what solvers can I use

I can‘t solve the problem with binary variable，I have tried gurobi&mosek，but they failed，what solver can I use？ thanks

cvx_begin
variable x(m,n) binary;
variable y(m,n) nonnegative;
variable z(m) binary;
maximize(ones(1,m)*z);
subject to
expression s(m);
for i=1:m,
for j=1:n,
s(i)=s(i)-rel_entr(x(i,j),x(i,j)+y(i,j)*h(i,j));
end
end
s>=z.r;
y
ones(n,1)<=p;
ones(1,m)*x<=1;
f’xones(n,1)<=c;
z<=1;
x<=1;
cvx_end

when I set x,z to be nonnegative, it can be solved by cvx SDPT3；
when I set x,z to be binary, it says"Gurobi does not support the exponential cone. "
so if I set x,z to be binary,what solver can I use？ thanks

You wrote “I have tried gurobi&mosek，but they failed”. What specifically do you mean by MOSEK failed? Do you have MOSEK installed? When you specified MOSEK as the solver, what exactly happened? Was the problem accepted, and if so, what was the solver and CVX output when it executed?

I do not have the capability to use MOSEK uder CVX, so I can not try it out myself. But as far as I know, it should “work”, in the sense that the problem will be accepted for solution, and CVX will attempt to solve it via its Successive approximation algorithm, calling MOSEK to solve mixed integer problems. I do not prejudge what the outcome of applying this algorithm will be, and that could of course depend on your input data, which you have not provided.

The data I input is：

m=10;
n=5;
for i=1:m
h(i,:)=db2pow(-(128.1+37.6
end
r=10
ones(m,1);
p=10
ones(m,1);
f=0.5*ones(m,1);
c=2;

The problem was accepted by mosek, and solved using an experimental successive approximation method.

## Cones | Errors | Mov/Act | Centering Exp cone Poly cone | Status --------±--------------------------------±-------- 4/ 4 | 8.000e+000 3.553e+000 0.000e+000 | Solved 4/ 4 | 8.000e+000s 3.551e+000s 0.000e+000 | Solved 4/ 4 | 8.000e+000s 3.538e+000s 0.000e+000 | Solved 4/ 4 | 8.000e+000s 3.468e+000s 0.000e+000 | Solved 4/ 4 | 8.000e+000s 3.456e+000s 0.000e+000 | Solved 4/ 4 | 8.000e+000s 3.537e+000s 0.000e+000 | Solved 4/ 4 | 8.000e+000s 3.795e+000s 0.000e+000 | Solved

Status: Failed
Optimal value (cvx_optval): NaN”

Finally，it failed

Perhaps you saw this warning, and as also documented in the CVX User’s Guide:

CVX Warning:
Models involving "log" or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
This method is slower and less reliable than the method CVX employs for
other models. Please see the section of the user's guide entitled
The successive approximation method
for more details about the approach, and for instructions on how to
suppress this warning message in the future.

In your case, at least with whatever random numbers you drew in the example shown, CVX’s experimental successive approximation method failed. I will leave it to mcg (CVX head honcho) and Erling (MOSEK head honcho) to further comment.

Thank you very much，best wishes！