From dc1fe2fc6f3b548126d9130034894c9b7b83888c Mon Sep 17 00:00:00 2001 From: schillic Date: Fri, 26 Jul 2024 16:23:14 +0200 Subject: [PATCH] test for return status of 'remove_redundant_constraints' --- src/Sets/HPolyhedron/is_hyperplanar.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Sets/HPolyhedron/is_hyperplanar.jl b/src/Sets/HPolyhedron/is_hyperplanar.jl index 99607248df..973fc3755d 100644 --- a/src/Sets/HPolyhedron/is_hyperplanar.jl +++ b/src/Sets/HPolyhedron/is_hyperplanar.jl @@ -6,6 +6,10 @@ function is_hyperplanar(P::HPolyhedron) if m > 2 # try to remove redundant constraints clist = remove_redundant_constraints(clist) + if isnothing(clist) + # constraints are contradictory + return false + end m = length(clist) end if m != 2