Calculates the optimal quantity combination