summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-05-11 11:36:33 +0200
committerNao Pross <np@0hm.ch>2024-05-11 11:36:33 +0200
commit70f9754798ab679dc1717456beb178051cce4d96 (patch)
tree1a6b8668f1f1545214f61639b1e4212f1c72a209
parentSeparate out Putinar positivstellensatz as function (diff)
downloadsumofsquares-70f9754798ab679dc1717456beb178051cce4d96.tar.gz
sumofsquares-70f9754798ab679dc1717456beb178051cce4d96.zip
Prepare stub for SCS solver interface
Diffstat (limited to '')
-rw-r--r--sumofsquares/solver/scs.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/sumofsquares/solver/scs.py b/sumofsquares/solver/scs.py
new file mode 100644
index 0000000..95629be
--- /dev/null
+++ b/sumofsquares/solver/scs.py
@@ -0,0 +1,34 @@
+"""
+Solve sumofsquares problems using SCS
+"""
+from __future__ import annotations
+
+import sys
+import scs
+
+from collections import UserDict
+
+import polymatrix as poly
+
+from ..abc import Problem, SolverInfo
+from ..variable import OptVariable
+
+
+class SCSInfo(SolverInfo, UserDict):
+ """ Dictionary returned by SCS. """
+
+ def __getattr__(self, attr):
+ key = " ".join(attr.split("_"))
+ if key not in self.keys():
+ raise KeyError(f"Key {key} was not found")
+ return self[key]
+
+
+def solve_sos_cone(prob: Problem, verbose: bool = False,
+ *args, **kwargs) -> tuple[dict[OptVariable, float], SCSInfo]:
+ r"""
+ Solve a conic problem in the cone of SOS polynomials
+ :math:`\mathbf{\Sigma}_d(x)` using SCS.
+ """
+
+ raise NotImplementedError