# MethodError: no method matching isless(::Int64, ::Array{UnitRange{Int64},1})

**URL:** https://discourse.julialang.org/t/methoderror-no-method-matching-isless-int64-array-unitrange-int64-1/53970
**Category:** Optimization (Mathematical)
**Created:** [January 26, 2021, 11:36am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-isless-int64-array-unitrange-int64-1/53970 "2021-01-26T11:36:40Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [January 26, 2021, 12:52pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-isless-int64-array-unitrange-int64-1/53970/2 "2021-01-26T12:52:03Z")

</div>

Hi, I would advise next time you post a MWE (Minimal Working Example) that reproduces your error as it is suggested in the item 3 of [this list of good practices](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757) when asking in this forum.

Only with the error message and this excerpt of code I would deduce that:

1. None of `alpha`, `w`, `beta`, and `bs` are JuMP variable containers. They all are `Number` `Vector`s because the message complains about the left-hand side of the `<=` being an `Int`.
2. `H` seems to be a `Vector` of `UnitRange{Int64}`, in other words something like this: `[1:10, 7:30, -10:10]` (a list of ranges).

Without a MWE we cannot know why your `Vector`s that seems as they should be JuMP variable containers are just `Number` containers, nor why `H` seem to be a `Vector` of ranges. Other confusing things are, for example: from where `np` comes from? should `np` be varying too or it is fixed?

---

_[View the full topic](https://discourse.julialang.org/t/methoderror-no-method-matching-isless-int64-array-unitrange-int64-1/53970)._
