gdxrename program converts one or more gdx files to a different format.
gdxcopy option infile outdir
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.
|-V6U||Version 6 uncompressed|
|-V6C||Version 6 compressed|
|-V7U||Version 7 uncompressed|
|-V7C||Version 7 compressed|
single file or a file pattern with .gdx file extension
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.
- 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 Additional text for symbol Additional text is ignored
- 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.
- The Solaris 10 or higher Intel-based system (SIG) which was introduced with GAMS 22.5 does not support gdx conversion into formats 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.
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