question

Steven Chen avatar image
0 Likes"
Steven Chen asked Steven Chen commented

Invalid triggering event on local/internal list

Hello,

In process flow, use Event-Triggered Source to listen local/internal list causing exception. But if's fine to listen global list.

FlexSim 20.2.3
flexsim 20.2.3event triggerlocal list
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

@steven.chen, that is absolutely normal. Many features are only available with global lists. Global lists are treenode bound and local/internal lists aren’t. Local lists exists only as data but you can’t explore them with a table.query either. If you need tree bound features of a list, you must use global lists.

0 Likes 0 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Steven Chen commented

You can think about a local / internal list with a scope restricted to the function or source code where she exists. Then you can not reference the pointer from an external scope. The list declaration must be global to get access to a list. You can compare this with a declared variable in a for-loop statement block that you can not get access to from outside of this block.

· 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.

Steven Chen avatar image Steven Chen commented ·

As jason.lightfoot said, it's ok to listen event-triggered source in general process flow. But causing exception in object/instance process flow. The reason may be Jörg Vogel explained, the local list is inside scope of instance, since the instance is not instantiated so the list doesn't exists at design time, so it can't be referenced by event-triggered source. Does I understand it right?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Steven Chen commented ·

The instances of object process flows exist when members objects are added, so you should be able to listen to them but this is not supported currently that I can see, and certainly not through the standard acitivity options.

The solution is to may the internal list type global and use partitions by instance and match the listening event to the partition (current)

1 Like 1 ·
Steven Chen avatar image Steven Chen Jason Lightfoot ♦ commented ·

Awesome! I didn't think of partition can solve my question.

0 Likes 0 ·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

In a simple case there's no problem with this - as shown in the attached model.

So there must be something else happening. If you've instanced process flows I can image that might cause issues - but if you could share your model that would help us understand what's happening.


EventTriggeredSourceListensToInternalList.fsm


5 |100000

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

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.