Hello, I understand that there already exists lots of posts about exponential perspective function. I tried various solutions that were introduced in the site, but I still get a error message.

The objective function is as follows:

f(x,tcp,tcm) =sum(sum( A*x^{B} tcp^{1-B} + Ctcm*(exp(D*x/tcm)-1) ))

where A,C,D>0 and B>=1 are constants.

# My simplified MATLAB code is as follows:

```
cvx_begin gp
variables x(U,K) tcp(U,K) tcm(U,K) z(U,K)
for i=1:1:U
for j=1:1:K
xPower(i,j)=pow_p(x(i,j), B);
tcpPower(i,j)=pow_p(tcp(i,j), 1-B);
end
end
enerComp = A .* xPower.*tcpPower;
enerComm = C .* z;
obj=sum(sum(enerComp + enerComm));
minimize obj
subject to
for i=1:U
for j=1:K
{tcm(i,j), D .* x(i,j), z+1} == exponential(1)
end
end
cvx_end
```

## However, the following error message keeps coming up…

```
Error using cvxprob/newcnstr (line 192)
Disciplined convex programming error:
Invalid constraint: {log-affine} == {real affine}
Error in cvxprob/newcnstr (line 72)
newcnstr( prob, x{k}, y{k}, op );
Error in == (line 3)
b = newcnstr( evalin( 'caller', 'cvx_problem', '[]' ), x, y, '==' );
Error in test (line 26)
{tcm(i,j), D .* x(i,j), z+1} == exponential(1)
```

Can I use CVX to solve this problem without any error?

I am sure that the objective function is convex function, since it is summation of two convex functions which are perspective functions.