How can i set option seed=<A SCALAR> Topic is solved

Problems with syntax of GAMS
Post Reply
AndrewC
User
User
Posts: 17
Joined: 5 years ago

How can i set option seed=<A SCALAR>

Post by AndrewC »

Amongst various model settings we read in from gdx it includes a random seed value.
We want to assign this random seed using the option seed=

But the compiler complains it is expecting an interger, so I guess it is a compilation time setting?

Is there a way to read in some model settings from file and then use a value from those settings to set the option seed=xxx

E.g.
GDXIN myGdx
$load modelSettings
GDXIN

option seed=MODEL_SETTINGS("random_seed")

Thanks
AndyC
User avatar
bussieck
Moderator
Moderator
Posts: 1042
Joined: 7 years ago

Re: How can i set option seed=<A SCALAR>

Post by bussieck »

The execSeed "function" (https://www.gams.com/latest/docs/UG_Par ... 1_function) allows to set the random seed in a regular assignment: "execSeed = MODEL_SETTINGS("random_seed");"

-Michael
Post Reply