Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed May 31, 2024
1 parent 36cd004 commit 78018cc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_print.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ function JuMP.add_constraint(
)
end

function JuMP.is_valid(
model::M,
con_ref::ConstraintRef{M,CustomIndex},
) where {M<:GenericModel}
return 1 <= con_ref.index.value <= length(model.ext[:custom_constraints])
end

function JuMP.constraint_object(cref::ConstraintRef{Model,CustomIndex})
return cref.model.ext[:custom_constraints][cref.index.value]
end
Expand Down

0 comments on commit 78018cc

Please sign in to comment.