How to write this optimization problem in CVX form?

convex expression >= constant is a non-convex constraint. Any convexification you do will be changing the constraint to something different and non-equivalent.

Every occurrence of cvx_begin … cvx_end is a separate optimization problem. let that guide you.

1 Like

Got you. Thank you so much for your help. Appreciate that.

Dear Mark,

I am still straggling with applying cvx to the above optimization problem. Could you please tell me cvx should be outside the for loop (over i) or inside the for loop?
If outside, how cvx knows that for each objective function f_{i} the variable of interest is p_{i} and the rest of p_{k}, k \neq i, are given and fixed?
if inside the for loop, how to define the cvx variable in case p_{i} is a scalar or a matrix?

Many thanks in advance

Which above problem?

Everything from cvx_begin to cvx_end specifies one optimization problem. There should be at most one objective function statement (minimize or maximize) between cvx_beigin and cvx_end.

You can use for loops to build up a CVX expression to use in a minimize or maximize statement. You can specify constraints iinsidie a for loop if you want to.

If you have a separate optimization problem for each value of something parameterized by a for loop index variable, then place the for loop outside cvx_begin to cvx_end/ You can also have for loops outside cvx_begin to cvx_end o specify multiple optimization problems, each of which can have for loops inside cvx_begin to cvx_end.

If there is only a single i entering an optimization problem involving p_i, and there are n different values of : Declare a scalar variable in CVX, and place for i=1:n outside cvx_begin to cvx_end.

If there is only one optimization problem, declare vaaraible p(n)., and perhaps you need a for loop (inside cvx_begin to cvx_end) for the constraints.

1 Like

Thank you very much for your detailed reply. It helped me a lot.

This is exactly what I wanted to know: “If you have a separate optimization problem for each value of something parameterized by a for loop index variable, then place the for loop outside cvx_begin to cvx_end.”

then as you suggested : “If there is only a single i entering an optimization problem involving p_{i}, and there are n different values of : Declare a scalar variable in CVX, and place for i=1:n outside cvx_begin to cvx_end.”

These are exactly what I am doing and thank for making everything clear.
Here is my issue:
I am trying to solve the following optimization problem without considering any constraints

the variable of interest is ptilda_{k,m,l,i} which is scalar

for k= …
for m = …
for l = …
for i = …
begin_cvx
variable ptilda <=======

        calculating the SINR according the formulation
        
        obj = ... 
        maximize(obj)

end_cvx
end
end
end
end

The cvx gives me an error when want to calculate the first part of the SINR’s denominator.
“Error using cvx/subsref (line 13)
Index in position 1 exceeds array bounds (must not exceed 1)”

The error comes from the fact that I am defining ptilda as a scalar and now it is not able to calculate the function that has nothing to do with this ptilda(k,m,l,i).

Any suggestions for solving this issue would be greatly appreciated.
Thanks

Don;t use one variable name for two different things. Create separate variables (MATLAB or CVX variables)

I still don;t see how you are going to get the constraint involving sinr accepted. unless \chi / \lambda \le 0.

1 Like

Thank you very much again for your quick reply. Now I know what I am doing wrongly.

My plan is to keep the concave part of log(1+ sinr) and linearized the rest using Taylor approximation. Then I will get concave expression >= constant which is convex constraint.

Do you think it’s a good/acceptable approach to deal with this non-convex constraint?

Thanks again

it may or may not converge. If it does converge, it may not necessarily converge to a local maximum, let alone a global maximum. The starting value of the optimization variables at which you do the lineaarization could be critical.

You are essentially building a poor man’s (or woman’s) nonlinear optimization solver, which does not have such important features as safeguarding via line search or trust region. I think you are better off using a non-convex nonlinear optimization solver, which you can not do using CVX. What you are doing might work o.k., but it’s a crap shoot. Even if works for one set of input data, it could fail miserably on another.

1 Like

Thanks again for your note. You are definitely right.

Could you please introduce me some non-convex nonlinear optimization solver? I am only aware of “Adaptive Random Search” algorithm.

Thanks in advance

IPOPT, FMINCON, KNITRO, SNOPT, among many other local optimization solvers. f your problem is small enough, you might be able to do semi-rigorous global optimization via BARON, BMIBNB (under YALMIP), COUENNE, or perhaps others.

For further assistance on nonlinear optimization solvers, you can try posting at https://scicomp.stackexchange.com/ or if you can wait hopefully only several more hours or days until it reaches beta and begins, the Operations Research Stack Exchange site https://area51.stackexchange.com/proposals/121892 which I think will be at or.stackexchange.com when it begins.

1 Like

Thank you so much for all the information you provided me. I Do appreciate your help!