A Mathematical Optimization Model for Solving Minimum Ordering Problem with Constraint Analysis and some Generalizations