Ajusting Quantities to be ordered to suppliers Minimum ordering quantities

Hello Everyone,

I work in consumer goods company. I am automating their procurement process on knime. I have configurated the part that calculates the quantites I need to order over the spam of 10 month.
However, in order to submit my first order I need to recpect a set of criterias:
1- For every supplier, the sum of the quantities of all the articles of that supplier needs to respect the minimum ordering quantities (MOQ) of the supplier:
If the sum of the articles I want to order in the first month doen’t respect it, the monthly needs of the following months keep adding up until I reach the MOQ.
Example in Excel File attached.
MOQ.xlsx (12.5 KB)

Thank you and have a good day.

Hi @mehdi_zinbi , you can use the Moving Aggregation node for this.

Here’s a way to do this:

Input data:

Output:

Here’s the workflow: Ajusting Quantities to be ordered to suppliers Minimum ordering quantities.knwf (44.1 KB)

EDIT: If you only want to know which Months per supplier need to go in the first order, you can modify the workflow to this:

Basically just move the Loop End there and remove the rest.

This will give you this result:

1 Like

Hey @bruno29a ,

Thank you for your help. The model works. However, how can I please add the condition that if the quantity to be ordered of an article in the first month is 0 the model should not try to add up next month’s need it should automatically say “NO” and only aggregate (sum) next months needs if in the first month the quantities to be ordered are higher than 0. Because in the example I gave non of the demands was 0 but it turned out that it might be the case. In this example lets say kitkat’s demand for first month was 0 the model shouldn’t keep going forward with kitkat?

Thanks

Hi @mehdi_zinbi , I’m not sure I understand.

Can you show us a sample data of such a case and what the expected behaviour and results would be?

Hello @bruno29a
So what I am trying to say, is that in case the sum of the quantities to be ordered in the first month is 0, nothing should be ordered from that supplier and the model should stop and not keep adding next months until it reaches MOQ.
MOQ.xlsx (14.4 KB)
I have added an example in the data with the company P&G. If the sum of the quantities to be ordered for P&G in the first month is 0, the system should not place an order for P&G:


However, with the current model it doesnt do that:

So my need is to add something to this model so that it first checks if the sum of the quantities is 0 it doesn’t place the order if its not zero then it start adding up next months until it reaches MOQ.

Thank your for your time and patience.

Hi @mehdi_zinbi , thank you for the data and the explanation.

I modified the workflow to bypass everything for the supplier if the sum for the first month is 0 for a supplier. I added an IF Switch to do this. I highlighted the changes here:

And here is the results:

Here’s the updated workflow: Ajusting Quantities to be ordered to suppliers Minimum ordering quantities.knwf (60.2 KB)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.