Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PuLP does not correctly read a class of MPS files in MILIB2017 #790

Open
jacurick19 opened this issue Jan 15, 2025 · 2 comments
Open

PuLP does not correctly read a class of MPS files in MILIB2017 #790

jacurick19 opened this issue Jan 15, 2025 · 2 comments

Comments

@jacurick19
Copy link

jacurick19 commented Jan 15, 2025

Details for the issue

What did you do?

I used PuLP to read the MPS files for MIPLIB2017 problems such as beasleyC3. I then used PuLP to call solvers to optimize the model. I also used PuLP to write the MPS file back to disk without optimizing it and used multiple MIP solvers to solve the MPS file that was written back to disk.

What did you expect to see?

I expected to see the objective value of 754, which is known to be optimal. If I use a solver on the MPS file downloaded directly from MIPLIB2017, this value is achieved.

What did you see instead?

If PuLP is used to dispatch a solver after reading the MPS file, the solution reported is less than 50. If a MIP solver is used on its own to solve the MPS file that PuLP wrote to disk after reading in the beasleyC3 problem's MPS file, the MIP solver reports a solution that is less than 50.

This implies that PuLP is not reading the file correctly. I found that this is the case for multiple MIPLIB2017 problems that have no integer variables but do have binary variables.

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

  • [ x] Windows: (11)

I installed PuLP via:

  • [ x] pypi (python -m pip install pulp)

Did you also

@pchtsp
Copy link
Collaborator

pchtsp commented Jan 15, 2025

hello, thanks for reporting.
Did you compare the original mps file to the one exported by pulp?
Is the solution given by pulp different or just the objective function value?

@jacurick19
Copy link
Author

Hello, thank you for quickly responding. I did compare these files, and while I did see some differences, I didn't see anything that obviously would be causing the issue.

The solution solvers produce when solving the PuLP-read MPS file seems to be the solution to the relaxation of the problem, but when solvers read the MPS directly they correctly solve the integer version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants