Normalizing the variable

I have an optimization problem, where I define a variable x (which is 3 dimensional) and then as one of the terms in the objective, I have to include this term, which amounts to normalizing the variable to 1:

objective = norm(vec ( sum(x,3) /max (max (sum(x,3)) ) - T)) subject to x>=0

Here, T is some observed data (Basically, sum the variable x along the third dimension, normalize it to one and then minimize the error with respect to T)

So, obviously since f(x)/g(x) leads to non-convex term, hence, it gives an error. But my question is since x is non-negative, can’t this be done by inv_pos because reciprocal powers in positive domain are convex? (It gives error when I use inv_pos to find the inverse.Is it because of the max?) What am I missing?

help inv_pos

inv_pos Reciprocal of a positive quantity.
inv_pos(X) returns 1./X if X is positive, and +Inf otherwise.
X must be real.

 For matrices and N-D arrays, the function is applied to each element.

  Disciplined convex programming information:
      inv_pos is convex and nonincreasing; therefore, when used in CVX
      specifications, its argument must be concave (or affine).

help cvx/max
Disciplined convex/geometric programming information:
max is convex, log-log-convex, and nondecreasing in its first
two arguments. Thus when used in disciplined convex programs,
both arguments must be convex (or affine). In disciplined
geometric programs, both arguments must be log-convex/affine.

So the argument of inv_pos will be convex, not concave, and therefore violates DCP rules. Even if you got rid of the max, there would still be the CVX convex expression in the numerator multiplying it, which would also violated DCP rules.

Thanks. Any suggestions if this could ever be expressed in framework of the DCP rules

I believe the objective function would need to be different, i.e., not equivalent. not just a rearranging of the same mathematics.

It’s your problem, so presumably you know what you want to do, I have no idea what you want to do.

If this ir the problem, you really want to solve, you can use YALMIP to call a local or global nonlinear non-convex optimizer.