summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sumofsquares/cvxopt.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sumofsquares/cvxopt.py b/sumofsquares/cvxopt.py
index 12f8e44..4cd803c 100644
--- a/sumofsquares/cvxopt.py
+++ b/sumofsquares/cvxopt.py
@@ -141,6 +141,9 @@ def solve_sos_cone(prob: Problem, verbose: bool = False, *args, **kwargs) -> tup
cvxopt.solvers.options['show_progress'] = verbose
+ if not any((G, h, A, b)):
+ raise ValueError("Optimization problem is unconstrained!")
+
if is_qp:
P = cvxopt.matrix(P)
info = cvxopt.solvers.coneqp(P=P, q=q, G=G, h=h, A=A, b=b,