# How to express λ in constraint condition (7b) , which is derived from formula (8) , where λ = T/u, T and u are variables

In my own description, I set the variable LMD directly, and then u/t, which will result in {real affine}./ {real affine}, so no, if I write LMD directly, and then I write the constraint (7A), which is the formula (8), Then {real affine}.* {convex} will appear, since T ^2 is convex，Hope to have a big brother to answer, thank you very much

You’re throwing us into the middle of a complicated mess. Can you show us a clear and complete formulation of the portion you re having difficulty with, making clear what is input data and what are optimization variables for the convex optimization subproblem you are trying to formulate? Keep in mind that \lambda is fixed, i.e., input data, for each convex optimization subproblem, because SCA is being used.

Apparently, you have to start with some initial initial value of u,t and set lambda = u/t. Then for each iteration of SCA, lambda is fixed, i.e., input data to CVX. Then after CVX completes, update lambda = u/t using the optimal u,t, from the just completed CVX problem, for use in the next SCA iteration (CVX problem). When you do this, F(t,u,lambda) s a convex quadratic in u,t (presuming lambda > 0), because lambda is fixed.

I’m sorry, I still don’t understand the relationship between lambda,t and u in CVX, and how to implement their codes. Which one is the variable set by CVX, which one is the initial value given at the beginning, and how to specify lambda=u/t in it, could you please give me some guidance? I would appreciate it if you could write some code, thank you very much

Here is very stylized code, omitting most of the details lambda is never a CVX variable. It is always input data, updated for each CVX problem instance.

u = 4; t = 3; % made up initial values
lambda = u/t;
while  something
cvx_begin
variables u t
....
cvx_end
lambda = u/t;
end

Thank you very much！！！！！！

https://arxiv.org/pdf/2110.02857.pdf Related papers, you do not need to see all, I would like to ask about formula (37 how to describe), as just beginning to contact this toolbox
Sorry, I want to ask another question about the writing of CVX. Qn in equation (37) belongs to the same time slot, but they are respectively subtracted from the previous iteration after the current iteration. How can this subtracted from the previous iteration be reflected in the CVX constraint? I started with 24 slots;
The code for this constraint is as follows:
while something
cvx_begin
variable q_opt(2,L)

subject to
for n=1:L