# Reading LP/MPS file and using callback

**URL:** <https://discourse.julialang.org/t/reading-lp-mps-file-and-using-callback/68254>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [September 16, 2021, 11:00am UTC](https://discourse.julialang.org/t/reading-lp-mps-file-and-using-callback/68254 "2021-09-16T11:00:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![manoj.centura](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/manoj.centura/32/216443_2.png) [@manoj.centura](https://discourse.julialang.org/u/manoj.centura)\
**Post date:** [September 16, 2021, 11:00am UTC](https://discourse.julialang.org/t/reading-lp-mps-file-and-using-callback/68254/1 "2021-09-16T11:00:12Z")

</div>

Hi All,

is there a way to read an lp/MPS file in julia and apply the callback function.

Thanks,  
Manoj Kumar

---

<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:** [September 17, 2021, 5:10am UTC](https://discourse.julialang.org/t/reading-lp-mps-file-and-using-callback/68254/2 "2021-09-17T05:10:47Z")

</div>

> is there a way to read an lp/MPS file

> **[Models · JuMP](https://jump.dev/JuMP.jl/stable/manual/models/#Read-a-model-from-file)**
>
> Documentation for JuMP.

> and apply the callback function

> **[Solver-independent Callbacks · JuMP](https://jump.dev/JuMP.jl/stable/manual/callbacks/)**
>
> Documentation for JuMP.

---

<div class="post-metadata">

**Author:** ![Zacharie\_ALES](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zacharie_ales/32/11144_2.png) [@Zacharie\_ALES](https://discourse.julialang.org/u/Zacharie_ALES)\
**Post date:** [July 13, 2022, 3:18pm UTC](https://discourse.julialang.org/t/reading-lp-mps-file-and-using-callback/68254/3 "2022-07-13T15:18:18Z")

</div>

When I use JuMP.read\_from\_file(“myModel.lp”) I get the error “ERROR: read! is not implemented for LP files.”.

---

<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:** [July 13, 2022, 5:50pm UTC](https://discourse.julialang.org/t/reading-lp-mps-file-and-using-callback/68254/4 "2022-07-13T17:50:55Z")

</div>

Update your packages. This was added in MOI v1.3.0.
