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]
127.0.0.1 external edit
interfaces:dynamic_naming_for_gdx_files [2020/05/25 15:19] (current)
Frederik Fiand
Line 1: Line 1:
-====== Dynamic Names for gdx files ======+====== 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: +Under certain circumstances one may want to use a dynamically generated filename for gdx files. The [[https://​www.gams.com/​latest/​docs/​UG_Put.html#​UG_Put_PutUtil|put_utility]] ​can be used to achieve this: 
 <​code>​ <​code>​
-file foo; 
 scalar i; scalar i;
 for (i=1 to 10, for (i=1 to 10,
- put_utilities foo '​gdxout'​ / '​out'​ i:0:0;+ put_utility ​'​gdxout'​ / '​out'​ i:0:0;
  ​execute_unload i;  ​execute_unload i;
 ); );
 for (i=1 to 10, for (i=1 to 10,
- put_utilities foo '​gdxin'​ / '​out'​ i:0:0;+ put_utility ​'​gdxin'​ / '​out'​ i:0:0;
  ​execute_load i;  ​execute_load i;
  ​display i;  ​display i;
Line 18: Line 17:
 The log file reads: ​ The log file reads: ​
 <​code>​ <​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 --- Starting compilation
---- Untitled_1.gms(11) 2 Mb +--- new1.gms(10) 2 Mb 
---- Starting execution +--- Starting execution: elapsed 0:00:00.015 
---- Untitled_1.gms(7) 3 Mb +--- new1.gms(2) 3 Mb 
---- GDXin=D:\work\gamsdir\projdir\out1.gdx +--- GDX File [...]\out1.gdx 
---- GDXin=D:\work\gamsdir\projdir\out2.gdx +--- GDX File [...]\out2.gdx 
---- GDXin=D:\work\gamsdir\projdir\out3.gdx +--- GDX File [...]\out3.gdx 
---- GDXin=D:​\work\gamsdir\projdir\out4.gdx +--- GDX File [...]\out4.gdx 
---- GDXin=D:​\work\gamsdir\projdir\out5.gdx +--- GDX File [...]\out5.gdx 
---- GDXin=D:​\work\gamsdir\projdir\out6.gdx +--- GDX File [...]\out6.gdx 
---- GDXin=D:​\work\gamsdir\projdir\out7.gdx +--- GDX File [...]\out7.gdx 
---- GDXin=D:​\work\gamsdir\projdir\out8.gdx +--- GDX File [...]\out8.gdx 
---- GDXin=D:​\work\gamsdir\projdir\out9.gdx +--- GDX File [...]\out9.gdx 
---- GDXin=D:​\work\gamsdir\projdir\out10.gdx +--- GDX File [...]\out10.gdx 
---- Putfile foo D:​\work\gamsdir\projdir\foo.put+--- new1.gms(6) 3 Mb 
 +--- GDXin=[...]\out1.gdx 
 +--- GDXin=[...]\out2.gdx 
 +--- GDXin=[...]\out3.gdx 
 +--- GDXin=[...]\out4.gdx 
 +--- GDXin=[...]\out5.gdx 
 +--- GDXin=[...]\out6.gdx 
 +--- GDXin=[...]\out7.gdx 
 +--- GDXin=[...]\out8.gdx 
 +--- GDXin=[...]\out9.gdx 
 +--- GDXin=[...]\out10.gdx
 *** Status: Normal completion *** Status: Normal completion
---- Job Untitled_1.gms Stop 03/05/07 21:53:32 elapsed 0:00:00.203+--- Job new1.gms Stop 05/25/20 15:16:40 elapsed 0:00:00.031
 </​code>​ </​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: 2020/05/25 15:19 by Frederik Fiand