|
|
|
|
Specific Search Results Below:
|
| |
|
RANDSEED
|
| |
Stefan Reh (ANSYS, Inc.)
|
| |
"All random number generators are only pseudo-random number generators. They use what is called a "seed" value to calculate a random number. The result is only pseudo-random because with the same seed value you will always end up with the same "random" number. So whenever you start ANSYS it initializes the seed value. If you start generating random numbers then you will always get the same sequence of "random" numbers. The solution to this problem is to randomize the seed value itself using the system-time. Enclosed is the macro "randseed" that will exactly do that. You will get "real" random numbers after you run "randseed". You might want to run this macro every time before you start with your random number generation. You can also include the macro in your "start.ans" procedure so it will be executed each time you start ANSYS." It effectively randomizes
the seed by executing the RAND an arbitrary number of times.
[permalink]
|
| |
|
Average Rating: 5.0 (8 votes)
|
|
|
| |
|
|