Re: Modelling a multi variant pull system?
Posted: Thursday 09 July, 2015 - 11:12
Ha Dominik,
I had a short look at your model and am wondering if the following might be a solution. The following code is placed on the "Queue74" OnEntry:
Here I place a label on the queue that has to deliver the number of products I want to receive. Then I open this queue.
On the OnExit of the queue, I place the following code:
Here I decrement the label every time a product leaves the queue. When the label becomes 0, I close the queue again, since all products requested are delivered.
Would something like that do the trick?
And a few notes to the side.
Cheers,
Harry
I had a short look at your model and am wondering if the following might be a solution. The following code is placed on the "Queue74" OnEntry:
Code: Select all
if(
and(
Label([Pvariant], first(c)) = 1,
content(in(2,c)) >= Label([t-curqty],Model)
),
Do(
Label([t-curqty],In(2, c)) := Label([t-curqty],Model),
OpenOutput(in(2, c))
)
)
On the OnExit of the queue, I place the following code:
Code: Select all
Do(
Dec(Label([t-curqty], c), 1),
If(
Label([t-curqty], c) = 0,
CloseOutput(c)
)
)
Would something like that do the trick?
And a few notes to the side.
- You place a label on the model I see. Is that really necessary? Can't you place it on the order that arrives into the "Queue74"? For me that would seem a more logical place.
- Is it necessary to check for the content of the queue? What do you want to do when the product queue doesn't contain enough products?
Cheers,
Harry