Hi,
I am currently trying to build an equilibrium model that consists of several players, which try to minimize their costs respectively. Unfortunately when running the model, I get the following error message: " EMP syntax error: key expected: is the key min (item 1 on line 4)". The first lines of the empinfo file look like this:
equilibrium
dualequ cons P_bm
min obj(‘1’) R(‘1’,‘336’) X(‘1’,‘336’) F(‘1’,‘336’) G(‘1’,‘336’) I(‘1’,‘336’) S_c(‘1’,‘336’) S_d(‘1’,‘336’) S(‘1’,‘336’) RH(‘1’,‘336’) S_h(‘1’,‘336’) S_hd(‘1’,‘336’) S_hc(‘1’,‘336’) W_i(‘1’,‘336’) W_g(‘1’,‘336’) W_res(‘1’,‘336’) W_sd(‘1’,‘336’)…
So apparently "min obj(‘1’) " is problematic? My guess is there is something wrong with how I implemented the emp-info, but since this is my first time working with GAMS EMP I don’t know what went wrong. Any advice would be appreciated!
file empinfo / '%emp.info%' /;
put empinfo 'equilibrium' /;
put 'dualequ cons P_bm' /;
loop(n, put / 'min', obj(n);
loop(t, put R(n,t) X(n,t) F(n,t) G(n,t) I(n,t) S_c(n,t)
S_d(n,t) S(n,t) RH(n,t) S_h(n,t) S_hd(n,t) S_hc(n,t) W_i(n,t)
W_g(n,t) W_res(n,t) W_sd(n,t) H_chp(n,t) A(n,t) FC(n,t)
f20(n,t) f21(n,t) f22(n,t) f23(n,t) f24(n,t)
f44(n,t) f50(n,t) f51(n,t));
put objdef(n);
);
putclose empinfo;
$onEcho > jams.opt
FileName equ_opt_reform.gms
Dict dict.txt
$offEcho
*SharedEqu
equ_opt.optfile = 1;
solve equ_opt using emp;
display R.l;
equ_opt.zip (1.33 MB)