Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed May 3, 2024
1 parent 767d521 commit 46e6c1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2818,7 +2818,7 @@ julia> normalized_coefficient(con, x)
5.0
julia> @constraint(model, con_vec, [x, 2x + 1, 3] >= 0)
[x, 2 x + 1, 3] ∈ MathOptInterface.Nonnegatives(3)
con_vec : [x, 2 x + 1, 3] ∈ MathOptInterface.Nonnegatives(3)
julia> normalized_coefficient(con_vec, x)
3-element Vector{Float64}:
Expand Down
2 changes: 1 addition & 1 deletion test/test_variable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,7 @@ function test_variable_normalized_coefficient_vector_quadratic()
model = Model()
@variable(model, x[1:3])
A = [4 5 0; 0 6 7; 8 0 0; 9 10 11]
@constraint(model, c, A * x.^2 >= 0)
@constraint(model, c, A * (x .^ 2) >= 0)
for i in 1:3, j in 1:3
b = ifelse(i == j, A[:, i], zeros(4))
@test normalized_coefficient(c, x[i], x[j]) == b
Expand Down

0 comments on commit 46e6c1f

Please sign in to comment.