Dynamic programming and optimal control, 3rd Edition