diff options
author | Nao Pross <np@0hm.ch> | 2024-06-07 16:29:14 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-06-07 16:29:14 +0200 |
commit | 4646a5c35c222b1f82de21d27b59edf4ea4e9422 (patch) | |
tree | fcfc3ac9d0109d60869d9824cd9393669b18a1d7 | |
parent | Add __str__ method to InternalSOSProblem for debugging (diff) | |
download | sumofsquares-4646a5c35c222b1f82de21d27b59edf4ea4e9422.tar.gz sumofsquares-4646a5c35c222b1f82de21d27b59edf4ea4e9422.zip |
Add ExpCone support in solver.scs
Diffstat (limited to '')
-rw-r--r-- | sumofsquares/solver/scs.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sumofsquares/solver/scs.py b/sumofsquares/solver/scs.py index 71c2248..faad4e1 100644 --- a/sumofsquares/solver/scs.py +++ b/sumofsquares/solver/scs.py @@ -110,11 +110,13 @@ def solve_cone(prob: ConicProblem, verbose: bool = False, for (linear, constant) in prob.constraints["s"]: # -1 because RHS - b_rows.append(vec(constant) * -1) + b_rows.append(vec(-constant)) A_rows.append(np.hstack(tuple(vec(m) for m in linear))) - if prob.constraints["e"]: - raise NotImplementedError + for (linear, constant) in prob.constraints["e"]: + for i in range(3): + b_rows.append(constant[i]) + A_rows.append(np.hstack(tuple(-m[i] for m in linear))) if prob.constraints["e*"]: raise NotImplementedError |