Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Mar 2, 2025
1 parent f4d2ebc commit b6db565
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1920,7 +1920,7 @@ function VariableInSetRef(x::AbstractJuMPScalar)
model = owner_model(x)
ci = get(model.variable_in_set_ref, x, nothing)
if ci === nothing
error("VariableInSetRef does not exist for $x")
error("`VariableInSetRef` does not exist for `$x`")
end
return constraint_ref_with_index(model, ci)
end
Expand All @@ -1929,7 +1929,7 @@ function VariableInSetRef(x::AbstractArray{<:AbstractJuMPScalar})
model = owner_model(first(x))
ci = get(model.variable_in_set_ref, x, nothing)
if ci === nothing
error("VariableInSetRef does not exist for $x")
error("`VariableInSetRef` does not exist for `$x`")
end
return constraint_ref_with_index(model, ci)
end
Expand Down
4 changes: 2 additions & 2 deletions test/test_variable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ function test_variable_in_set_scalar()
@variable(model, y, Int)
@test !has_variable_in_set(y)
@test_throws(
ErrorException("VariableInSetRef does not exist for $y"),
ErrorException("`VariableInSetRef` does not exist for `$y`"),
VariableInSetRef(y),
)
for set in (
Expand Down Expand Up @@ -1737,7 +1737,7 @@ function test_variable_in_set_vector()
@variable(model, y[1:2], Int)
@test !has_variable_in_set(y)
@test_throws(
ErrorException("VariableInSetRef does not exist for $y"),
ErrorException("`VariableInSetRef` does not exist for `$y`"),
VariableInSetRef(y),
)
for set in (
Expand Down

0 comments on commit b6db565

Please sign in to comment.