pythonoptimizationmathematical-optimizationcvxopt

sum of absolute values constraint in semi definite programming


I want to further my real world semi definite programming optimization problem with a constraint on sum of absolute values. For example:

abs(x1) + abs(x2) + abs(x3) <= 10.

I have searched internet and documentation but could not find a way to represent this. I am using python and cvxopt module.


Solution

  • Your constraint is equivalent to the following eight constraints:

     x1 + x2 + x3 <= 10
     x1 + x2 - x3 <= 10
     x1 - x2 + x3 <= 10
     x1 - x2 - x3 <= 10
    -x1 + x2 + x3 <= 10
    -x1 + x2 - x3 <= 10
    -x1 - x2 + x3 <= 10
    -x1 - x2 - x3 <= 10
    

    I haven't used cvxopt, so I don't know if there is an easier way to handle your constraint with that package. For example, your constraint is equivalent to |x|_1 <= 10, where |x|_1 is the 1-norm of x.