question

Juliette C avatar image
0 Likes"
Juliette C asked Joerg Vogel edited

Queue Pull Logic

queue.fsmI would like to fill the queue in a specific way.

There are 3 products with different item.

If a queue receive a product , the queue has to receive the same product, when the queue contains the 50 products of the same item, all the products are destroyed.

And the queue receive a new product and does the same logic

Is it possible to do that ? If yes, how ?

FlexSim 19.0.3
queue
queue.fsm (19.1 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

·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Braydn T commented

The model pulls items, that match the first item type entered the queue. The logic depends on the Pull Requirement source code. The count of 50 is a condition, you can fulfill with the batching mode in the queue.pull-requirement-first-type.fsm

if(current.subnodes.length < 1) // is empty? 
{  current.labels.assert("typeSet", item.Type).value = item.Type; 
// add label and set value
  return 1;// pull first item
}
return item.Type == current.typeSet; // pull item matching label value itemSet

· 4
5 |100000

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

Juliette C avatar image Juliette C commented ·

queue.fsm

I did a processflow but I don ' t know how to fill the queue with the same item

0 Likes 0 ·
queue.fsm (24.5 KiB)
Joerg Vogel avatar image Joerg Vogel Juliette C commented ·

Here is may example to achieve your request with a list. I push the items on the list in the Send To Port function of the Rack. I need only the Type field. The pulled label at the token accumulates the references to the items in an array. The queue gets the items by an move object activity. The first reference of the array is the reference of the item to be moved.

If the length of the array reaches 50, another move object activity send the last item of the array by the pop() method to the sink. This is LIFO. If you need FIFO then you can use the method shift() instead.batch-by-type-pf.fsm

1 Like 1 ·
Juliette C avatar image Juliette C Joerg Vogel commented ·

thank it help me a lot

model-commande.fsm

modif-model.fsm

I test your logic on a little model and it work

I put the logic inside a bigger simulation but the distribution doesn't work

There is no bug inside my simulation but I don't understand why when I implemant the logic it doesn't work

0 Likes 0 ·
modif-model.fsm (154.8 KiB)
model-commande.fsm (56.8 KiB)
Show more comments

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.