I was trying to read a MPS file by using the PuLP package in the Python, but I can't find any related documents on it. Does anybody know, is there any way to read an LP/MPS file on the PuLP?

  • 2
    $\begingroup$ Check out the Q&A here as well. $\endgroup$
    – EhsanK
    Jun 26, 2019 at 19:30

1 Answer 1


According to PuLP's documentation, it seems that load_file function in PuLP's Amply class can only handle AMPL files with a subset of AMPL syntax for data.

So if you want to use those LP/MPS files in PuLP, you may have to first convert them into AMPL files. You can either write a small script by yourself or use some existing scripts.

Here are some discussions (post 1, post 2) in AMPL users group on how to do that or whether it is a good idea.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.