Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for other model file formats than .lp (e.g. the MPS format) #74

Open
dlaehnemann opened this issue Feb 19, 2021 · 5 comments

Comments

@dlaehnemann
Copy link
Contributor

Issues #73 and #72 demonstrate that the .lp file format is not very clearly specified. It might thus be more stable to use other more clearly file formats for any solvers that allow this. For solvers from the COIN-OR Suite (including cbc, but also see: https://coin-or.github.io/user_introduction), the best format is probably OSIL and according to slide 8 in this COIN-OR presentation, .nl might be another option.

OSIL

"an open, XML-based format used by the Optimization Services framework of COIN-OR"

This seems to be a very rigorously specified and very powerful format and all the tools in COIN-OR can handle it. It would require using some Rust xml parsing library and implementing the specification with it: there are some good hints in this recent blog post, so probably strong-xml or yaserde would be good. So implementing the format will be more involved.

All relevant info is on this webpage, including a link to the original paper describing it and the current stable specification:

.nl

"AMPL’s intermediate format that also supports non-linear modeling."

I guess, the complexity of implementing this would be somewhere in between the .lp file format and the OSIL .xml format. It might be a good compromise, as it seems that both COIN-OR and gurobi have capabilities of working with the .nl format.

Resources:

What do others think? Further format suggestions? Or objections?

@dlaehnemann
Copy link
Contributor Author

Just saw that minilp supports the MPS file format. So that would be something that shouldn't be too difficult to add or maybe simply move to a format parsing crate / module.

@jcavat
Copy link
Collaborator

jcavat commented Feb 22, 2021

As far as I know, MPS is well recognized by the main solvers (CBC, Gurobi, CPLEX...), such as LP. If it is better specified, MPS could be a good candidate.

@dlaehnemann
Copy link
Contributor Author

I asked over at CoinUtils -- seeing that they handle the COIN-OR file format handling, they should know which formats are widely used and well-specified:
coin-or/CoinUtils#149

@dlaehnemann
Copy link
Contributor Author

One of the CoinUtils developers gave his perspective on MILP file formats:
coin-or/CoinUtils#149 (comment)

From it, I take it that he would agree with you, in that the MPS format is the most useful to support beyond LP at the moment.

@jcavat
Copy link
Collaborator

jcavat commented Mar 1, 2021

ok, thank you for your research. We can consider using multiple formats.

@dlaehnemann dlaehnemann changed the title add support for other model file formats than .lp (e.g. .nl and/or OSIL XML format) add support for other model file formats than .lp (e.g. the MPS format) Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants