From 606dfecc86cc783af086d3a4c4f645358977972a Mon Sep 17 00:00:00 2001 From: Michael Schneeberger Date: Tue, 9 May 2023 09:47:59 +0200 Subject: key of x0 are the names instead of the parameter objects --- sumofsquares/cvxopt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sumofsquares/cvxopt.py b/sumofsquares/cvxopt.py index 72dd869..ed2146d 100644 --- a/sumofsquares/cvxopt.py +++ b/sumofsquares/cvxopt.py @@ -113,7 +113,7 @@ def solve_cone(state, variables, cost, s_inequality, l_inequality = tuple(), pre if x[0] == None: x0 = {} else: - x0 = {var: matrix_repr.get_value(var, x) for var in variables} + x0 = {var.name: matrix_repr.get_value(var, x) for var in variables} result = CVXOptConeQPResult( x=x, @@ -156,7 +156,7 @@ def solve_sos_problem( if free_param is None: free_param = all_param_expr - sub_vals = tuple((param_expr.param, x0[param_expr.param]) for param_expr in all_param_expr if param_expr not in free_param) + sub_vals = tuple((param_expr.param, x0[param_expr.param.name]) for param_expr in all_param_expr if param_expr not in free_param) def gen_inequality(): for sos_constraint in sos_constraints: -- cgit v1.2.1