question

acc H avatar image
0 Likes"
acc H asked Joerg Vogel commented

I want it to fill the first time with 50, then 100, then 150.

@Joshua S ,I want it to fill the first time with 50, then 100, then 150, but don't start at 50 again.

Like the first order need 50,the second order need 100,the third order need 150,and so on.

If all order has been completed,then the quantities stock at Queue1.

FlexSim 18.2.2
change list
16564-pic1.png (42.1 KiB)
16565-pic2.png (51.7 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Logan Gold avatar image
0 Likes"
Logan Gold answered Joerg Vogel commented

You just need to keep a label on the token with the quantity you want to pull each time. If the label were named pullQuantity, then in the Pull from List activities, you would use this in the Request Number and Require Number fields:

token.pullQuantity

Then, after each Pull from List activity, use an Assign Labels activity to increment the value of the label by 50. Something like this:

This works fine if you always need to increment by 50. If you ever need to use values that are not consistent, then you would need to do something like store the values that need to be pulled each time in a table and look up those values when pulling off the list.

I'm not sure what you're asking for in the last sentence of your post. But if you're talking about if everything has been pulled from the list, then do something else - you will need to use something like the Max Wait Timer or the Max Idle Timer on a Pull from List activity probably.


· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

acc H avatar image acc H commented ·

@Logan Gold,No,I mean the first order need 50,maybe the second order need 40,the third order need 80,the fourth order need 60.Not always need to increment by 50.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel acc H commented ·

@acc H, Logans' answer is totally correct. The source of the value put into the label is different. You need another label that is incremented by 1 each time it goes through the loop (e.g. indexLabel). Then the label pullQuantity gets its value by a global table called for example quantitySequence. There you put in the rows your quantity sequence of column 1.

value of label pullQuantity:

table("quantitySequence")[indexLabel][1]

Another approach use the same method but a different sequence source, an array in a label at the token called e.g the same from above.

value of label:

token.quantitySequence[indexLabel]

Please read in the manual the chapter reference > script class reference to understand how the index label is used to get values.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.