File|Export File



The File|Export File… command allows you to export either MPS or MPI files. The MPS file format is an industry standard format developed by IBM, and is useful for passing models from one solver or platform to another.  MPI file format was developed by LINDO Systems as a way to store all math programs, from linear models to, in particular, nonlinear models.

 

Exporting MPS Files

The File|Export File|MPS format command generates the underlying algebraic formulation for the current model and then writes it to a selected file in MPS format. MPS format is a common format for representing linear programming models. MPS files can be ported to any solver that reads MPS files—this includes most commercial linear programming packages.

As an example of exporting an MPS file, consider the model:

page107xp

After issuing the File|Export File|MPS format command and opening the file containing the MPS model, we will find:

NAME           NO_TITLE

*****************************************************

* NOTICE: Generated by the MPS export utility for

* a maximization type problem.

*

* The objective coefficients have flipped signs.

* Interpret the objective value from the solution of

* this model accordingly.

*****************************************************

ROWS

N  1

L  2

L  3

L  4

COLUMNS

   X  1               -20

   X  2                 1

   X  4                 1

   Y  1               -30

   Y  3                 1

   Y  4                 2

RHS

   RHS1      2                50

   RHS1      3                60

   RHS1      4               120

BOUNDS

ENDATA

Note:A model must be linear or quadratic to successfully export it in MPS format.
Note:The MPS file format is intended primarily for exporting models to other applications or platforms. The MPS format is purely scalar in nature—all set-based information is lost upon converting a LINGO model to MPS format. Thus, when saving copies of a model on your own machine, you should always use the File|Save command in order to preserve your model in its entirety.
Note:When exporting a stochastic program to MPS format, LINGO will write a total of three SMPS format files, consisting of the core model, its stochastic declarations and its time structure.

Exporting MPI Files

The MPI (Math Programming Interface) file format was developed by LINDO Systems as a way to store all math programs, from linear models to, in particular, nonlinear models.  As with MPS files, the MPI format is scalar based.  Thus, you will lose any sets in your model when saving it in this format. Most users will not have a need for MPI formatted files.  However, LINDO API users can load these files directly and may find this feature useful.

Note:When exporting a stochastic program to MPI format, LINGO will write a total of four SMPI format files, consisting of a header file, the core model, its stochastic declarations and its time structure.