jump-dev / MathOptInterface.jl

A data structure for mathematical optimization problems
http://jump.dev/MathOptInterface.jl/
Other
397 stars 87 forks source link

[FileFormats.LP] write a proper parser #2351

Open odow opened 1 year ago

odow commented 1 year ago

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

pedromxavier commented 1 year ago

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

odow commented 1 year ago

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

pedromxavier commented 1 year ago

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

rafabench commented 1 year ago

@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.

odow commented 1 month ago

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

The parser should not read line-by-line.