GAMS comes with a tool called mps2gms. With a large MPS file from a client I had some problems using this tool, and I spent some time to make it reproducible with a small example. The problem is related to a ranged equation:
NAME Error |
This model is like the following:
min x1
x1=−x2
10 ≤ x2 ≤ 12
The resulting GAMS model is complicated to look at with all data inside a GDX file. However when we run it against the CONVERT solver we can see the scalar GAMS version:
* RMIP written by GAMS Convert at 04/15/10 19:04:26 |
The constants 10 and 12 are not preserved and have disappeared from the model. I suspect that missing is x4.lo=10 and x4.up=12. (This is somewhat difficult to read as x1 and x4 are added to the model, and the mps columns x1 and x2 are renamed to GAMS variables x2 and x3). I have passed this on to GAMS for investigation so this can be fixed.
There was also another issue related to how the ranges section was read. In the end I used one of my own tools to quickly read in the mps file and write a GAMS file:
C:\projects\xxxxxx>\projects\lpsolve\lp2gams 2.mps lp_solve version 5.5.0.11 C:\projects\xxxxx> |
Update: the mps2gms issues are fixed for the next release.
Hi,
ReplyDeleteI want to create a LP/MPS file to read the file in CPLEX for my large scale supply chain model in GAMS. Is there anyone who can help me the detailed way as to how I can create a LP/MPS file in GAMS.
Thanks.
Maruf