From ce72ee781577a78e11ff76f1fcd8403e5ee23542 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/ishyperplanar.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Sets/HPolyhedron/ishyperplanar.jl b/src/Sets/HPolyhedron/ishyperplanar.jl index 4a0d4ffe0c..4669a82341 100644 --- a/src/Sets/HPolyhedron/ishyperplanar.jl +++ b/src/Sets/HPolyhedron/ishyperplanar.jl @@ -6,6 +6,10 @@ function ishyperplanar(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