Hi!
Im having trouble merging two gdx files (or parameters).
Let’s say (as a toy problem) I have a set “t” and the parameter t_par(t), which im uploading from two diferent excel sheets
test.xlsx (9.28 KB)
set and params gdx files
t.gdx (483 Bytes)
t_par_b.gdx (501 Bytes)
t_par_a.gdx (500 Bytes)
The first call is to “t_par_a”, the second call is to get “t_par_b”, then I want to merge them both into a single file called “t_par.gdx”
SETS
t /t1*t10/
;
PARAMETERS
t_par_a(t)
t_par_b(t)
;
$CALL GDXXRW.EXE i=test.xlsx o=rep\t_par_a par=t_par_a rng=par1!a2 Rdim=1
$CALL GDXXRW.EXE i=test.xlsx o=rep\t_par_b par=t_par_b rng=par2!a2 Rdim=1
execute_unload 'rep\t.gdx' t
$GDXIN rep\t_par_a.gdx
$LOAD t_par_a
$GDXIN
;
$GDXIN rep\t_par_b.gdx
$LOAD t_par_b
$GDXIN
;
gdxmerge t_par_a t_par_b (o=t_par.gdx); <--- this is giving error
FIXED: CORRECT WAY “$call gdxmerge rep\t_par_a.gdx rep\t_par_b.gdx output=t_par”. Thanks abhosekar
Im looking https://www.gams.com/latest/docs/T_GDXMERGE.html, but I may be doing something wrong or It could be a better