I am exporting my lp with exportprod. After I do some changes in my model, I am interested in comparing the lp files. Or it seems that from one run to the next one, identical constraints are not written the same way. Example:

Run 1:

IntTerm9(78,FN,GT,SK,582): -1900 E(78,GT,582) - 1900 DI(78,GT,582) - 1900 NDI(78,GT,582) +

Flow_Rate(78,GT,SK,582) >= 0

Run 2:

IntTerm9(78,FN,GT,SK,582): Flow_Rate(78,GT,SK,582) - 1900 E(78,GT,582) - 1900 DI(78,GT,582) -

1900 NDI(78,GT,582) >= 0

So when I compare files, this indicates that the models have changed but they did not. Is there a way to guarantee that the 2 constraints above would be written the same way always ?

Thanks

The LP matrix format does not preserve the column ordering. I would suggest that you switch to using MPS format for such comparisons. Similarly, if you wish to output matrices for solver performance tests preferrably use MPS format and also make sure to employ a high precision number format (e.g. if you are outputting the matrix via the 'writeprob' routine of Xpress Optimizer you can use option 'x' for hexadecimal format).