Writing a QP to MPS?

Hi,

As far as I can tell, you can’t write a QP to an MPS file with write_to_file, but I’ve told that MPS does support QPs.

Are either of those correct? (ie, should I be able to write QP to MPS, but I’m doing it wrong, or is it wrong to think you can write a QP to an MPS file?)

Thanks!
Geoff

1 Like

Not currently: https://github.com/jump-dev/MathOptInterface.jl/issues/1390.

tl;dr: there are a bunch of non-standard extensions to MPS to support quadratic. We just haven’t implemented them yet.

You can always use the solver’s native writer:

model = direct_model(Gurobi.Optimizer)
grb = backend(model)
GRBwrite(model, "model.mps")
1 Like