question

gilbert jerald avatar image
0 Likes"
gilbert jerald asked gilbert jerald commented

Issue in release the token from wait for event

Hi,

In process flow I have created 3 tokens and in 3-D model I have 3 staging queues so item enter in the staging queue at different time. I need to understand how to execute the two methods.

Method 1:

In current logic, all three tokens exit the wait for event when first item enter the queue1 but the logic which I am expecting is.

token id 1 should exit the “wait for event” when the item enters in queue 1

token id 2 should exit the “wait for event” when the item enters in queue 2

token id 3 should exit the “wait for event” when the item enters in queue 3

Method 2:

I am using group logic in “wait for event” so in current logic all threes token exits the wait for event when first item enters the queue1 but the logic which I am expecting is.

token id 1 should exit the “wait for event” when the item enters in queue 1

token id 2 should exit the “wait for event” when the item enters in queue 2

token id 3 should exit the “wait for event” when the item enters in queue 3

Note:

I would like to know when we have to use the “match value” in wait for event

Thanks for your valuable answer Wait For Event Sample Model.fsmMatchValue.PNG

FlexSim 20.2.3
wait for event
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

Regan Blackett avatar image
2 Likes"
Regan Blackett answered gilbert jerald commented

When multiple tokens are waiting for the same event of the same object(s), the activity will release all tokens unless you have a way to filter what tokens are released. Usually, you would use the operations for “Match” or “Match Value” for this. Then tokens that match some aspect of the event data will be released instead. Match and Match Value are similar but with a key difference. Since you asked about it here’s how they work:

The Match operation expects a label on the token to have data that can match the event data for the event. In The case of OnEntry you can either match with the Flowitem that entered the object or the Input port on the object the item arrived on. So you would choose a label on the token whose data is either a reference to the item entering the queue or a label that has number data that represents an input port on the Queue. The token with the matching data is then released.

When using Match Value, rather than choosing a label with the matching data, you would type in the value you want to match explicitly into the Label name/Value column. For example if you were matching based on port connection you would type the number 2 into the column if the OnEntry event fired for port 2 on the Queue.

In your case however, you don’t have a way to match up very well to either of those event data that the OnEntry event offers. The tokens have no association with the items, and all the queues just have the 1 input port so you can’t match on that either.

However you do have a reference to each queue object on the tokens using your QueueName label, this gives a way to do what you want by changing how you listen to the OnEntry event. Rather than listening the Group or each Queue individually, in the Wait for Event activity’s Object field put in your label token.QueueName. That way each token only listens to the queue they are assigned to rather than listening to all the queues.

· 3
5 |100000

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

gilbert jerald avatar image gilbert jerald commented ·

Hi @Regan Blackett

Thanks for your detail answer I have tried out as you said to refer the QueueName in Object field and it's working But for match and match value can you give me a sample model that would be very useful for me.

Thank you

0 Likes 0 ·
Regan Blackett avatar image Regan Blackett ♦ gilbert jerald commented ·
0 Likes 0 ·
gilbert jerald avatar image gilbert jerald Regan Blackett ♦ commented ·
Thanks for your answer
0 Likes 0 ·