Trajectory optimization with constraints for alpine skiers based on multi-phase nonlinear optimal control