question

Karan avatar image
0 Likes"
Karan asked Karan commented

Limit number of items in a list?

Hi,

Is there a way to limit the number of items that can be pushed to a list?
We are currently doing this using zones and it gets tricky because our tokens are operators that go around in a loop, so we have to create item tokens in a separate flow using event triggered source and add that to a zone. To reference the zone we need the operator token to wait for event until zone content reduces. If lists can be limited to number of items then that would be a cleaner solution.


Thanks!

FlexSim 22.2.0
push to listcontent of list
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Can you post your model with references to the particular zone you're trying to get working? It may be that you can use a partition or global zone depending how the model is set up.

0 Likes 0 ·
Karan avatar image Karan Jason Lightfoot ♦ commented ·

Jason, thank you for responding.
We got this working by using wait for event On Content Change of the global list before an item gets pushed
I was trying to eliminate having to use the zone entirely because lists seem so powerful.

0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Karan commented

You cannot limit a list. You can start a list with an initial content of entries, you pull entries and push only those entries back to such a list. That is an approach to get a limited entry list. Such a list acts similar to an acquire resource activity.

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

Karan avatar image Karan commented ·
@Joerg Vogel , thank you, I will keep that in mind.

I was able to do something similar by using a wait for event On Content Change of the global list that I was using.

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.