Affine Generalized Inverse for Optimal Control Allocation