Unload

Top  Previous  Next

This dollar command unloads specified items to a GDX file.  It is employed using the syntax

 

$Unload item1 item2 ...

 

but must be used in conjunction with the command $Gdxout.

Example:

(gdxtrnsport.gms)

$gdxout tran

$unload i j

$unload d

$unload f

$unload b=dem a=sup

$gdxout

Notes:

Unload is followed by the names of items to load separated by a space.
Unload must be proceeded and succeeded by a $Gdxout.  The proceeding $Gdxout specifies the GDX file name and opens the file.  The succeeding $Gdxout closes the file.  More than one Unload can appear in between.
Unload outputs the data at compile time and will write the data present at the time that the statement is encountered during the compilation.  The results of calculations and solves will not be reflected.
Unload should not ordinarily be used, it is safer to use the execution time counterpart Execute_Unload as calculations and solves affect the results.
The only way to guarantee that the data is current is to use the execution time command or to use a save then restart a file with the dump commands within them.