Mathematical programs with complementarity constraints in the context of inverse optimal control for locomotion. (4th July 2017)