-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
Comments
hello, thanks for reporting. |
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. |
Taking a quick look, this MPS file uses the But, to a casual review, it seems that pulp does not interpret this as marking integer variables: Line 176 in ebbbfde
Hence, the problem is loaded with all vars continuous with LB, UB 0 and 1 respectively. |
Hello,
Thank you for investigating. Would you mind if I put together a PR to
resolve this over the weekend?
…On Fri, Mar 7, 2025 at 4:02 PM Simon ***@***.***> wrote:
Taking a quick look, this MPS file uses the BV marker in the bounds
section to mark *binary* variables. These vars are not otherwised marked
as integer (i.e. no INTORG / INTEND markers).
But, to a casual review, it seems that pulp does not interpret this as
marking integer variables:
https://github.com/coin-or/pulp/blob/ebbbfdedce62a3c1815d98bbb4caada513782941/pulp/mps_lp.py#L176
Hence, the problem is loaded with all vars continuous with LB, UB 0 and 1
respectively.
—
Reply to this email directly, view it on GitHub
<#790 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIKDFWEK4F6AUAE4NAZSNSL2TICNBAVCNFSM6AAAAABVGHW7JCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBXGQ2TAMZXGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: simon-b]*simon-b* left a comment (coin-or/pulp#790)
<#790 (comment)>
Taking a quick look, this MPS file uses the BV marker in the bounds
section to mark *binary* variables. These vars are not otherwised marked
as integer (i.e. no INTORG / INTEND markers).
But, to a casual review, it seems that pulp does not interpret this as
marking integer variables:
https://github.com/coin-or/pulp/blob/ebbbfdedce62a3c1815d98bbb4caada513782941/pulp/mps_lp.py#L176
Hence, the problem is loaded with all vars continuous with LB, UB 0 and 1
respectively.
—
Reply to this email directly, view it on GitHub
<#790 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIKDFWEK4F6AUAE4NAZSNSL2TICNBAVCNFSM6AAAAABVGHW7JCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBXGQ2TAMZXGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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?
I installed PuLP via:
Did you also
The text was updated successfully, but these errors were encountered: