Changing location for lst files Topic is solved

Problems with syntax of GAMS
Post Reply
edwardmw
User
User
Posts: 5
Joined: 1 year ago

Changing location for lst files

Post by edwardmw »

Hello,

I want to be able to choose where the lst file is stored that is generated from executing a .gms file. Through searching for help online, I have found the page

https://www.gams.com/mccarlGuide/procdir.htm

but I am having trouble with the syntax.

I realize I also may not even be looking at the right command.

Details on my situation:
have my project files organized in a main folder that contains:

--a folder with one .gms file for each simulation that I run
--a "prep.gms" file that is called at the beginning of a simulation run
--a folder with several .gms files that are each called during a simulation run

I run a simulation using linux terminal by changing directory to the main folder and then calling a simulation .gms file, which then calls other .gms files in the main folder (or subfolder).

I can direct output from the simulation run to a designated folder, but I cannot figure out how to do the same for the lst file generated from a simulation run.

I hope this was clear enough. Thank you for your help!
Fred
Posts: 373
Joined: 7 years ago

Re: Changing location for lst files

Post by Fred »

Hi,

You can use the command line parameter output to do that.

I hope this helps!

Fred
User avatar
dirkse
Moderator
Moderator
Posts: 215
Joined: 7 years ago
Location: Fairfax, VA

Re: Changing location for lst files

Post by dirkse »

Hello,

Perhaps you want to also try the workdir parameter: it might be helpful if you want to redirect many things at once.

https://www.gams.com/44/docs/UG_GamsCal ... SAOworkdir

For example do:
mkdir foo
( cd foo ; gamslib trnsport )
gams trnsport workdir=foo lo=4
ls foo

HTH,

-Steve
edwardmw
User
User
Posts: 5
Joined: 1 year ago

Re: Changing location for lst files

Post by edwardmw »

Thank you Fred and dirkse, your replies were very helpful!
Post Reply