From 5709add72b2bb6eb7d4766fed1cee465d538acd8 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..ea45af8825 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 isempty(clist) + # constraints are contradictory + return false + end m = length(clist) end if m != 2