question

Maria de Lourdes CV avatar image
1 Like"
Maria de Lourdes CV asked Maria de Lourdes CV commented

How to use the Wait for Event and Label matching?

v8-lrp-maclas-9-may-r3.fsm

Hi @Logan Gold

Could you help me with my model?

The 2 purple activities in the attached model, I want to coordinate them. The tokens that enter into the Delay named "Pull Statistics" have a label named "Dry Room use". And to the left I have a Wait for Event, the tokens inside are waiting to go to next activity on Entry of the Delay "Pull Statistics", but I do not want to release all Tokens waiting, just the token with the same value label of "Dry Room use" from the Token of the Delay.

I set the Wait for event as next:

Label Matching/Assignment: Event Data:Token , Label name: Dry Room use, Operation: match

But it does not work.

I appreciate your time to answer my request.

Best regards,

Lourdes Carrillo

Sigma Alimentos

FlexSim 17.1.0
wait for eventlabel assignment
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

·
Matthew Gillespie avatar image
3 Likes"
Matthew Gillespie answered Maria de Lourdes CV commented

The issue is that the match operation doesn't match labels on the two tokens like you are expecting it to. It matches the token that just entered the activity you're listening to with the value on the label you specify. So your setup is saying:

Wait until a token arrives that matches the value on my Dry Room use label.

And so the comparison looks like this:

3 (value on the Dry Room use label) != The token that entered

I've attached an example model that shows a couple other ways you could synchronize by matching labels on two different tokens.

The first uses a synchronize activity with the label value as the Partition ID. This, however, will cause both tokens to wait until they are matched up.

The second uses a list to synchronize. The tokens on the left pull from the list and the tokens on the right push themselves on the list momentarily before removing themselves and moving on. This notifies any tokens on the left that are waiting while letting the tokens on the right move along without waiting. Both push and pull operations use the label value for their partition ID's.


syncexample.fsm (25.7 KiB)
· 1
5 |100000

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

Maria de Lourdes CV avatar image Maria de Lourdes CV commented ·

Thanks for your answer.

I solved it by synchronizing them using a list :)

Best regards,

Lourdes Carrillo

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.