That constraint is non-convex for x < 0.
Presuming x >= 0, it can be handled using CVX’s exponential cone constraint capability to represent it as an exponential cone constraint,.
The constraint can be rewritten as
x*exp(y/x) <= (constant + x)/log(2)
which can be implemented in CVX as
{y,x,(constant + x)/log(2)} == exponential(1)
Note that although http://cvxr.com/cvx/doc/funcref.html#sets has an entry for exp_cone
, it has to actually be entered using exponential
, as I’ve shown here.
The exponential cone constraint si a powerful construct Learn it. Love it. Use it. And when using it, use Mosek 9.x as solver if you can, otherwise follow the instructions at CVXQUAD: How to use CVXQUAD's Pade Approximant instead of CVX's unreliable Successive Approximation for GP mode, log, exp, entr, rel_entr, kl_div, log_det, det_rootn, exponential cone. CVXQUAD's Quantum (Matrix) Entropy & Matrix Log related functions .