need help in stochastic programming

Hi, everyone

I tried to implement a stochastic programming problem in GAMS according to the example file in GAMS EMP library, I did almost the same as the example, but when I ran my file, it gave me all 0 result. And when I traced back to the log, it said:

=C*** Error processing empinfo file
=C*** Problem in getObjects
=C*** Failure calling solver: LINDO (rc=1)

Could anyone tell me what will cause"Problem in get Objects"? Thanks a lot!
Below is my EMP file (x,Y and z are variables, expo4 are normal distributed parameter, C is the obj. value, and Mass1-4, Level,z_constraint, obj are my equations):

file emp / ‘%emp.info%’ /;
put emp ‘* problem %gams.i%’ /;
put emp ‘stage 2 expo4 x Y z C Mass1 Mass2 Mass3 Mass4 Level z_constraint obj’;
$onput
randvar expo4 normal 1.5 1.5
0.01;
stage 2 expo4 x Y z C Mass1 Mass2 Mass3 Mass4 Level z_constraint obj
$offput
putclose emp;

set s scenarios /s1s100/;
parameter s_expo4(s) coeff. by scenario
srep(s,
) scenario attributes / #s.prob 0 /
s_x(s,i), s_Y(s,j), s_z(s,j,k), s_C(s) other key variables by scenario;


Set dict / s .scenario.‘’
‘’ .opt. srep
expo4 .randvar. s_expo4
x .level. s_x
Y .level. s_Y
z .level. s_z
C .level. s_C /;
option emp = lindo;
$echo STOC_NSAMPLE_STAGE=100 > lindo.opt
Metabolic_stochastic.optfile = 1;
solve Metabolic_stochastic max C use emp scenario dict;
display s_expo4,s_x,s_Y,s_z,s_C;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

Hi,

The EMP reader is very plain and does not understand expressions. So you need to replace 1.5*0.01 by 0.015 and also drop the ‘;’.

Hope this solves you problem.

Michael Bussieck - GAMSWorld Coordinator

On Saturday, May 4, 2013 12:49:43 AM UTC-4, lc…@cornell.edu wrote:

Hi, everyone

I tried to implement a stochastic programming problem in GAMS according to the example file in GAMS EMP library, I did almost the same as the example, but when I ran my file, it gave me all 0 result. And when I traced back to the log, it said:

=C*** Error processing empinfo file
=C*** Problem in getObjects
=C*** Failure calling solver: LINDO (rc=1)

Could anyone tell me what will cause"Problem in get Objects"? Thanks a lot!
Below is my EMP file (x,Y and z are variables, expo4 are normal distributed parameter, C is the obj. value, and Mass1-4, Level,z_constraint, obj are my equations):

file emp / ‘%emp.info%’ /;
put emp ‘* problem %gams.i%’ /;
put emp ‘stage 2 expo4 x Y z C Mass1 Mass2 Mass3 Mass4 Level z_constraint obj’;
$onput
randvar expo4 normal 1.5 1.5
0.01;
stage 2 expo4 x Y z C Mass1 Mass2 Mass3 Mass4 Level z_constraint obj
$offput
putclose emp;

set s scenarios /s1s100/;
parameter s_expo4(s) coeff. by scenario
srep(s,
) scenario attributes / #s.prob 0 /
s_x(s,i), s_Y(s,j), s_z(s,j,k), s_C(s) other key variables by scenario;


Set dict / s .scenario.‘’
‘’ .opt. srep
expo4 .randvar. s_expo4
x .level. s_x
Y .level. s_Y
z .level. s_z
C .level. s_C /;
option emp = lindo;
$echo STOC_NSAMPLE_STAGE=100 > lindo.opt
Metabolic_stochastic.optfile = 1;
solve Metabolic_stochastic max C use emp scenario dict;
display s_expo4,s_x,s_Y,s_z,s_C;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\