comparing two .LP files
AnsweredIs there a way to compare two .lp (or .mps) files and determine if they specify the same model? Obviously running regular text diff is not useful as the two files can use different variable names or the constraints are in a different order.
Would this work - pass the files to the Gurobi solver and compare the model fingerprints?
Thanks,
Vladimir
-
Hello Vladimir,
Yes, your idea of looking at the model fingerprints is correct. If two models are identical, they will have the same fingerprint. Note that reordering constraints or variables, or even tiny changes to the numerical data, will change the fingerprint. For more information, see the article: What is the model fingerprint?
To write out your model exactly as it is represented within Gurobi, we recommend the use of MPS files. For more information on the differences between LP and MPS files, see: What are the differences between LP and MPS file formats?
Since you have a commercial account with us, you are eligible for one-on-one support, so I will create a support request for you based on this post in case you have any follow-up questions.
Thanks,
-Dan
0
Please sign in to leave a comment.
Comments
1 comment