Prioritized optimal control: A hierarchical differential dynamic programming approach