A complementarity algorithm for an optimal capital path with invariant proportions