# writeLP in JuMP 0.19?

**URL:** <https://discourse.julialang.org/t/writelp-in-jump-0-19/22955>\
**Category:** Optimization (Mathematical)\
**Created:** [April 9, 2019, 1:19pm UTC](https://discourse.julialang.org/t/writelp-in-jump-0-19/22955 "2019-04-09T13:19:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 9, 2019, 1:49pm UTC](https://discourse.julialang.org/t/writelp-in-jump-0-19/22955/2 "2019-04-09T13:49:16Z")

</div>

See [writeMPS() - #4 by odow](https://discourse.julialang.org/t/writemps/21669/4)  
Github: [https://github.com/odow/MathOptFormat.jl](https://github.com/odow/MathOptFormat.jl)

To install, run

```julia
] add https://github.com/odow/MathOptFormat.jl

```

Then you can write the model as follows

```julia
using JuMP, MathOptFormat
model = Model()
# ... model definition

lp_file = MathOptFormat.LP.Model()
MOI.copy_to(lp_file, backend(model))
MOI.write_to_file(lp_file, "my_model.lp")

```

---

_[View the full topic](https://discourse.julialang.org/t/writelp-in-jump-0-19/22955)._
