# Problem MathProgBase.LinearQuadraticModel with Gurobi

**URL:** <https://discourse.julialang.org/t/problem-mathprogbase-linearquadraticmodel-with-gurobi/19910>\
**Category:** Optimization (Mathematical)\
**Created:** [January 22, 2019, 3:53am UTC](https://discourse.julialang.org/t/problem-mathprogbase-linearquadraticmodel-with-gurobi/19910 "2019-01-22T03:53:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre-Louis\_Poirion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pierre-louis_poirion/32/19257_2.png) [@Pierre-Louis\_Poirion](https://discourse.julialang.org/u/Pierre-Louis_Poirion)\
**Post date:** [January 22, 2019, 3:53am UTC](https://discourse.julialang.org/t/problem-mathprogbase-linearquadraticmodel-with-gurobi/19910/1 "2019-01-22T03:53:53Z")

</div>

Hello,

I have got a problem with this 2 lines

```julia
m_internal = MathProgBase.LinearQuadraticModel(GurobiSolver())
MathProgBase.loadproblem!(m_internal, s)

```

where s is a mps file

the error is

```julia
**UndefVarError: getconstrLB not defined**
in top-level scope at [base\none](#)
in loadproblem! at [Gurobi\6Evli\src\MPBWrapper.jl:114](#)

```

which is wierd because I still can load the problem data by doing

```julia
c = MathProgBase.getobj(m_internal)
A = MathProgBase.getconstrmatrix(m_internal)
xlb = MathProgBase.getvarLB(m_internal)
xub = MathProgBase.getvarUB(m_internal)
l = MathProgBase.getconstrLB(m_internal)
u = MathProgBase.getconstrUB(m_internal)
sens=MathProgBase.getsense(m_internal)

```

By the way there was no problem at all using CPLEX instead of Gurobi

Best

---

<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:** [January 22, 2019, 3:20pm UTC](https://discourse.julialang.org/t/problem-mathprogbase-linearquadraticmodel-with-gurobi/19910/2 "2019-01-22T15:20:47Z")

</div>

This is a bug:  
[https://github.com/JuliaOpt/Gurobi.jl/issues/183](https://github.com/JuliaOpt/Gurobi.jl/issues/183)

---

<div class="post-metadata">

**Author:** ![Pierre-Louis\_Poirion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pierre-louis_poirion/32/19257_2.png) [@Pierre-Louis\_Poirion](https://discourse.julialang.org/u/Pierre-Louis_Poirion)\
**Post date:** [January 28, 2019, 11:40am UTC](https://discourse.julialang.org/t/problem-mathprogbase-linearquadraticmodel-with-gurobi/19910/3 "2019-01-28T11:40:43Z")

</div>

Thank you!

Any idea on how long it will take to fix the bug ?

Best  
Pierre-Louis

---

<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:** [January 28, 2019, 2:44pm UTC](https://discourse.julialang.org/t/problem-mathprogbase-linearquadraticmodel-with-gurobi/19910/4 "2019-01-28T14:44:38Z")

</div>

You can do it yourself!

Go through this file, and add `MPB.` before any functions that need it (I already highlighted two, but there may be others; you can test locally). Then at the bottom of the page, follow the instructions to create a new branch and create a pull request.

[https://github.com/JuliaOpt/Gurobi.jl/edit/master/src/MPBWrapper.jl](https://github.com/JuliaOpt/Gurobi.jl/edit/master/src/MPBWrapper.jl)
