gamsWrite
Write an optiprob structure to a GAMS file.
Syntax
gamsWrite(prob,filename)
write(optiObj)
Description
Write an OPTI problem to a GAMS file.
gamsWrite(prob,filename) writes the problem described by the optiprob structure prob to the file filename. If you only supply a filename the file will be written to the current Matlab directory. Otherwise if you supply a full path + filename, it will be written to that location.
write(optiObj,filename) allows the above method to be called directly from a OPTI object. You must specify the filename as '.gms' in order to be written to a GAMS file.
Important Notes
There are two routines used for writing GAMS files. By default OPTI will use SCIP to write the GAMS file. This allows any problem that SCIP can parse to be written to a GAMS file, meaning the problem must be deterministic and contain only SCIP compatible functions. General nonlinear models cannot be written without SCIP.
If SCIP is not installed, OPTI will write any problem up to MIQCQP complexity using its own built in routine. OPTI will automatically write a GDX (GAMS Data Exchange) file containing the problem matrices and vectors, and a general GAMS model with the required model functions.
Remember currently GAMS enforces default bounds of 0->100 on integer variables. Both SCIP and OPTI do not attempt to override this. I have been advised in a later version of GAMS this should hopefully be removed.
Finally, OPTI options are not written to GAMS files, thus you will need to manually specify these if required.
Copyright © 2011-2013 Jonathan Currie (I2C2)