1

How can I export a .MPS file from my OPL project so that I can execute it on neos-server.org? My project includes a .mod file and a .dat file. My .mod file contains the following code:

main {
    thisOplModel.generate();
    cplex.exportModel("fl4.MPS");
}
rkersh
  • 4,447
  • 2
  • 22
  • 31
Mina H
  • 11
  • 2
  • What happens when you execute the code you've shown? Do you get an error? Does the "f14.MPS" file exist after you run it? – rkersh Aug 03 '18 at 22:17
  • It should be possible to export the model using opl script as above, but see [Export a model using CPLEX to an LP file](https://www.ibm.com/support/knowledgecenter/en/SSSA5P_12.8.0/ilog.odms.ide.help/OPL_Studio/refoplide/topics/opl_ideref_intell_ed_lped_export_to_lpfile.html) for an alternative. – rkersh Aug 03 '18 at 22:23

1 Answers1

2

If you have a .mod and a number of .dat files then you can easily convert them to MPS or whatever other format using the oplrun command line tool shipped with cplex:

oplrun -e mymod.mps mymod.mod mymod.dat

Before starting the actual solve this will export the generated model to mymod.mps. So as soon as the solve is starting, you can just stop it. Note that you should remove the main() section you posted above.