# Are vectorized constraints no longer supported on JuMP?

**URL:** <https://discourse.julialang.org/t/are-vectorized-constraints-no-longer-supported-on-jump/103355>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [August 30, 2023, 7:50am UTC](https://discourse.julialang.org/t/are-vectorized-constraints-no-longer-supported-on-jump/103355 "2023-08-30T07:50:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AS011996](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/as011996/32/36522_2.png) [@AS011996](https://discourse.julialang.org/u/AS011996)\
**Post date:** [August 30, 2023, 7:50am UTC](https://discourse.julialang.org/t/are-vectorized-constraints-no-longer-supported-on-jump/103355/1 "2023-08-30T07:50:28Z")

</div>

The vectorized constraints on [Constraints · JuMP](https://jump.dev/JuMP.jl/stable/manual/constraints/) no longer seems to work. The following code

```julia
using JuMP
model = Model();

@variable(model, x[i=1:2])

A = [1 2; 3 4]
b = [5, 6]

@constraint(model, con_vector, A * x == b)

```

verbatim from the documentation returns the error “@constraint(model, con\_vector, (Expr(:escape, :A)) \* (Expr(:escape, :x)) == b)`: Unexpected vector in scalar constraint. Did you mean to use the dot comparison operators like .==, .\<=, and .\>= instead?”

Any idea what might be the issue here?

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [August 30, 2023, 8:03am UTC](https://discourse.julialang.org/t/are-vectorized-constraints-no-longer-supported-on-jump/103355/2 "2023-08-30T08:03:52Z")

</div>

Try updating your version of JuMP. This syntax was added in v1.10

> **[Release notes · JuMP](https://jump.dev/JuMP.jl/stable/release_notes/#%5BVersion-1.10.0%5D(https://github.com/jump-dev/JuMP.jl/releases/tag/v1.10.0)-(April-3,-2023))**
>
> Documentation for JuMP.
