summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-06-05 18:53:36 +0200
committerNao Pross <np@0hm.ch>2024-06-05 18:53:36 +0200
commit9016ee67651299c1d67f0d28f8d53404546709f1 (patch)
tree0286c19f096a115a20a68fbce108dbc54c670b16
parentFix bugs in PutinarPSatz, better names (variables -> symbols) (diff)
downloadsumofsquares-9016ee67651299c1d67f0d28f8d53404546709f1.tar.gz
sumofsquares-9016ee67651299c1d67f0d28f8d53404546709f1.zip
Improve logging in to_conic_problem()
-rw-r--r--sumofsquares/problems.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/sumofsquares/problems.py b/sumofsquares/problems.py
index 9990264..28327a1 100644
--- a/sumofsquares/problems.py
+++ b/sumofsquares/problems.py
@@ -409,17 +409,22 @@ class InternalSOSProblem(Problem):
if verbose:
logstr = ""
+
+ logstr += " Decision variables: " + ", ".join(self.symbols) + "\n"
+ logstr += " Polynomial variables: " + ", ".join(self.polynomial_symbols) + "\n"
+
if P is not None:
- logstr += f"{P.shape = }\n"
+ logstr += f" {P.shape = }\n"
if q is not None:
- logstr += f"{q.shape = }\n"
+ logstr += f" {q.shape = }\n"
+ logstr += " Cones have dimensions:\n"
for ctype, d in dims.items():
if d:
- logstr += f" {ctype}: {sum(d)} {tuple(d)}\n"
+ logstr += f" {ctype}: {sum(d)} = sum{tuple(d)}\n"
- print("Conic problem has shapes: \n", logstr)
+ print("Conic problem: \n" + logstr)
return ConicProblem(P=P, q=q, constraints=constraints,
dims=dims, is_qp=is_qp,