question

Scott M2 avatar image
0 Likes"
Scott M2 asked Joshua S answered

Random Pull from Queues

09202018-random-pull.fsm

Hey all,

I want to pull in flow items into my Queue 4 in a completely random order. I want the Queue it comes from and the flow item inside said queue to be chosen at random when it is being pulled. I think that I can randomize the queue that I pull from by putting a "return duniform(1, current.inObjects.length, getstream(current));" line into the Pull Strategy code, but I don't know how to randomize flow item selection within that.

Thanks in advance,

Scott

FlexSim 18.0.7
queuepull strategyrandom
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

·
Joshua S avatar image
1 Like"
Joshua S answered Abhishek K commented

Here's an example of a random pull. I assigned a label called Random to the created flow items. In the field section of the list I added a label called Random that would reference the flow items Random label. That label can then be queried where I order all the flow items based on their Random label.random-pull.fsm


random-pull.fsm (20.2 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.

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.