Constraint on the product of two variable matrices


(Abdullateef Almohamad) #1

I am trying to solve the below optimization problem, but I get the below error:
“Only scalar quadratic forms can be specified in CVX”

The code:
cvx_begin
variable x(n);
variable A(L,n);
maximize(sum(x))
subject to
A*x <= c
sum(A,2)<=k
cvx_end

While when A is not a variable as in the examples in cvx website it works well.
Your help is very appreciated, and sorry if my question is basic as I am new to convex optimization.
Thanks.


(Mark L. Stone) #2

When A and x are both CVX variables, A*x is non-convex. When only one of them is a CVX variable, A*x is convex (as well as concave, since it is affine (linear)).

Read Why isn't CVX accepting my model? READ THIS FIRST! and http://stanford.edu/~boyd/cvxbook/ .


(Abdullateef Almohamad) #3

Thanks a lot for your reply and suggestions.