In order not to reinvent the wheel I tried to find some code to parse
Mathematical Programming System files but I didnt find any implementations in python.
Is there any code allready available for this?
Reading Mathematical Prog. files
- objective function, one row, n columns
- table with restrictions, m rows, n columns
- right table, one column, m rows
Many languages have packages for reading and writing these files.
The question does not address the specifics, e.g. pure python vs. c-wrapper-based, nor any license-issues.
But well… two things which worked for me in the past (the former was more tested for my own IPM-method on the netlib dataset; the latter looked good too):
Dirty code to use netlib’s test cases with scipy’s solvers based on the former approach.
Looks pretty much python-only to me.
One should be careful about potentially modifications already done to the problem by cvxopt, at least when asking cvxopt for the matrix-form. I don’t remember right now what to expect here (and it also did not matter much in my cases).
Warning: cvxopt is known for a non-trivial installation-process on windows, if you try to install the whole project!
There are also some warnings about what features of MPS-files are not supported.
GLPK + swiglpk
This one should be more controllable in terms of what we read (see manual)!