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?
Asked
Active
Viewed 1,343 times
8
Qian Zhang
- 512
- 3
- 6
A.Omidi
- 8,832
- 2
- 13
- 49
-
2Check out the Q&A here as well. – EhsanK Jun 26 '19 at 19:30
1 Answers
7
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.
Qian Zhang
- 512
- 3
- 6