Random Pull from Queues

Random Pull from Queues

scott_m2
Not applicable
67 Views
1 Reply
Message 1 of 2

Random Pull from Queues

scott_m2
Not applicable

[ FlexSim 18.0.7 ]

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

0 Likes
Accepted solutions (1)
68 Views
1 Reply
Reply (1)
Message 2 of 2

joshua_s
Not applicable
Accepted solution

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