|
Challenges in running GAMS |
Top Previous Next |
|
One of the interesting problems one faces when developing code to run GAMS.EXE from within a compiled program in a Windows environment is multi-threading. If one does not take precautions, the program will proceed before GAMS is finished. Thus the code must wait until GAMS is finished. The module here as well as the macros in Excel and all the interfaces in Kalvelagen's http://www.gams.com/~erwin/interface/interface.html illustrate how this can be done. Another issue that needs to be addressed is GAMS need to store temporary files. By default this will be done in the current directory, a concept that is not always clear in a windowing environment. Herein the code uses the startup information that was present when gamsrun.exe was executed. |