Random Number Generator/ Sampling without replacement

Do you have objects, models, libraries, path decorators, textures, symbols, custom API code, documentation, or anything else others might find useful? Please attach it here with a brief description.
Post Reply
dsturrock
Simio Team Member
Posts: 1455
Joined: Thu Mar 13, 2008 12:35 pm
Location: Sewickley, PA USA
Contact:

Random Number Generator/ Sampling without replacement

Post by dsturrock » Thu Dec 06, 2012 9:11 pm

I have a question about sampling without replacement, or finding unique solutions with the random number generator. For example, if I wanted to simulate the game of Bingo, and I wanted to randomly select a number, but once that number is selected, it is then removed from the list of available numbers. Is there syntax to apply this rule when using the random number generator in Simio? Or is there another method for doing this?
Just for fun I did a Lotto object that can meet this need. It simply keeps track of what samples have already been generated and prevents reusing a number.
LottoGenerator.spfx
(32.28 KiB) Downloaded 802 times
Dave Sturrock
VP Operations, Simio LLC

Post Reply