Advice on: "Disciplined convex programming error"

I have a function that is convex, but when I run, I get the error:
Disciplined convex programming error:
Invalid quadratic form(s): not a square.

I understand what it means, all of that. Am asking for a way to get my convex problem to run… whether that be to reformulate things, up to using a different solver or writing a new atom function, or whatever… My optimization problem:

min over X (sum over ii(2*h1,ii *X - XT*h1,iiT*h2,ii*X + 0.5*XT*h1,iiT*h1,ii*X))
Subject to: 0<= X <= 1, 1T*X = a

where X is a column vector, all h’s are row vectors of positive numbers, a is a positive constant integer.

So, we can see in the second term of my sum, h1,iiT*h2,ii is not positive definite, since it is not transpose symmetric. However, when taking the Hessian of my objective function, all numbers are positive. Since X is constrained to non-negative values, my function is convex over the range of optimization.

advice for how to use this with CVX or some other solver ?


Can you please post a complete (with all input data) reproducible CVX program for your problem, even though it produces an error message. Then it will be clear to readers what your problem is. Please make the simplest, smallest version of your program which illustrates the essential difficulty you are having.

You didn’t say what “all numbers” of the Hessian matrix of the objective function refers to. If all iof the Hessian of the objective function’s eigenvalues are positive, the objective function is convex. if all the lelments (entries) of the Hessian are positive, the objective function is not necessarily convex, for example, [1 2;2 1] which is indefinite