Fixed bogus implementation of optimality_fctn for the solver quadprog.