From e289ac3936b57847311ed2eeba67de9668937e0b Mon Sep 17 00:00:00 2001 From: tmigot Date: Thu, 6 Jul 2023 22:20:27 -0400 Subject: [PATCH] Track bug with Julia >= 1.9.2 (#104) * FeasibilityResidual do not handle bound constrained problems --- src/feasibility-residual.jl | 2 +- test/allocs_test.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/feasibility-residual.jl b/src/feasibility-residual.jl index c3568b9..090d676 100644 --- a/src/feasibility-residual.jl +++ b/src/feasibility-residual.jl @@ -48,7 +48,7 @@ function FeasibilityResidual( name = "$(nlp.meta.name)-feasres", ) where {T, S} if !equality_constrained(nlp) - if unconstrained(nlp) + if unconstrained(nlp) || bound_constrained(nlp) throw(ErrorException("Can't handle unconstrained problem")) elseif nlp isa AbstractNLSModel return FeasibilityResidual(SlackNLSModel(nlp), name = name) diff --git a/test/allocs_test.jl b/test/allocs_test.jl index 0efc82b..26c8f46 100644 --- a/test/allocs_test.jl +++ b/test/allocs_test.jl @@ -49,7 +49,7 @@ end ), map( x -> FeasibilityResidual(eval(Symbol(x))(), name = x * "feas"), - setdiff(problems, ["MGH01"]), + setdiff(problems, ["MGH01", "BNDROSENBROCK"]), ), ) # jtprod! https://github.com/JuliaSmoothOptimizers/NLPModelsModifiers.jl/issues/77