# Writing a QP to MPS?

**URL:** <https://discourse.julialang.org/t/writing-a-qp-to-mps/79764>\
**Category:** Optimization (Mathematical)\
**Created:** [April 21, 2022, 5:18am UTC](https://discourse.julialang.org/t/writing-a-qp-to-mps/79764 "2022-04-21T05:18:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gleyland](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gleyland/32/15339_2.png) [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Post date:** [April 21, 2022, 5:18am UTC](https://discourse.julialang.org/t/writing-a-qp-to-mps/79764/1 "2022-04-21T05:18:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [April 21, 2022, 5:40am UTC](https://discourse.julialang.org/t/writing-a-qp-to-mps/79764/2 "2022-04-21T05:40:15Z")

</div>

Not currently: [https://github.com/jump-dev/MathOptInterface.jl/issues/1390](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:

```julia
model = direct_model(Gurobi.Optimizer)
grb = backend(model)
GRBwrite(model, "model.mps")

```
