[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Random Number seeds

From: Jeffrey Kantor
Subject: Re: [Help-glpk] Random Number seeds
Date: Mon, 7 Dec 2009 22:27:32 -0500


Thanks.  This gave me a good start, I came up with the following idea to generate a starting point for each time the code is executed:

param utc := prod {1..2} (gmtime()-1000000000);
param seed := utc - 100000*floor(utc/100000);
check sum{1..seed} Uniform01() > 0;

It would be nice to have a seed function :=)


On Mon, Dec 7, 2009 at 3:15 PM, Andrew Makhorin <address@hidden> wrote:
> Within GMPL (i.e., MathProg) , is there a simple way to set the
> seed  for psuedo-random number generation? I #39;d like to be able
> to randomize the starting point to stress test an example I #39;m
> developing.

Currently the seed function is not implemented. However, you may
skip some pseudo-random numbers as follows:

param SEED := 1000;
check sum{1..SEED} Uniform01() > 0;

This is not elegant though works.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]