Sqrt in GP

Hi, all,

I’m encountering with a GP which has the variable \mu. I declare a expression x after the command “cvx_begin gp” to simplify the long formula, and then let x=\mu[(6\mu/\lambda-3.75)^{0.5}-1.5], where \lambda is a constant. However, CVX reject this expression with:

“Disciplined convex programming error:
Illegal operation: {convex} .^ {0.5}
(Consider POW_P, POW_POS, or POW_ABS instead.)”.

But I have tried to use POW_P, the problem still exists

“Disciplined convex programming error:
Illegal operation: pow_p( {convex}, {0.5} )”.

I tried to introduce a new variable z and let (6\mu/\lambda-3.75)<=z to fix the problem, but still cannot work:

“Disciplined convex programming error:
Invalid constraint: {convex} <= {log-affine}”.

Since my problem is GP, I think it is okay to have the sqrt, or ^0.5, function. But CVX always rejects my problem, quite confusing…

I’m looking forward to receiving your kind help. Thanks.



This is not, in fact, a valid GP construct. That’s why it’s dropping back to standard disciplined convex programming rules. The rules for disciplined geometric programs are found here. Note in particular that you cannot subtract.

I recommend reading “A Tutorial on Geometric Programming” by Boyd, Kim, Vandenberghe, and Hassibi.

Thanks a lot. :slight_smile: