%0 Journal Article %A Benjamin Michaud %A François Bailly %A Eve Charbonneau %A Amedeo Ceglia %A Léa Sanchez %A Mickael Begon %T Bioptim, a Python framework for Musculoskeletal Optimal Control in Biomechanics %D 2021 %R 10.1101/2021.02.27.432868 %J bioRxiv %P 2021.02.27.432868 %X Musculoskeletal simulations are useful in biomechanics to investigate the causes of movement disorder, to estimate non-measurable physiological quantities or to study the optimality of human movement. We introduce Bioptim, an easy-to-use Python framework for biomechanical optimal control, handling musculoskeletal models. Relying on algorithmic differentiation and the multiple shooting formulation, Bioptim interfaces nonlinear solvers to quickly provide dynamically consistent optimal solutions. The software is both computationally efficient (C++ core) and easily customizable, thanks to its Python interface. It allows to quickly define a variety of biomechanical problems such as motion tracking/prediction, muscle-driven simulations, parameters optimization, multiphase problems, etc. It is also intended for real-time applications such as moving horizon estimation and model predictive control. Six contrasting examples are presented, comprising various models, dynamics, objective functions and constraints. They include data-driven simulations (i.e., a multiphase muscle driven gait cycle and an upper-limb real-time moving horizon estimation of muscle forces) and predictive simulations (i.e., a muscle-driven pointing task, a twisting somersault with a quaternion-based model, a position controller using external forces, and a multiphase torque-driven maximum-height jump motion).Competing Interest StatementThe authors have declared no competing interest. %U https://www.biorxiv.org/content/biorxiv/early/2021/05/03/2021.02.27.432868.full.pdf