How to handle the constraint involving perspective functions $\left( \exp\left(\beta y \oslash x \right) - 1 \right)$

(Lk V) #1

I have constraint that reads like this
a^T \left( x \odot \left( \exp\left(\beta y \oslash x \right) - 1 \right) \right) - c \leq 0.

How should I add this constraint in the CVX DCP ruleset?

%MY CVX code
n = 5;
a = rand(n,1);
beta = rand;
T = n;
Pmax = 20;

cvx_begin
variables x(n) y(n)
minimize -sum_log ( x );
subject to
ones(1,n) * y == T;
a’ * ( y .* ( exp(beta* x./y) - 1 ) - T * Pmax <= 0;
cvx_end

% ---------------------
% Problem with: a’ * ( y .* ( exp(beta* x./y) - 1 ) - T * Pmax <= 0;


Is my below attempt to solve the problem correct?

cvx_begin
variables x(n) y(n)
minimize -sum_log( x );
subject to
ones(1,n) * y == T;

for ii = 1:n
    x1 = beta * x(ii);
    y2 = y(ii);
    z2 = y(ii) + ((T * Pmax)/(n * a(ii)));
    {x1,y1,z1} == exponential;
end

cvx_end

(Lk V) #2

At least the solution rendered by this program meets the constraint. So, I think the CVX problem is good.

(Mark L. Stone) #3

Are all elements of a always >= 0? I will assume so.

I’m not sure this is exactly what you want, but presuming I understand your notation,I think you want something like

variables x(n) y(x) z(n)
for i = 1:n
  {y(i), beta*x(i), z(i)} == exponential{1}  
end
% Now replace y(i)*exp(beta*x(i)/y(i)) by z(i)
% and form the constraint 
a'*(z - x) - c <= 0 % fix this up if it's not quite right

I’ll let you figure out whether there is a short cut such as
{y, beta*x, z} == exponential(n}
instead of the for loop.

Edit: Note I just corrected a typo:{ rather than ( in what should be exponential{1}

(Lk V) #4

Thank you for your reply.

Assumption is a \geq 0. The notation \odot means componentwise multiplication and \oslash means componentwise division, which I think you might have understood correctly

I was not aware of the shortcut.

(Mark L. Stone) #5

I’m not “aware” of the shortcut either.I haven’t looked into whether that shortcut is correct or not.

(Mark L. Stone) #6

I also recommend you follow the advice in 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

(Lk V) #7

Thank you Mark for your help!