Skip to content

Commit

Permalink
Update constraints.md
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Jun 4, 2024
1 parent f11b205 commit 77b8baf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/src/manual/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ julia> @variable(model, X[1:2, 1:2], Symmetric)
julia> @constraint(model, X == LinearAlgebra.I)
[X[1,1] - 1 X[1,2]
X[1,2] X[2,2] - 1] ∈ Zeros()
X[2,2] - 1] ∈ Zeros()
```

Despite the model showing the matrix in [`Zeros`](@ref), this will add only
three rows to the constraint matrix because the symmetric constraints are
redundant. In contrast, the broadcasting syntax adds four linear constraints:
This will add only three rows to the constraint matrix because the symmetric
constraints are redundant. In contrast, the broadcasting syntax adds four linear
constraints:

```jldoctest con_symmetric_zeros
julia> @constraint(model, X .== LinearAlgebra.I)
Expand Down

0 comments on commit 77b8baf

Please sign in to comment.