Can GAMS do random sampling from given dataset?
Posted: Sat Apr 21, 2018 6:04 pm
Hi experts,
I am considering if I can define one random parameter, which can randomly pick one value from one dataset (assume stored in a parameter or table) each scenario. This can be also referred as sampling, and I know in stochastic programming GAMS can use EMS to do this. However, my goal here is just to randomly pick one value from a given dataset and store it in the parameter or scalar, like the following pseudocode:
That is to say, I want to the random scalar obeys the scenario index, but randomly pick one value from Dataset in each scenario, where Dataset is a given parameter.
Thank you for any information!
Gabriel
I am considering if I can define one random parameter, which can randomly pick one value from one dataset (assume stored in a parameter or table) each scenario. This can be also referred as sampling, and I know in stochastic programming GAMS can use EMS to do this. However, my goal here is just to randomly pick one value from a given dataset and store it in the parameter or scalar, like the following pseudocode:
Code: Select all
Scalar
a(scen) = Dataset(scen);
Variables
x(scen)
y(scen)
Equation
eq;
eq(scen).. 3 * x(scen) + 6 * y(scen) =l= a(scen);
Model...
Thank you for any information!
Gabriel