Let $A$ be a symmetric $n \times n$ matrix of real entries, and let $b \in \mathbb{R}^n.$ Let us define an hypercube: $$\mathcal{C}:= [m_1,M_1]\times[m_2,M_2]\times \ldots \times [m_n,M_n].$$
We want to find $$x_0=\arg\min_{x \in \mathcal{C}} \vert \vert Ax-b \vert \vert.$$
What are the best algorithms for these type of minimization problems?
I encountered this problem while devising a method to calculate partial charges in molecules from a quantum chemistry simulation. The charges ($x_0$) are defined through a certain linear system ($A$ encodes certain interactions between electrons), but there are certain natural bounds for the charges in each orbital: charge cannot be negative ($m_j=0$ for all $j$) and there cannot be more than two electrons in an orbital (in a spinless simulation, $M_j=2$ for all $j$)
You can solve this as a quadratic programming problem. To make the objective sparse, introduce variable $z_i$ to represent the error of the $i$th equation. The problem is to minimize the quadratic objective function $\sum_i z_i^2$ subject to linear constraints $Ax - b = z$ and bound constraints $x \in C$.