Solving Generalized Grouping Problems in Cellular Manufacturing Systems Using a Network Flow Model