GDXCOPY

GDX files from diffent GAMS verion can possibly be incompatible. A current GAMS system can read all older GDX file formats. A current GAMS system can read all older GDX file formats. The gdxcopy utility provides a mechanism to convert GDX files to a format to a format that dofferet GAMS systems can read.

# Usage

gdxcopy option infile outdir


or

 gdxcopy option -Replace infile


The first form copies the converted files to a directory; the second form replaces the original file(s).

Instead of converting the files explicitly using the gdxcopy utility, files can also be converted by using the environment variable GDXCONVERT with values V5, V6 or V7. The values specified will be used together with the value of the environment variable GDXCOMPRESS to call GDXCOPY as soon as a gdx file is created.

The values of the environment variables can also be set using the GAMS parameters gdxconvert and gdxcompress.

Option:

Option Target format
-V5 Version 5
-V6U Version 6 uncompressed
-V6C Version 6 compressed
-V7U Version 7 uncompressed
-V7C Version 7 compressed

infile:

single file or a file pattern with .gdx file extension

outdir:

output directory

A current GAMS system can always handle older gdx file formats. The GDXCOPY utility provides a mechanism to convert gdx files to a prior format, so an older GAMS system can read these files.

Notes:

• Version 7 formatted files were introduced with version 22.6 of GAMS; version 6 formatted files were introduced with version 22.3 of GAMS. Prior versions used version 5.
• Some features introduced in version 7 of the gdx file format cannot be represented in older formats.
Feature Action taken
Dimension > 10 Symbol is ignored
Identifier longer than 31 characters Truncated to 31 characters
Unique element longer than 31 characters Truncated to 31 characters
Domain of a symbol Domain is ignored
Aliased symbol Symbol is entered as a set
• The Macintosh Intel-based system (DII) which was introduced with GAMS 22.6 does not support gdx conversion into formats version 6 and version 5.
• Solaris 9 or higher on Sun Sparc64 (SOX) which was introduced in GAMS 22.6 does not support gdx conversion into formats version 6 and version 5.

# Example

In the example below we convert all gdx files to a compressed format for version 6.

dir
1,219 t1.gdx
1,740 t0.gdx
889,973  i.gdx
1,740 pv.gdx
894,672 bytes

gdxcopy -v6c *.gdx newdir
dir newdir
1,219 t1.gdx
1,219 t0.gdx
203,316  i.gdx
1,219 pv.gdx
206,973 bytes