Random Pull from List and Leave Entries on List

Random Pull from List and Leave Entries on List

martin_c3
Not applicable
14 Views
2 Replies
Message 1 of 3

Random Pull from List and Leave Entries on List

martin_c3
Not applicable

[ FlexSim 18.0.10 ]

Hello,

I am working on a model with ProcessFlow where I need to randomly distribute flowitems to different queues using a Task Executer.

I added the queues to a Global List. For randomly distributing the flowitems I added a "Pull from List" activity with the query "ORDER BY Random ASC". The pulled queue is then assigned to the token.destination-label.

Additionally I would like to keep the queues on the list, as they should be able to be pulled several times (the queue should hold multiple flowitems).

With the checkbox "Leave entries on List" enabled, there is no random pulling. The first queue on the list is always pulled. Disabling the checkbox enables the random pulling, however only five flowitems are transported, because the queues are removed from the list.

How can I randomly pull entries from a list, while having "Leave entries on List" enabled?

I have attached a simplified model that recreates the issue:

pull-random.fsm

Any help would be greatly appreciated.

0 Likes
Accepted solutions (1)
15 Views
2 Replies
Replies (2)
Message 2 of 3

braydn_t
Not applicable
Accepted solution

Hi @Martin C3

I am unsure about the scope of your model, but if I am understanding correctly you just want the Queues on the list so that multiple flow items can go to them. In that case, this is a way you can get random distribution in process flow without the list. This is what your process flow will look like when you are done:

19657-pull-randon-process-flow.png

First you will add an Assign Labels, and edit the fields so it assigns values 1-4 on a statistical distribution like this:

19658-pull-randon-assign-labels.png

Then you will change your Unload Station field to Custom Code and put this in:

19659-pull-random-unload.png

That way it will look at the randomly assigned label on the flow item, and send it to its respective Queue. Let me know if this works for you, or you have other goals in mind for your model.

0 Likes
Message 3 of 3

braydn_t
Not applicable

Hey @Martin C3

Did this answer work for you? If so, could you please click the accept button, and if not, could you let me know what else we can do to help you?

0 Likes