Equality Constraints overly conservative

image

I have attached the mathematical formulation of my problem above. It is a relaxation of magnitude least squares problem aka min(|Ax|-b) for some combination weight x. The issue with the constraint giving 0.5 for all diagonals is that that is where the weights for solution come from so if they are all 0.5 the fit for the problem is just a straight sum of the inputs.

Can you confirm that as I laid out my constraint in code matches my layout of the constraint in formula. If this is this case then I need to further explore what the issue is with my optimization but I wanted to troubleshoot this first.

Thank you for the help,

Olivia