Determines the type and seed that will be used to create random numbers between 0 and 1 for all tools that utilize random numbers (for example, CreateRandomRaster, CreateRandomPoints, and the ArcGIS.Rand() function).
Learn more about Random number generators and streams
- The default value for the seed is zero.
- If a tool using the random values (for example, CreateRandomRaster, CreateRandomPoints, or CalculateValue) is run twice with the same seed, the output will be identical. Control over the seed allows you to reproduce your results.
- If a random number generator is defined globally, one stream of random values will be created. Each subsequent tool or tools within a ModelBuilder model will pull the next available value from the stream as needed.
- Multiple random number generator streams can be used in a ModelBuilder model by creating them locally for the desired tools that use random numbers. Each tool can have its own stream from which to pull random values as needed. Only the tool with the local stream can pull values from that stream. There is no limit to the number of local streams.
- The STANDARD_C random number generator is the same random number generator accompanying the standard C libraries from Microsoft. The source code is contained in a file called RAND.c and the file is generally stored in ProgramFiles/Microsoft Visual Studio/VC98/CRT/SRC.
- Learn more about specifying general settings
- Learn more about environment settings
- Learn more about environment levels and hierarchy
An overview of the command line window
RandomGenerator <Random number generator>
| Parameters |
Explanation |
Datatype |
| <Random number generator> |
The seed and the generator to be used for creating random values. The seed is an integer value and is used to initiate the random number generator. There are three available random number generators, STANDARD_C, ACM599, and MERSENNE_TWISTER.
The seed and generator type are specified in quotes.
randomGenerator "1 ACM599"
|
Random Number Generator |
Data types for geoprocessing tool parameters
Command line example
randomGenerator "4 MERSENNE_TWISTER"
An overview of scripting in geoprocessing
RandomGenerator (Random number generator)
| Parameters |
Explanation |
Datatype |
| Random number generator (Required) |
The seed and the generator to be used for creating random values. The seed is an integer value and is used to initiate the random number generator. There are three available random number generators, STANDARD_C, ACM599, or MERSENNE_TWISTER.
The seed and generator type are specified in quotes.
randomGenerator "1 ACM599" |
Random Number Generator |
Data types for geoprocessing tool parameters
Script example
import arcgisscripting
gp = arcgisscripting.create()
gp.workspace = "h:/workspace"
gp.RandomGenerator = "4 MERSENNE_TWISTER"