Again: Disciplined convex programming error: Cannot perform the operation: {real affine} .* {convex}

(Ali) #1


Thanks in advance for your help and support. I know that this is common topic, posted by many before me. I have read their problems. However, I proved, and it is known, that the following is convex in r .t=(1+0.5*r*λ*v)/(r-λ) [this is a queuing delay equation]
I’ve expressed it in CVX as t>=(1+0.5*r*λ*v)*inv_pos(r-λ). However, an error appears as shown in the title. Please, is there a way to express it to avoid this error (real affine*convex)?

Kind regards,


(Mark L. Stone) #2

This is a linear fractional form.

Presuming that everything other than r is a numeric constant, in order to handle
t >= (1+0.5*r*λ*v)*inv_pos(r-λ)

t*(r-λ) >= 1+0.5*r*λ*v
r-λ >= 0

(Ali) #3

Sorry I forgot to mention that t is also a variable.

(Mark L. Stone) #4

Well, now that you say t is a variable, what counts is joint convexity in r and t, not in r alone.

You haven’t shown us the full context or problem. Perhaps linear fractional or quasiconvex optimization techniques presented in Convex Optimization – Boyd and Vandenberghe can help you use CVX, depending on what your problem actually is. Or perhaps you’re headed for the dreaded nonconvex categorization.

(Ali) #5

The full problem in a concise form is:

minimize t
The variables are t and r. One may suggest to express it as:
minimize ((1+0.5*r*λ*v)*inv_pos(r-λ))

But putting the expression in the objective function prevent me from manipulating it. What do you think?

(Mark L. Stone) #6

Transform it to an LP per section 4.3.2 Linear-fractional programming in Convex Optimization – Boyd and Vandenberghe

.I don’t think there’s much point to including the t <= tmax constraint, so just leave it out… If the optimal t <= tmax, declare victory, otherwise, call it infeasible, or whatever you feel like doing.

(Ali) #7

Many thanks for your help. I highly appreciate your answer. I’ll proceed with your advice.