User Tools

Site Tools


interfaces:dynamic_naming_for_gdx_files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

interfaces:dynamic_naming_for_gdx_files [2007/09/28 16:54] (current)
Line 1: Line 1:
 +====== Dynamic Names for gdx files ======
  
 +Under certain circumstances one may one to use a dynamically generated filename also for gdx files. The ''​put_utilities''​ can be used to achieve this: 
 +<​code>​
 +file foo;
 +scalar i;
 +for (i=1 to 10,
 + ​put_utilities foo '​gdxout'​ / '​out'​ i:0:0;
 + ​execute_unload i;
 +);
 +for (i=1 to 10,
 + ​put_utilities foo '​gdxin'​ / '​out'​ i:0:0;
 + ​execute_load i;
 + ​display i;
 +); 
 +</​code>​
 +
 +The log file reads: ​
 +<​code>​
 +--- Job Untitled_1.gms Start 03/05/07 21:53:32
 +GAMS Rev 147  Copyright (C) 1987-2007 GAMS Development. All rights reserved
 +...
 +--- Starting compilation
 +--- Untitled_1.gms(11) 2 Mb
 +--- Starting execution
 +--- Untitled_1.gms(7) 3 Mb
 +--- GDXin=D:​\work\gamsdir\projdir\out1.gdx
 +--- GDXin=D:​\work\gamsdir\projdir\out2.gdx
 +--- GDXin=D:​\work\gamsdir\projdir\out3.gdx
 +--- GDXin=D:​\work\gamsdir\projdir\out4.gdx
 +--- GDXin=D:​\work\gamsdir\projdir\out5.gdx
 +--- GDXin=D:​\work\gamsdir\projdir\out6.gdx
 +--- GDXin=D:​\work\gamsdir\projdir\out7.gdx
 +--- GDXin=D:​\work\gamsdir\projdir\out8.gdx
 +--- GDXin=D:​\work\gamsdir\projdir\out9.gdx
 +--- GDXin=D:​\work\gamsdir\projdir\out10.gdx
 +--- Putfile foo D:​\work\gamsdir\projdir\foo.put
 +*** Status: Normal completion
 +--- Job Untitled_1.gms Stop 03/05/07 21:53:32 elapsed 0:00:00.203
 +</​code>​
 + 
 +See also the entry: [[gams:​dynamic_renaming_of_put-files|Dynamic renaming of put-files]].
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY interfaces/dynamic_naming_for_gdx_files.txt ยท Last modified: 2007/09/28 16:54 (external edit)