# Quadratic Programming bound constraints

I have a quadratic programming problem with constraints of the general form:

Minimize w.r.t. x:

f(x) = (1/2) x^T * Q * x + c^T * x


subject to one or more constraints of the following form:

A * x <= b (inequality constraint)

E * x = d (equality constraint)


My problem is that I want to have an inequality constraint like x<=u where x is the vector being minimized and u is a vector(!) which is constant.

I also considered something like norm(x)<=norm(u) as a better constraint, but I can't express it/ implement it.

I tried with JOptimizer and ojAlgo but it does only work when u is not a vector but a constant.

So, how can I achieve an inequality constraint "x<=u" or "norm(x)<=norm(u)" where x and u are vectors?

• Not sure which constraint you refer to as problematic for JOptimizer. Everything you've discussed above can be implemented in JOptimizer (the norm-constrant would use the SOCP capabilities, or written as $x^Tx \leq d$ by squaring it, and then using the QCQP solver) – Johan Löfberg Jan 23 '14 at 6:59