question

Alessio Merlo avatar image
1 Like"
Alessio Merlo asked Jordan Johnson commented

Wait For Event: missing feature

Hi,

using "wait for event" activity I discovered that I can wait the same event on different objects, but they must be in a group. In my model I can't define a group because the objects always change. I try to save an array with the list of objects, but when the token enters in the activity only a monitor on the last element of the array is activated.

I created a simple model to replicate the issue. Is there an error in my implementation or is that a missing feature?

Thanks for your support.

example.png

example.fsm

FlexSim 18.0.1
wait for event
example.png (236.7 KiB)
example.fsm (23.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

·
Jordan Johnson avatar image
3 Likes"
Jordan Johnson answered Jordan Johnson commented

You are right that the Wait for Event (and the Event Triggered Source) both do not listen to arrays. I'll make sure this gets on the dev list to review.

For now, here is one possible workaround. If you only need one Group, make an empty group in the toolbox, and use the Group API to add members to the group, rather than to the Array.

10116-example-1.fsm

If you need many dynamic groups, you might be able to use createinstance() to create a Group object on a token's labels, and add all the objects you want to it.


10116-example-1.fsm (26.4 KiB)
· 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.

Alessio Merlo avatar image Alessio Merlo commented ·

Thanks @jordan.johnson!

I will implement your solution, while waiting your review.

Unfortunatly I discover a bug in your model. I removed all elements from group 2, click on the activity "wait dynamic group", then an exception occurs!

Probably the activity tries to check if the event exists in the group and returns the exception.

0 Likes 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ Alessio Merlo commented ·

The exception I get when I do that is in the Quick Properties, which probably assumes there is at least one object in the Group. It shouldn't affect your model run, but I'll put it on the list.

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.