MathOptInterface.jl icon indicating copy to clipboard operation
MathOptInterface.jl copied to clipboard

[FileFormats.LP] write a proper parser

Open odow opened this issue 2 years ago • 5 comments

The LP reader is a source of many problems because it was designed as a bit of a hack and doesn't follow any formal grammar. It's probably time we rewrote a proper implementation.

https://discourse.julialang.org/t/sos-constraints-in-lp-file-throwing-malformed-sos-constraint-error/106324

See also: https://github.com/jump-dev/MathOptInterface.jl/issues?q=is%3Aissue+FileFormats.LP+is%3Aclosed

cc @hdavid16

odow avatar Nov 16 '23 19:11 odow

@rafabench I think this might be interesting for some of our applications, right?

pedromxavier avatar Nov 20 '23 17:11 pedromxavier

To clarify, you can read LP files currently. But the reader is not robust to the wide variety of LP files in the wild.

odow avatar Nov 20 '23 19:11 odow

We have already used this LP reader in some apps. I remember to have discussed it with my coworkers some months ago.

pedromxavier avatar Nov 20 '23 22:11 pedromxavier

@rafabench I think this might be interesting for some of our applications, right?

Yes! It's always good to have a robust LP reader/writer.

rafabench avatar Nov 21 '23 13:11 rafabench

See also https://github.com/jump-dev/MathOptInterface.jl/issues/2563

The parser should not read line-by-line.

odow avatar Oct 23 '24 22:10 odow