The "option randseed 0;" command changes the random seed to a number based on the system clock, which will be a different every time the command is given. It also displays the seed that was chosen:
ampl: option randseed 0;
option randseed 18446744073154155119;
ampl:
When you write a parameter definition like
param f {(i,j) in A} := round(Uniform(1000,3000));
the value of the expression on the right is not assigned to f[i,j] immediately. It is only assigned at the first command where f[i,j] is actually used, which may be the "solve" command. To force the assignment to be made before solving, with the random seed that you want, you can declare only "param f {(i,j) in A} >= 0;" in your model and then after the model and data files are read, give the command "let {(i,j) in A} f[i,j] := round(Uniform(1000,3000));". Using this approach, you can organize your script like this:
model CMNDexponentialdecay.mod;
data CMNDexponentialdecay20nodes.dat;
option randseed 1;
<put "let" statements here for params that should have the same random values every time>
option randseed 0;
<put "let" statements here for params that should have different random values every time>
solve;
This arrangement is appropriate for the situation shown in your example, where you do a full "reset;" at the beginning of each run.
Bob Fourer
am...@googlegroups.com
=======