A multiple-shooting differential dynamic programming algorithm. Part 1: Theory. (May 2020)