# JuMP Parameters params depend on the Optimizer?

**URL:** <https://discourse.julialang.org/t/jump-parameters-params-depend-on-the-optimizer/26725>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump\
**Created:** [July 24, 2019, 9:29am UTC](https://discourse.julialang.org/t/jump-parameters-params-depend-on-the-optimizer/26725 "2019-07-24T09:29:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![remi-garcia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/remi-garcia/32/7125_2.png) [@remi-garcia](https://discourse.julialang.org/u/remi-garcia)\
**Post date:** [July 24, 2019, 9:29am UTC](https://discourse.julialang.org/t/jump-parameters-params-depend-on-the-optimizer/26725/1 "2019-07-24T09:29:39Z")

</div>

Hi,

With [JuMP](https://github.com/JuliaOpt/JuMP.jl) we can pass parameters to the solver in [`with_optimizer`](http://www.juliaopt.org/JuMP.jl/v0.19.2/solvers/#JuMP.with_optimizer). What I understood is that the parameter depend on the used Optimizer. If I want a Time Limit with [GLPK](https://github.com/JuliaOpt/GLPK.jl) I’ll use `tm_lim` while with [CPLEX](https://github.com/JuliaOpt/CPLEX.jl) it’ll be `CPX_PARAM_TILIM`.

With [MathProgBase](https://github.com/JuliaOpt/MathProgBase.jl) and JuMP 0.18 I think it was a common parameter for every solver `:TimeLimit`. Is that still the case with [MathOptInterface](https://github.com/JuliaOpt/MathOptInterface.jl) and I just missed it? Is that going to be the case? (and if I can help on that in any way I would be happy to)

Thanks in advance!

---

<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 24, 2019, 2:48pm UTC](https://discourse.julialang.org/t/jump-parameters-params-depend-on-the-optimizer/26725/2 "2019-07-24T14:48:28Z")

</div>

I don’t believe we have a solver-independent option for the time limit. We have one for `Silent` ([https://github.com/JuliaOpt/MathOptInterface.jl/pull/695](https://github.com/JuliaOpt/MathOptInterface.jl/pull/695)), so we would probably accept a similar one for `TimeLimit`.

---

<div class="post-metadata">

**Author:** ![remi-garcia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/remi-garcia/32/7125_2.png) [@remi-garcia](https://discourse.julialang.org/u/remi-garcia)\
**Post date:** [July 24, 2019, 5:25pm UTC](https://discourse.julialang.org/t/jump-parameters-params-depend-on-the-optimizer/26725/3 "2019-07-24T17:25:22Z")

</div>

Ok, thank you for your answer. If I understand that right each solver interface, like [CPLEX.jl](https://github.com/JuliaOpt/CPLEX.jl), should have implement Silent? I checked CPLEX.jl and it has it in MathProgBase wrapper but not yet in MathOptInterface. Is that right?

---

<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 24, 2019, 6:48pm UTC](https://discourse.julialang.org/t/jump-parameters-params-depend-on-the-optimizer/26725/4 "2019-07-24T18:48:53Z")

</div>

Probably. Note that we want to re-write the CPLEX wrapper to simplify it, ensure that all features are implemented, and to remove the dependence on LinQuadOptInterface.

We have started on GLPK [https://github.com/JuliaOpt/GLPK.jl/pull/101](https://github.com/JuliaOpt/GLPK.jl/pull/101) and Gurobi: [https://github.com/JuliaOpt/Gurobi.jl/pull/216](https://github.com/JuliaOpt/Gurobi.jl/pull/216)

Re-writing CPLEX is mostly a case of copying the Gurobi wrapper and renaming some of the low-level internal functions.

---

<div class="post-metadata">

**Author:** ![remi-garcia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/remi-garcia/32/7125_2.png) [@remi-garcia](https://discourse.julialang.org/u/remi-garcia)\
**Post date:** [July 28, 2019, 9:38am UTC](https://discourse.julialang.org/t/jump-parameters-params-depend-on-the-optimizer/26725/5 "2019-07-28T09:38:41Z")

</div>

Thank you again for your answer, that clarify it for me. I’ll follow the evolution of MOI and try to help on CPLEX.jl but as you probably understood I’m still new to GitHub.
