DCP Transform for a constraint that includes t2*2^(b2/t2) and b1^3/t1^2

Please advice:

I am solving the following problem using CVX

Except the fifth constraint all other are linear constraints and I had no problem to write MATLAB code for these constraints. Since, fifth constraint is not in DCP form, I transform the fifth constraint as follows (after reading some posts in this forum):

{b1,s,t1}== rotated_lorentz(1)
{s,x,b1l}== rotated_lorentz(1)
along with the above, also declared s, x, t1, t2, b1, b2>=0

It seems that the transformation of the fifth constraint is incorrect, since the solution I am getting using the above code is: V=t1=0.0216, t2=0.0016, b1=31.67, b2=1.9910^5. However, I know about a solution: V=0.0198, t1=0.0189, t2=0.0017, b1=1.8810^4, b2=1.81*10^5 which is a feasible solution and better than what I am getting from my code. Please let me know if the above transformation is correct?

Thank you so much.

1 Like

I haven’t checked the correctness of your code. But the atrocious numerical scaling means that numerical results returned by the solver and CVX can’t be trusted. Numbers such as 1e6, 1e7, 1e-8, 1e-19 are horrible. Please read some of the pots talking about scaling.

Hi Mark ,

Being a new to CVX, I am worried if the fifth constraint is correct? If you can kindly have a look on the DCP transformation of the fifth constrain (mainly concerned about the second term of the fifth constraint), that will be very helpful. I read some posts by you and @Michal_Adamaszek to prepare this code.

As per your suggestion, I will try to scale the problem.

Many thanks!

That looks like a faithful implementation of my code in the post you linked for the term b1^3/t1^2

But it is meaningless garbage with numbers such as 1e-19 (and and to a lesser extent,1e-8).

To me it seems if you change the unit i.e.

b_1 = 10^6 * new_b_1
b_2 = 10^6 * new_b_2

you get a much better scaled model. For instance




and so forth.

I wonder why you choose the unit you did?

Thank you so much @Erling , the code now works perfectly based on the scaling you suggested.

The problem is- these values 10^(-18), 10^7 are generated based on some random input values. So I may need to scale manually for each problem.

Also, many thanks to @Mark_L_Stone.