From 78018cc1631b668daa48bf169e51254286ddab06 Mon Sep 17 00:00:00 2001 From: odow Date: Fri, 31 May 2024 15:27:17 +1200 Subject: [PATCH] Update --- test/test_print.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_print.jl b/test/test_print.jl index d498f0829d3..c7730f6eccc 100644 --- a/test/test_print.jl +++ b/test/test_print.jl @@ -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