I have been studying the following optimization problem in $x_0, \dots, x_{n-1}$
$$\begin{array}{ll} \text{minimize} & \frac{1}{2} \displaystyle\sum_{i=1}^{n-1} \left( x_{i-1} - x_i - y_i \right)^2\\ \text{subject to} & x_j \in [-\alpha_j, \alpha_j]\end{array}$$
where $y_1, \dots, y_n$ and $\alpha_0, \dots, \alpha_{n-1} \geq 0$ are constants.
What is the best way to solve this QP? Best in terms of computation effort (speed and memory requirements).
Thanks!
Alternating direction method of multipliers (ADMM) should solve this problem with linear convergence rate (for a given accuracy).
Define $z_i=x_i+\alpha_i$, $z_{i+n}=-x_i+\alpha_i$, where $z_i\geq0$ and a matrix $A\in\mathbb{R}^{2n\times n}$ such that $z=Ax$. So your problem has the following form:
\begin{equation} min_{x\in\mathbb{R}^n \\ z\in\mathbb{R}^{2n} \\ z=Ax}\sum_i(x_{i-1}-x_{i}-y_i)^2+\delta_{\mathbb{R}_+^{2n}}(z) \end{equation}
and apply ADMM (you can find here https://web.stanford.edu/~boyd/papers/pdf/prox_algs.pdf more details).