newline before comparison operator in .lp file format #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a workaround for this curious cbc bug that I encountered:
coin-or/CoinUtils#144
It seems that the
LP
file format is not standardized (yay!). However, points 5 and 9 in this lpsolve documentation for the CPLEXLP
format and this IBM CPLEXLP
format description of constraints agree in that constraints can go across multiple lines. Only the constraint name and its colon (e.g.c1234:
) need to appear on the same line, as do the comparison operator and the right-hand side (e.g.>= 5678
). And I found this slide deck that refers to theLP
file format as developed by CPLEX. So I assume cbc (and the other solvers) will follow these kinds of "format descriptions".So introducing these newlines should be safe to do and will prevent this bug. To get back the original format, this PR can later be reverted once the issue in CoinUtils (and thus cbc) is addressed. To make this easier, I would squash the commits in this PR during merging.