|
3 | 3 | from scipy import sparse |
4 | 4 |
|
5 | 5 | # Define problem data |
6 | | -P = sparse.csc_matrix([[0., 0.], [0, 0]]) |
| 6 | +P = sparse.csc_matrix([[6., 0.], [0., 4.]]) |
7 | 7 | P = sparse.triu(P).tocsc() |
8 | 8 |
|
9 | 9 | q = np.array([-1., -4.]) |
10 | 10 |
|
11 | 11 | A = sparse.csc_matrix( |
12 | | - [[1., -2.], # <-- LHS of equality constraint (lower bound) |
13 | | - [1., 0.], # <-- LHS of inequality constraint (upper bound) |
14 | | - [0., 1.], # <-- LHS of inequality constraint (upper bound) |
| 12 | + [[ 1., -2.], # <-- LHS of equality constraint (lower bound) |
| 13 | + [ 1., 0.], # <-- LHS of inequality constraint (upper bound) |
| 14 | + [ 0., 1.], # <-- LHS of inequality constraint (upper bound) |
15 | 15 | [-1., 0.], # <-- LHS of inequality constraint (lower bound) |
16 | | - [0., -1.]]) # <-- LHS of inequality constraint (lower bound) |
| 16 | + [ 0., -1.]]) # <-- LHS of inequality constraint (lower bound) |
17 | 17 |
|
18 | 18 | b = np.array([0., 1., 1., 1., 1.]) |
19 | 19 |
|
20 | | -cones = [clarabel.ZeroConeT(1), clarabel.NonnegativeConeT(4)] |
| 20 | +cones = [ |
| 21 | + clarabel.ZeroConeT(1), |
| 22 | + clarabel.NonnegativeConeT(4) |
| 23 | +] |
21 | 24 |
|
22 | 25 | settings = clarabel.DefaultSettings() |
23 | 26 |
|
|
0 commit comments