  The solution of a constrained linear-quadratic regulator problem is
determined by the set of its optimal active sets. We propose an algorithm that
constructs this set of active sets for a desired horizon N from that for
horizon N-1. While it is not obvious how to extend the optimal feedback law
itself for horizon N-1 to horizon N, a simple relation between the optimal
active sets for two successive horizon lengths exists. Specifically, every
optimal active set for horizon N is a superset of an optimal active set for
horizon N-1 if the constraints are ordered stage by stage. The stagewise
treatment results in a favorable computational effort. In addition, it is easy
to detect the solution of the current horizon is equal to the infinite-horizon
solution, if such a finite horizon exists, with the proposed algorithm.
