When the same model is written to both MPS and LP formats, the models read by each file are different?
AnsweredI exported my lp model in LP format, but I found the same variables appear in a same constraint more than once. (e.g., c10 + c11 + c10, where c10 appears twice). And when I exported the same model in MPS format, and read the model from MPS file, LP file, respectively, optimize my model, I found the objective value given by the two files are different. After diving more, I found the value given by MPS format is exactly the same with my program, which indicates the LP format might be wrong. I have checked everywhere, but I cannot find the reason why. I did involve a lot of add-and-delete-columns operations in my program, but I never rename any columns by myself, i.e., I only use default name for columns and constraints offered by gurobi.
-
Official comment
This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
This has been solved. I found out that when the model is the copied from another model. Then the naming rule for the copied one seems messy (especially involving some add-and-delete-cols operations), which will definitely cause some problem. When exported in MPS or RLP format, the problem is solved.
0
Post is closed for comments.
Comments
2 comments