scipopt / soplex

Sequential object-oriented simPlex
Other
59 stars 18 forks source link

Dynamic buffer growth when reading LP files #22

Closed hartmut-h closed 11 months ago

hartmut-h commented 11 months ago

Hello,

soplex works very nice also for L_1 and Chebyshev curve fitting and for digital FIR filter design, due to its high numeric precision. But when using the LP input file format for such a task, soplex is often limited by a rather short hard-coded input line length of max. 8192 characters; it fails when reading, e. g., lines like d1 + d2 + d3 + ... + d10000 <= d. The optimizer part does not have any problem with these many variables. The attached ZIP file shows a simple patch against master, which lets the input buffer, tmp, and line array sizes grow dynamically to the sizes needed by the longest line within the LP file. I would be glad if you could consider such a modification.

Best Regards Hartmut

P.S. Sorry no pull request, i'm new to github.

spxlpbase_real.hpp.diff.zip

ambros-gleixner commented 11 months ago

Thank you very much, I have created a merge request in our internal repo and we will look at it!

leoneifler commented 11 months ago

We have merged the necessary change, and it should be up on the github master branch in the next few days.