question

Byron H2 avatar image
0 Likes"
Byron H2 asked Eric M answered

How to process latest items in combiner?

Hello, in my problem I got 2 ovens represented as a combiner and separator (the pallets are like trays where you put the cookies). Each oven can bake 30 cookies (presented as boxes) at a time. At the start of the simulation I got 100 cookies but the simulation wont end because at the end will remain 10 cookies and none o the combiners will trigger. How can I bake the last 10 cookies?

question.fsm

FlexSim 21.1.3
combinerflexsim 21.1.3
question.fsm (29.6 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

Eric M avatar image
0 Likes"
Eric M answered

Hi @Byron H2, the key here is allowing the combiner's target quantity to change based on the Queue contents. I basically record the queue's contents each time boxes exit the queue. If this content drops below 30, I update a global table with the leftover amount. The combiners then read from this table to determine how many boxes to pull for each batch.

To do this, I first create a global table with only one row and one column. On Queue1's 'on exit' trigger, I select 'Write to GlobalTable." I added some code here to change the value depending on the queue's contents which you can see below (the -1 comes because the box leaving which triggers the event is still technically in the queue even though it's about to leave).

Next, I add a label to the pallets coming in called "Type" and set the value to 1 (this is just for the combiners to read from the table we created above). I use an 'on entry' trigger for the combiners and select "Update Combiner Component List." This asks for the name of the table and label. The label value is looking at the label on the pallet. It determines which column will be used to set the target quantity. Since we are only using 1 column, the Type label was set to always be 1.

No matter what your initial value of cookies are, the combiners will always bake in batches of 30 until the last batch when it will just bake the leftovers.

question-EM.fsm


1622586939960.png (6.3 KiB)
question-em.fsm (30.3 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.