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.
-
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
Please sign in to leave a comment.
Comments
1 comment