Approximate dynamic programming for constrained linear systems