# 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}

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

(Lk V) #4