0

How do I solve a quadratic optimization problem with the following constraints:

Minimize (1/2)X^TQX + C^TX

Subject to -0.01 < x_i < 0.01 or 0.05 < x_i < 0.20, for any x_i in X

Where Q is matrix, C, X are vectors.

It seems that I can't reformulate above constraints as standard bound constraints or inequality constraints

mpp
  • 959
  • 1
  • 6
  • 4
  • 1
    You will need support for binary-variables rendering it a MIQP (which is much harder to solve; even 0-1 linear integer-programming is NP-hard). The constraint you want to pose is non-convex – sascha May 24 '17 at 01:07

1 Answers1

1

Notice that the feasible region here is non-convex -- if we have one feasible solution with x_1 = 0.01 and another with x_1 = 0.05 then any proper convex combination of these two solutions will be infeasible. Because of this, it is provably impossible to reformulate this problem to a standard quadratic program using only continuous variables.

Instead, you will need to resort to using binary variables. For instance, we could introduce binary variables y_i (one per x_i variable) and reformulate the problem as:

Minimize (1/2)X^TQX + C^TX
Subject to -0.01 + 0.06y_i <= x_i <= 0.01 + 0.19y_i, for any x_i in X
y_i binary

Note that now for any variable with y_i = 0 you have -0.01 <= x_i <= 0.01, and for any variable with y_i = 1 you have 0.05 <= x_i <= 0.20.

josliber
  • 43,891
  • 12
  • 98
  • 133