GDX Point Solution file

Top  Previous  Next

A GDX file containing the marginals and levels for all variables and equations at the end of a solve will be created with the command line parameter, model attribute or option Savepoint before the solve is invoked.  One can save the solution information from the last solve or from every solve.  The points that are saved can be used to provide an advanced basis, integer program starting point or NLP starting point.

 

The basic command line form is

 

gams mymodelname Savepoint=number

 

the model attribute form is

 

modelname.savepoint=number;

 

and the option file form is

 

option savepoint=number

 

where

when number equals 1 a point gdx file is saved from the last solve in the GAMS model and the file name will be modelname_p.gdx where model name is the name of the model identified in the solve statement.
when number equals 2 (gdxsavepoint2.gms) a point gdx file is saved from the every solve in the GAMS model and the file name will be modelname_pnn.gdx where model name is the name of the model identified in the solve statement and nn is the internal number of the solve.  Thus if 10 solves occur one will get 10 files named modelname_p1.gdx through modelname_p10.gdx.

Example:

An example of invocation of the GDX point file is given in makepointbas.gms, the relevant part of which is

 

MODEL FIRM /ALL/;

OPTION Savepoint=1;;

solve firm using LP maximizing objfun;

 

and the file gdxsavepoint2.gms illustrates the case where savepoint is set to 2.

Notes:

the GDX point file contains numerical records for all variables and equations giving just their levels and marginals.  In a non point GDX file information on bounds and scales are also present, if defined.
This GDX point file can be reloaded into GAMS using either the  Execute_loadpoint or Execute_load or $load syntaxes.
This yields a file that may be automatically opened in the IDE by doing a mouse click on the highlighted line in the IDE process window.