Hi all -- what would be good methods (and/or software packages) to try for solving a problem minimizing a quadratic function $f(x) = \sum\_{i=1}^N{(x\_i - y\_i)^2}$, where some constraints are non-linear (and non-differentiable), e.g. $0 \leq x\_i \leq 1$, and $\sum\_i x\_i \mathbf{1}\_{x\_i>a} < b$ ? 


I am thinking about $N \approx 100$. 
FWIW, Matlab is apparently using an "active set method, similar to that of Gill et al.", which has somewhat uneven performance.



Nonlinearly constrained optimization (quadratic)
The real issue here is the constraint


$\sum\_{i} x\_{i}1\_{x\_{i}>a} < b $


whose left hand side has horrible discontinuities. 


Rather than using a solver designed for problems with continuous variables, you should formulate this as 0-1 mixed integer nonlinear programming problem, with binary decision variables $z\_{i}$ that are 0 when $x\_{i} \leq a$ and 1 when $x\_{i}>a$. You can then use branch and bound to solve the problem. 


