There is a fairly deep issue when comparing GDX files if one of the GDX files has the following properties:
- It is produced by GDXDUMP
- It contains Equation records
The following illustrates the problem:
C:\projects\tmp>gams indus89 lo=0 gdx=1
C:\projects\tmp>gdxdump 1.gdx output=2.gms
C:\projects\tmp>gams 2.gms lo=0 gdx=2
C:\projects\tmp>gdxdiff 1.gdx 2.gdx eps=1.0e-6
C:\projects\tmp>gdxdump diffile.gdx Symbols
Apart from a small bug related to $ONEMPTY, it turns out that the way GDXDUMP exports equations records, it looses information about the equation type. This leads to the above results. Luckily in practice this will not be an issue, as equations are not often part of such an exercise.
During a course I taught about GAMS I was asked if it is possible to edit GDX files. The answer is: GDXDUMP will give you a GAMS representation of a GDX file which you can edit. Using the call:
GAMS gmsfile gdx=newgdxfile
you can make a new GDX file with the changes incorporated. The tool GDXDIFF will allow you to monitor the changes.
Although this is correct, I chose the INDUS89 example as illustration. That was unfortunate, as that failed because of the exotic Equation problem.