Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Find Minimum Order Quantity Count which satisfy Maximum requirements

 

Problem to solve : find minimum number of StuffID required to be ordered per Area Line Product combination to satisfy the production of the order.
For Example in below scenario (please refer image)-
For Line 44 dataset 3.7 satisfies 4 requirement so that should be ordered hence MinOrderQuantity=1
-As 3.9 requirement will be met if 3.7 is ordered so we do not have to order it hence MinOrderQuantity stays 1
-As 3.5 next satisfies maximum requirements so that should be also ordered hence MinOrderQuantity=1 so as of now MinOrderQuantity becomes =2 (1 for 3.7 + 1 for 3.5)
-As 3.3 half requirement will be met by ordering 3.5 hence we only need to order it one time so that it will be satisfied, as well as 3.1 will be satisfied. So Total MinOrderQuantity now becomes =3 (1 for 3.7 + 1 for 3.5+ 1 for 3.3)

 

For Line 45 dataset 3.7 & 3.9 both satisfies 3 requirement so either one can be ordered hence MinOrderQuantity=1
-As 1 of 3.5 requirement still not satisfied but as its in intersaction with 3.3 we can order 1 for 3.5 and it will satisfiy both 3.5 and 3.3 , So MinOrderQuantity = 1 , so as of now MinOrderQuantity for line 45 is total 2 (1 for 3.7 or 3.9 + 1 for 3.5)

 

Finally we need overall for Area M7 MinOrderQuantity = 5

 

 

 

 

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

     

    Is satisfied requirement calculated by count the records per line per dataset? For example, in Line 44, there are 4 rows recorded about dataset 3.7, so, we should say Line 44 dataset 3.7 satisfies 4 requirement, right?

     

    But, I cannot understand how to determine whether a dataset should be ordered. Why is 3.9 requirement met while 3.5 not? Please provide more detailed description.



    -As 3.9 requirement will be met if 3.7 is ordered so we do not have to order it hence MinOrderQuantity stays 1
    -As 3.5 next satisfies maximum requirements so that should be also ordered hence MinOrderQuantity=1 so as of now MinOrderQuantity becomes =2 (1 for 3.7 + 1 for 3.5)
    -As 3.3 half requirement will be met by ordering 3.5 hence we only need to order it one time so that it will be satisfied, as well as 3.1 will be satisfied. So Total MinOrderQuantity now becomes =3 (1 for 3.7 + 1 for 3.5+ 1 for 3.3)


     

    Best regards,

    Yuliana Gu