Simio
  • 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.
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.
 #2974  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.
(32.28 KiB) Downloaded 821 times