summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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