Execute_Loadpoint

Top  Previous  Next

When Execute_Load is invoked GAMS goes through the target GDX file looking for variables and equations.  The items found are merged into the internal data on those variables and equations replacing the levels and marginals.  But

when variable/equations are present in the GDX file that are not in the current GAMS program that information is ignored.
when cases are found with set elements that do not match the definitions inside the current GAMS information those data are ignored.
Bounds, and scales are unaffected.
Variables in the equations that are GAMS program but not in the GDX file are unaffected by the GDX command.

The basic syntax of the statement is

 

Execute_Loadpoint 'filename', nameditem1,nameditem2, ... ;

 

The filename argument specifies the name of the GDX file to read.  In particular, a file with this filename with the extension .GDX will be read from the current working directory.  Any GDX file can be read not only a point file (as saved by the savepoint option).

The second part of the statement is an optional  list of items to be read from the GDX file.

When a list of items to be read is not present as in the statement (loadpointbas.gms) just below than all variables and equations in the GDX file firm_p  will be loaded.

 

 execute_loadpoint 'firm_p';

 

One can also specify the loading of parameters and variables in this context using syntax just like in the Execute_Load syntax above.  For example the following command would load the levels for x , the x information into the variable y and the x marginals into the parameter m.

 

 execute_loadpoint 'transport_p2' x.l, y=x, m=x.m;

Notes:

Items must be declared before the Execute_Loadpoint appears.
When loading data domain checking is not enforced so that when an item is resident in a GDX file for set elements not present in the current file these items are ignored and do not create errors or cause generation of any messages.
The Execute_loadpoint will work on either point or non point GDX files.
Loadpoint merges data into arrays that are defined

 

The name of the active file being loaded from can be changed with the Put_utility 'gdxin' syntax