summaryrefslogtreecommitdiffstats
path: root/sumofsquares/cvxopt.py
diff options
context:
space:
mode:
Diffstat (limited to 'sumofsquares/cvxopt.py')
-rw-r--r--sumofsquares/cvxopt.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sumofsquares/cvxopt.py b/sumofsquares/cvxopt.py
index a703104..f27212d 100644
--- a/sumofsquares/cvxopt.py
+++ b/sumofsquares/cvxopt.py
@@ -107,6 +107,9 @@ def solve_cone(
if print_info:
print(f'number of variables: {G.shape[1]}')
print(f'{dim_l=}, {dim_q=}, {dim_s=}')
+ n_constr_q = sum(dim_q)
+ n_constr_s = sum(i**2 for i in dim_s)
+ print(f'{n_constr_q=}, {n_constr_s=}')
if print_matrix:
print(f'cost={q}')
@@ -388,6 +391,7 @@ def solve_sos_problem2(
state: polymatrix.ExpressionState,
subs: tuple[ParamSOSExpr] = None,
x0: dict[ParamSOSExpr, np.ndarray] = None,
+ print_info = False,
):
if x0 is None:
x0 = {}
@@ -419,6 +423,7 @@ def solve_sos_problem2(
variables=tuple(param_expr.param for param_expr in free_param_expr),
cost=sum(cost),
s_inequality=inequality,
+ print_info=print_info,
)
return state, result