Sorry definition of a constraint in what? JuMP.jl? If so, this is the wrong category, it should be in Mathematical Optimization, I can change the category (it is a “regular” user power), if this is the case.

Yes, this is for JuMP. I’ve changed the category. @mamo, please remember my suggestion to format your code correctly and provide a minimal working example.