GDX load in order to specify set elements

Dear all:

I am trying to work on the following configuration:

  • Main file uses $include to define two parameters using 2 and 3 dimensions (defined as dx(,) and dy(,,*) in file)
  • It then unloads these parameters to a gdx file:

$GDXOUT toaux.gdx
$UNLOAD DX DY
$GDXOUT
$call ‘gams aux.gms’

  • Within the aux.gms file, I want to use these parameters to define the elements of sets that will be sent back to main file:

Sets
set1()
set2(
)
set3(*);

parameters dx(,), dy(,,*);

$GDXIN toaux.gdx
$LOAD set1<dx.dim1 set2<dx.dim2 set3<dy.dim3 dx dy
$GDXIN

And I get errors:
492 “symbol not in GDX” for set1, set2 and set3 (which I do not why should be in GDX since if I understand correctly are the symbosl which I’m trying to load into)
496 “load/unload ident expected” for dx.dim1, dx.dim2 and dy.dim3
490 “cannot load/unload this suffix” for dx.dim1, dx.dim2 and dy.dim3

I’m sure I’m misunderstanding either the syntax or capabilities of GDX compile time loading, but I got these ideas from “Compile Phase Example 4”, in pp. 3-5 of www.gams.com/dd/docs/tools/gdxutils.pdf

What am I doing wrong ?

Best Regards and Thanks in advance!
Claudio


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.
For more options, visit https://groups.google.com/d/optout.

hi Claudio
The :

Dear all:

I am trying to work on the following configuration:

  • Main file uses $include to define two parameters using 2 and 3 dimensions (defined as dx(,) and dy(,,*) in file)
  • It then unloads these parameters to a gdx file:

$GDXOUT toaux.gdx
$UNLOAD DX DY
$GDXOUT
$call ‘gams aux.gms’

  • Within the aux.gms file, I want to use these parameters to define the elements of sets that will be sent back to main file:

Sets
set1()
set2(
)
set3(*);

parameters dx(,), dy(,,*);

$GDXIN toaux.gdx
$LOAD set1 $GDXIN

And I get errors:
492 “symbol not in GDX” for set1, set2 and set3 (which I do not why should be in GDX since if I understand correctly are the symbosl which I’m trying to load into)
496 “load/unload ident expected” for dx.dim1, dx.dim2 and dy.dim3
490 “cannot load/unload this suffix” for dx.dim1, dx.dim2 and dy.dim3

I’m sure I’m misunderstanding either the syntax or capabilities of GDX compile time loading, but I got these ideas from “Compile Phase Example 4”, in pp. 3-5 of www.gams.com/dd/docs/tools/gdxutils.pdf

What am I doing wrong ?

Best Regards and Thanks in advance!
Claudio


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.
For more options, visit https://groups.google.com/d/optout.


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.
For more options, visit https://groups.google.com/d/optout.

Renger: Thanks ! That was exactly the problem.

Regards
Claudio

El 11/06/2014 17:23, “Renger van Nieuwkoop” escribió:

hi Claudio
The :

Dear all:

I am trying to work on the following configuration:

- Main file uses $include to define two parameters using 2 and 3 dimensions (defined as dx(*,*) and dy(*,*,*) in file)
- It then unloads these parameters to a gdx file:

$GDXOUT toaux.gdx
$UNLOAD DX DY
$GDXOUT
$call 'gams aux.gms'

- Within the aux.gms file, I want to use these parameters to define the elements of sets that will be sent back to main file:

Sets
set1(*)
set2(*)
set3(*);

parameters dx(*,*), dy(*,*,*);

$GDXIN toaux.gdx
$LOAD set1     $GDXIN

And I get errors:
492 "symbol not in GDX" for set1, set2 and set3 (which I do not why should be in GDX since if I understand correctly are the symbosl which I'm trying to load into)
496 "load/unload ident expected" for dx.dim1, dx.dim2 and dy.dim3
490 "cannot load/unload this suffix" for dx.dim1, dx.dim2 and dy.dim3

I'm sure I'm misunderstanding either the syntax or capabilities of GDX compile time loading, but I got these ideas from "Compile Phase Example 4", in pp. 3-5 of [www.gams.com/dd/docs/tools/gdxutils.pdf](http://www.gams.com/dd/docs/tools/gdxutils.pdf)

What am I doing wrong ?

Best Regards and Thanks in advance!
Claudio

--
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.
For more options, visit https://groups.google.com/d/optout.


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.
For more options, visit https://groups.google.com/d/optout.


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.
For more options, visit https://groups.google.com/d/optout.