# Status of relaxation: NORM\_LIMIT

**URL:** <https://discourse.julialang.org/t/status-of-relaxation-norm-limit/61078>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [May 13, 2021, 12:22pm UTC](https://discourse.julialang.org/t/status-of-relaxation-norm-limit/61078 "2021-05-13T12:22:19Z")\
**Posts on this page:** 8\
**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:** [May 13, 2021, 12:22pm UTC](https://discourse.julialang.org/t/status-of-relaxation-norm-limit/61078/1 "2021-05-13T12:22:19Z")

</div>

Hi All,

I am solving an MINLP using Juniper and getting this  
`Status of relaxation: NORM_LIMIT `  
any suggestions how to resolve this.  
Thanks

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [May 13, 2021, 12:26pm UTC](https://discourse.julialang.org/t/status-of-relaxation-norm-limit/61078/2 "2021-05-13T12:26:42Z")

</div>

Your problem may be unbounded. Put bounds on the variables.

---

<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:** [May 15, 2021, 7:29pm UTC](https://discourse.julialang.org/t/status-of-relaxation-norm-limit/61078/3 "2021-05-15T19:29:05Z")

</div>

Thanks Mohamed82008, it working forgot to put bounds on the variable. now getting new error  
`MathOptInterface.LowerBoundAlreadySet{MathOptInterface.EqualTo{Float64},MathOptInterface.EqualTo{Float64}}(MathOptInterface.VariableIndex(103))`

any idea on how to get variable name from variable index i.e. 103

---

<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:** [May 15, 2021, 8:40pm UTC](https://discourse.julialang.org/t/status-of-relaxation-norm-limit/61078/4 "2021-05-15T20:40:38Z")

</div>

Please provide a minimal working example demonstrating the problem.

---

<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:** [May 17, 2021, 10:30am UTC](https://discourse.julialang.org/t/status-of-relaxation-norm-limit/61078/5 "2021-05-17T10:30:34Z")

</div>

Hi odow,  
It is a commercial code. I cant share. Is there a way to know about the variable name from the VariableIndex.

Thanks

---

<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:** [May 18, 2021, 2:33am UTC](https://discourse.julialang.org/t/status-of-relaxation-norm-limit/61078/6 "2021-05-18T02:33:54Z")

</div>

You shouldn’t get that error using JuMP. So it’s either a bug that we should fix, or a mistake in your code. It would be helpful if you could remove the confidential stuff and post a simplified example that reproduces the problem.

---

<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:** [May 21, 2021, 9:09am UTC](https://discourse.julialang.org/t/status-of-relaxation-norm-limit/61078/7 "2021-05-21T09:09:39Z")

</div>

@odow,  
This reproduce the error. I am not sure this is the correct or not.

````nohighlight
m = Model(with_optimizer(Cbc.Optimizer))
@variable(m, x)
@constraint(m, x in MOI.LessThan(7.0))
@constraint(m, x in MOI.LessThan(5.0))
@constraint(m, x in MOI.LessThan(10.0))
@objective(m, Max, x)```
it reproduce the error

ERROR: MathOptInterface.UpperBoundAlreadySet{MathOptInterface.LessThan{Float64},MathOptInterface.LessThan{Float64}}: Cannot add `SingleVariable`-in`MathOptInterface.LessThan{Float64}` constraint for variable MathOptInterface.VariableIndex(1) as a `SingleVariable`-in`MathOptInterface.LessThan{Float64}` constraint was already set for this variable and both constraints set an upper bound.
````

---

<div class="post-metadata">

**Author:** ![miles.lubin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miles.lubin/32/279_2.png) [@miles.lubin](https://discourse.julialang.org/u/miles.lubin)\
**Post date:** [May 21, 2021, 9:39pm UTC](https://discourse.julialang.org/t/status-of-relaxation-norm-limit/61078/8 "2021-05-21T21:39:21Z")

</div>

Use [`JuMP.set_upper_bound`](https://jump.dev/JuMP.jl/v0.21.8/reference/variables/#JuMP.set_upper_bound) instead of `@constraint(m, x in MOI.LessThan(7.0))`.

It’s not valid in MOI to add multiple `SingleVariable-in-LessThan` constraints on the same variable: [Constraints · MathOptInterface](https://jump.dev/MathOptInterface.jl/stable/manual/constraints/#Linear-constraints)

> Constraints with [`SingleVariable`](https://jump.dev/MathOptInterface.jl/stable/reference/standard_form/#MathOptInterface.SingleVariable) in [`LessThan`](https://jump.dev/MathOptInterface.jl/stable/reference/standard_form/#MathOptInterface.LessThan), [`GreaterThan`](https://jump.dev/MathOptInterface.jl/stable/reference/standard_form/#MathOptInterface.GreaterThan), [`EqualTo`](https://jump.dev/MathOptInterface.jl/stable/reference/standard_form/#MathOptInterface.EqualTo), or [`Interval`](https://jump.dev/MathOptInterface.jl/stable/reference/standard_form/#MathOptInterface.Interval) sets have a natural interpretation as variable bounds. As such, it is typically not natural to impose multiple lower- or upper-bounds on the same variable, and the solver interfaces should throw respectively [`LowerBoundAlreadySet`](https://jump.dev/MathOptInterface.jl/stable/reference/errors/#MathOptInterface.LowerBoundAlreadySet) or [`UpperBoundAlreadySet`](https://jump.dev/MathOptInterface.jl/stable/reference/errors/#MathOptInterface.UpperBoundAlreadySet).
> 
> Moreover, adding two [`SingleVariable`](https://jump.dev/MathOptInterface.jl/stable/reference/standard_form/#MathOptInterface.SingleVariable) constraints on the same variable with the same set is impossible because they share the same index as it is the index of the variable, see [`ConstraintIndex`](https://jump.dev/MathOptInterface.jl/stable/reference/constraints/#MathOptInterface.ConstraintIndex).
