How to update Gams and keeping an older version
Gams is often updated and sometimes it can be good to have the old version still around (especially if you are not sure if the new version is working properly or if you are trying the beta version and want to switch back to the old version).
What I usually do is the following:
- I rename the directory of my installed version to GamsOld
- Install the new version (directory “Gams”)
- That is almost all.
The advantages ares:
- first of all, I still have the older version around (I usually keep one older version and delete the others).
- As I work a lot using the command line I do not have to adjust my path environmental variable every time I update my gams installation. The path where my computer remains “c:\program files\gams.”
- if I want to run my model with an older version of Gams I only have to rename the directory where my new version resides into something like c:\program files\gamsnew and rename the directory of the older version back to c:\program files\gams. No other adjustments are necessary. The path is still correct and the link to the Gamside is also still working. After working with the older version I just rename the directories back to their previous names.
There is only one smaller problem: include files and other files I installed will not be available in the newer version. For this I use a batch file that copies those files from the old version to the new version. The batch files contains commands like
Copy c:\program files\gamsold\inclib\plot.gms c:\program files\gams\inclib\plot.gms