Hello all,
Is it possible to change working directory that GAMS puts all those .gdx, .txt, .lst files by default ?
Thanks
Change Working Directory of GAMS
Re: Change Working Directory of GAMS
Hi Barsssk
You could use a setlocal or setglobal parameter at the beginning of your file.
For example, if you want to have all your files in the directory results, which is below your model directory, I add:
Gams now replaces every occurence of %results% by .\results\
I use this technique for all my subdirectories (data, temp, results), so I keep all stuff nicely separated. In the subdirectory "temp" I save everything that is created during the run and can be recreated easily. The results subdirectory is for excel files that will be filled everytime with new results (if available).
Cheers
Renger
You could use a setlocal or setglobal parameter at the beginning of your file.
For example, if you want to have all your files in the directory results, which is below your model directory, I add:
Code: Select all
$setglobal results .\results\
* Send to results directory
execute_unload "%results%myresults.gdx";
I use this technique for all my subdirectories (data, temp, results), so I keep all stuff nicely separated. In the subdirectory "temp" I save everything that is created during the run and can be recreated easily. The results subdirectory is for excel files that will be filled everytime with new results (if available).
Cheers
Renger