# Constraint declaration generates an error

**URL:** <https://discourse.julialang.org/t/constraint-declaration-generates-an-error/61239>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [May 16, 2021, 10:23am UTC](https://discourse.julialang.org/t/constraint-declaration-generates-an-error/61239 "2021-05-16T10:23:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [May 16, 2021, 11:25am UTC](https://discourse.julialang.org/t/constraint-declaration-generates-an-error/61239/2 "2021-05-16T11:25:25Z")

</div>

Please make it easier to help you by formatting your code and making it self-contained, e.g., here you don’t say what `N1` is; see [Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757).  
From what I see, `j` is a `String` so I guess `N1` contains some strings and then you try to compare it with `1` and `7`. Strings cannot be compared to numbers hence the error.

---

_[View the full topic](https://discourse.julialang.org/t/constraint-declaration-generates-an-error/61239)._
