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

WriteMPS vs WriteLP #7

Closed
aabbas90 opened this issue Mar 8, 2023 · 2 comments
Closed

WriteMPS vs WriteLP #7

aabbas90 opened this issue Mar 8, 2023 · 2 comments

Comments

@aabbas90
Copy link

aabbas90 commented Mar 8, 2023

Hi, Thanks for the extensive study!

I just observed that there is some issue in exporting to .mps format at the following location. Specifically the generated ILP is already tight at the LP root relaxation with 0 objective value:

opt_model.writeMPS(args.output / (graph_name_stub + ".mps"))

When I change it to writeLP instead then it is not the case and the LP relaxations are not tight. I tried on SATLIB and ER graphs.

@MaxiBoether
Copy link
Owner

MaxiBoether commented Mar 8, 2023

Hi Ahmad,

Thank you very much for your comment! Please bear with me, it has been quite a while since working on this. If I remember correctly, we used the mps file to run grbtune.

I am certainly no expert in how to best use Gurobi's API. Mainly we followed the Gurobi user guide [1] which states both MPS and LP files can be used. Consulting [2], it seems to me like MPS files are more "precise" than LP files, which probably why we defaulted to them at the time.

Do I understand correctly that the mps file generated by pulp is not correct, compared to the LP file? If so, do you think this is a bug in our usage/framework or within PuLP?

Thank you so much for your help.

[1] https://www.gurobi.com/documentation/9.5/refman/command_line_tuning.html
[2] https://support.gurobi.com/hc/en-us/articles/360013420131-What-are-the-differences-between-LP-and-MPS-file-formats-

@aabbas90
Copy link
Author

aabbas90 commented Mar 8, 2023

Ok looks like issue is because when gurobi reads those .mps files it is minimizing the objective instead of maximizing. I guess issue is in pulp or mps format in general.
Reference and solution: https://support.gurobi.com/hc/en-us/articles/360013420371-Why-does-my-MPS-file-produce-different-objectives-with-different-solvers-

Looks like an existing issue with pulp:
coin-or/pulp#459

Overall I think a potential user of this benchmark can have a pitfall if he/she exports the instances as .mps and then uses gurobi to solve them. For me atleast, the problem is resolved :)

@aabbas90 aabbas90 closed this as completed Mar 8, 2023
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