jump-dev / AmplNLWriter.jl

A Julia interface to AMPL-enabled solvers
http://ampl.com/products/solvers/all-solvers-for-ampl/
MIT License
67 stars 18 forks source link

Rewrite and overhaul of AmplNLWriter. #125

Closed odow closed 3 years ago

odow commented 3 years ago

Ideally, some, or all of this would be migrated into MOI.FileFormats as an NL submodule.

This needs many more tests before merging.

This implementation is simplier than the current one, because it doesn't try to detect or simplify linear expressions.

Closes #15 (They're commented out for a reason, and now much better explained) Closes #72 Closes #108 (We don't need persistent storage between sessions.) Closes #123

odow commented 3 years ago

Okay, this is now passing all tests so I'm pretty confident there aren't any lingering bugs.

I still need to benchmark against the old version, but I'd expect this version to be significantly quicker. I have some ideas for other improvements, but that can wait for a different PR.

On the whole, this version is much more maintainable. A lot of the core code was untouched since 2016, and I've added a lot of comments throughout on the format. Unfortunately the PDFs aren't the most descriptive for some features.

odow commented 3 years ago

Okay, the design is a lot better now. I don't know why I didn't consider it before. This PR is large and unwieldy, so I'm going to merge it as is, and make some smaller follow-up PRs. I'll hold off tagging a new version for a while to give people time to try out the #master version.