Related Topics: | ||
Description: Returns an evenly distributed random integer value greater than or equal to Min and less than or equal to Max. The same number cannot be returned again.
Syntax: randunique(Min, Max, OnEmpty)
Min is the minimum integer value that can be returned.
Max is the maximum integer value that can be returned.
OnEmpty determines the behavior when all integers have been drawn:
If OnEmpty = 0, the simulation will stop and a message will be displayed.
If OnEmpty = 1, the range of integers will be reset and all values may be drawn again.
Remarks:
The maximum number of values in the range (Max - Min + 1) is 20,000.
All parameter values can include:
Numerical values
Standard operands (+, -, *, /)
Predefined mathematical functions (exp, log, sin, etc.)
References to any analysis workbooks
Example:
randunique(1, 10, 0)
Returns:
Any random integer from 1 to 10. When all 10 integers have been drawn, simulation will stop and a message will be displayed.
© 1992-2015. ReliaSoft Corporation. ALL RIGHTS RESERVED.