Home Install Documentation Problems Tree Applications Forum

Save your money
via IT outsourcing!

Ukrainian HI-TECH Initiative


From OpenOpt

Jump to: navigation, search
Export to MPS format files

MPS is a well-known file format (Mathematical Programming System). See its wikipedia.org entry for more details.

You can export OpenOpt and FuncDesigner LP/MILP problems into MPS (lpsolve and its Python binding should be properly installed, you may take a look at the instructions mentioned in LP or MILP).


    success = p.exportToMPS(filename{, optionalParameters})

where p is OpenOpt or FuncDesigner-coded LP/MILP instance to be exported.


  • filename should be a string like 'milp_1' (write into current directory), '/home/dmitrey/milp_1' (use absolute path), '../other_folder/milp2' (relative path) etc. If file name not ends with '.MPS' or '.mps', then '.mps' extension will be appended. Using Python language path separator (\\) is not implemented/checked, so for different OS you'd better use their own path separators or mere write into current directory.
  • format =
'fixed' (default, use fixed MPS format)
'free' (use free MPS format)
Note: free format is less standardized, but fixed format requires variable names to be no longer than 8.
  • startIndex = 0 (default) or 1; if you have FuncDesigner model that has a variable of size>1 (named Name), it will be split into variables Name_0, Name_1, ... for startIndex = 0 and Name_1, Name_2, ... for startIndex = 1.


  • success is
    • False if a error occurred (read-only file system, no write access, etc)
    • True, otherwise


  • OpenOpt LP , MILP
  • FuncDesinger LP, MILP have absolutely same syntax for MPS export.

AttentionYou can solve problems defined in MPS files with a variety of solvers at NEOS server for free; BTW they have Python API along with web, Java API and some others.

Retrieved from "http://openopt.org/MPS"
Personal tools
    Latest OOSuite 0.38

    from 2012-03-15

    Next release: