# Deactivating and reactivating JuMP constraints

**URL:** <https://discourse.julialang.org/t/deactivating-and-reactivating-jump-constraints/38315>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [April 27, 2020, 4:31pm UTC](https://discourse.julialang.org/t/deactivating-and-reactivating-jump-constraints/38315 "2020-04-27T16:31:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Uribe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomas_uribe/32/14402_2.png) [@Tomas\_Uribe](https://discourse.julialang.org/u/Tomas_Uribe)\
**Post date:** [April 27, 2020, 4:31pm UTC](https://discourse.julialang.org/t/deactivating-and-reactivating-jump-constraints/38315/1 "2020-04-27T16:31:24Z")

</div>

Is there a way to deactivate and reactivate JuMP constraints that are tied to a model?

I found `delete(model, constraint)`, but once deleted, constraints can’t be added back again.

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [April 27, 2020, 7:33pm UTC](https://discourse.julialang.org/t/deactivating-and-reactivating-jump-constraints/38315/2 "2020-04-27T19:33:44Z")

</div>

You can [change the `rhs`](http://www.juliaopt.org/JuMP.jl/stable/constraints/#JuMP.set_normalized_rhs) to be so big or so small that it is not binding anymore, I think.
