Generating random numbers

You can use ACL to generate a set of random numbers, where you can specify the minimum and maximum values, the number of columns to write the output to, and the seed value for the random number generator. Typically, the list of generated values is used with applications other than ACL.

To generate random numbers:

  1. Select Tools > Generate Random Numbers.
  2. In the Main tab enter the following information:
    • Number – The number of random numbers to be generated.

    • Seed – Optional. The starting point for the random number generator. If a Random command is duplicated with the same seed value, the random number sequence is reproduced exactly. If the seed value is zero, or a seed value is not provided, ACL generates the seed value.

    • Minimum – The lower bound of the range over which the random numbers are generated. Any valid numeric value or expression is allowed.

    • Maximum – The upper bound of the range under which the random numbers are generated. Any valid numeric value or expression is allowed.

    • Columns – The number of columns to be used to display the numbers. The default number of columns is 6.

    • Unique – Specifies that only unique numbers should be included in the output. When you select the Unique checkbox, each random number generated is compared to the entire list of previous numbers for this command.

      You should not select Unique when the number of random numbers to be generated exceeds 75 percent of the range because this can result in an inordinate number of random numbers being discarded. The default behavior is to include duplicates in the output.

    • Sorted – Specifies that the output list of numbers should be displayed in ascending sort order. Values are not sorted by default. If you select this option when you append a new set of random numbers to an existing sorted file, the results of each command are sorted, but the second set of sorted numbers is appended after the existing set of sorted numbers.

    • Append To Existing File – Specifies that the command output should be appended to the end of an existing file instead of overwriting the existing file.

  3. Click the Output tab.
  4. Select the appropriate output option in the To panel:
    • Screen – Select this option to display the random number output in the Results tab in the ACL display area.

    • File – Select this option to save the random number output to a text file.

  5. If you selected File as the output type, specify the filename in the Name text box in the As panel, or click Name and browse to select an existing file.

    If the Append To Existing File checkbox is selected the output will be appended to a file with the same name, if found, otherwise you will be prompted to either overwrite the file or append the output.

    You can also specify an absolute or relative file path, or navigate to a different folder, to save or append the output to a file in a location other than the project location. For example: C:\Output\random.txt or Output\random.txt.

  6. Click OK.


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback