Exponential perspective function on CVX


I want to optimize with the objective function y=t*exp(x/t) (t>0), which is a perspective function of exp(x), but in CVX can not support this kind of convex function.

I want to know how to do optimization with CVX with this objective function, or any possible transform I can done to make it acceptable by CVX ?

Thanks for your help!

How to add self-defined convex function to atom library?
Convex function not accepted in CVX
How to formulate u*exp(x/u) in cvx
(Michael C. Grant) #2

Actually, it can, thanks to the exponential set.

     variables y x t
     {x,t,y} == exponential;

This works because the exponential set enforces the constraint te^{x/t}\leq y. However, please note and heed the warnings about the successive approximation method used to solve problems involving log/exp/entropy.

If you look at the help for exponential, you’ll see that it mentions a function exp_p. It would seem we had intended to create it, but never did! You will also see that the help text for exponential uses the name exp_cone in the example instead. That’s a documentation error.

Convert problem to cvx