User Tools

Site Tools


interfaces:selective_executive_unload

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
interfaces:selective_executive_unload [2020/10/30 21:17]
Atharv Bhosekar removed
— (current)
Line 1: Line 1:
-====== Selective executive_unload ====== 
-Q: //I would like to make a gdx dump of all the sets/​parameters/​scalars of  my model, but I do not want any equations or variables in there at all. ... Currently my gdx dump at the end of the model solve contains the  equations and variables as well.   // 
  
-If you just do '​execute_unload "​allsymbols.gdx";'​ as your last line, GAMS will export everything (including vars and equs) to the GDX container ''​allsymbols.gdx''​ (similar to the command line parameter '​gdx=...'​). ​ 
-  * You can empty your variable/​equation symbols, by adding '​option clear=var1, clear=var2, ..., clear=equ1,​clear=equ2,​...;'​ as the last line(s) in your program. This list is smaller and maintainable. ​ 
-  * You can also write your own GDX utility. There are API files in the 22.7 distribution and example programs. Such a utility could go through an existing GDX container and only copy sets and parameter symbols to the a new GDX  container. 
-  * Erwin Kalvelagen ​ ([[http://​www.amsterdamoptimization.com/​|Amsterdam Optimization]]) suggests an approach using an [[http://​en.wikipedia.org/​wiki/​AWK|awk]]-script,​ which is explained at his [[http://​yetanothermathprogrammingconsultant.blogspot.com/​2008/​07/​gdx-question.html|blog]]. AWK is part of the [[https://​www.gams.com/​latest/​docs/​T_POSIX.html|Posix Utilities]],​ which are included in any recent GAMS distribution.