Hello Andrew,

currently there is not way to set the seed of the random number generator in
GMPL.

I suggest to implement the same syntax as in AMPL:

option randseed n;

n is a numeric expression.Only the integer part of the number is used.

Hence it would be possible to write:
option randseed gmtime();
to create a new random seed on any invocation of the model.

"option randseed" only has to call 
rng_init_rand(mpl->rand, int seed)

Concerning implementing the option statement I am thinking of the following
full syntax:
option {domain} first_parameter second_parameter;

This will allow for future further options being set automatically based on
a table statement:
set O, dimen 2;
table t IN "CSV" "option.csv" : O<-[option, value];
option {(o,v) in O} o v;

The new syntax could be used in a future implementation of glpsol to set
elements of structures glp_smcp and glp_iocp controlling the solver.

Best regards

Xypron
-- 
View this message in context: 
http://www.nabble.com/Seed-for-random-functions-tp21151171p21151171.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.



_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to