# Is ParametricOptInterface needed to define and use parameters in JuMP?

**URL:** <https://discourse.julialang.org/t/is-parametricoptinterface-needed-to-define-and-use-parameters-in-jump/134498>\
**Category:** Optimization (Mathematical)\
**Tags:** jump, parameter\
**Created:** [December 11, 2025, 5:21pm UTC](https://discourse.julialang.org/t/is-parametricoptinterface-needed-to-define-and-use-parameters-in-jump/134498 "2025-12-11T17:21:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zdenek\_hurak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zdenek_hurak/32/53118_2.png) [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Post date:** [December 11, 2025, 5:21pm UTC](https://discourse.julialang.org/t/is-parametricoptinterface-needed-to-define-and-use-parameters-in-jump/134498/1 "2025-12-11T17:21:36Z")

</div>

I feel puzzled when it comes to the role of ParametricOptInterface.jl (POI). I think I understand its general mission (in fact the motivating tutorial example [Rolling horizon problems · JuMP](https://jump.dev/JuMP.jl/stable/tutorials/algorithms/rolling_horizon/) directed me to it). But it appears that I can get along with just JuMP, can’t I? The [Parameter](https://jump.dev/JuMP.jl/stable/api/JuMP/#JuMP.Parameter) type (of a variable) is defined in JuMP.

The code snippet below is from the POI readme, I have just commented out the second and the third lines, and provided the fourth line instead. And it works fine.

```julia
using JuMP, HiGHS
#import ParametricOptInterface as POI
#model = direct_model(POI.Optimizer(HiGHS.Optimizer()))
model = Model(HiGHS.Optimizer)
@variable(model, x)
@variable(model, p in Parameter(1.0))
@constraint(model, cons, x + p >= 3)
@objective(model, Min, 2x)
optimize!(model)
@show value(x)
set_parameter_value(p, 2.0)
optimize!(model)
@show value(x)

```

---

<div class="post-metadata">

**Author:** ![guilhermebodin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/guilhermebodin/32/6982_2.png) [@guilhermebodin](https://discourse.julialang.org/u/guilhermebodin)\
**Post date:** [December 11, 2025, 6:39pm UTC](https://discourse.julialang.org/t/is-parametricoptinterface-needed-to-define-and-use-parameters-in-jump/134498/2 "2025-12-11T18:39:29Z")

</div>

Hi @zdenek_hurak, I am not totally sure but I think that the main difference is that the native Parameters of JuMP can only be used when they appear solely in the rhs of problems.

POI is needed when you need parameters in other places, such as the coefficient matrix.

---

<div class="post-metadata">

**Author:** ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)\
**Post date:** [December 11, 2025, 9:59pm UTC](https://discourse.julialang.org/t/is-parametricoptinterface-needed-to-define-and-use-parameters-in-jump/134498/3 "2025-12-11T21:59:45Z")

</div>

Yes, if the parameters multiplies a variable then without ParametricOptInterface it will appear as a quadratic constraint to the solver and with ParametricOptInterface it will appear as affine to the solver.  
Also, ParametricOptInterface is much more efficient

---

<div class="post-metadata">

**Author:** ![langestefan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/langestefan/32/207923_2.png) [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Post date:** [December 11, 2025, 10:14pm UTC](https://discourse.julialang.org/t/is-parametricoptinterface-needed-to-define-and-use-parameters-in-jump/134498/4 "2025-12-11T22:14:12Z")

</div>

Just curious but is this in any way the same as CVXPY’s [DPP](https://www.cvxpy.org/tutorial/dpp/index.html)?

---

<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:** [December 11, 2025, 11:12pm UTC](https://discourse.julialang.org/t/is-parametricoptinterface-needed-to-define-and-use-parameters-in-jump/134498/5 "2025-12-11T23:12:58Z")

</div>

Hi @zdenek_hurak,

- You can use `Parameter` regardless of the solver.
- If the solver doesn’t natively support `Parameter`, we will bridge it to `x in EqualTo(value)`. With HiGHS, writing `p in Parameter(1.0)` is the same as `p == 1.0`.
- POI is a layer above the solver. Instead of adding fixed variables, it substitutes out the parameters with their value.
- For additive parameters, there won’t be much difference between POI and HiGHS
- For multiplicative parameters, you must use POI because HiGHS will see a quadratic bilinear term between `parameter * variable`.
- Other solvers like Ipopt have native support for parameters; you don’t (and shouldn’t) need to use POI with them.

I hope that clarifies things.
