# JuMP with absolute value constraint on variables

**URL:** <https://discourse.julialang.org/t/jump-with-absolute-value-constraint-on-variables/69863>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [October 15, 2021, 11:08pm UTC](https://discourse.julialang.org/t/jump-with-absolute-value-constraint-on-variables/69863 "2021-10-15T23:08:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [October 16, 2021, 12:03pm UTC](https://discourse.julialang.org/t/jump-with-absolute-value-constraint-on-variables/69863/3 "2021-10-16T12:03:48Z")

</div>

For more information on such a formulation, you can look here:  
[https://docs.mosek.com/modeling-cookbook/mio.html#exact-absolute-value](https://docs.mosek.com/modeling-cookbook/mio.html#exact-absolute-value)  
Once you’ve reformulated |x| = t, just add the constraint x\_{min} \leq t \leq x\_{max}

See also this recent question: [Absolute value, abs(), on Gurobi solver - #3 by jd-foster](https://discourse.julialang.org/t/absolute-value-abs-on-gurobi-solver/68493/3)

---

_[View the full topic](https://discourse.julialang.org/t/jump-with-absolute-value-constraint-on-variables/69863)._
