]> gitweb.michael.orlitzky.com - dunshire.git/blob - TODO
afcffc533072cba19efd7ee027ee1e91fc11079d
[dunshire.git] / TODO
1 1. Make it work on a cartesian product of cones in the correct order.
2
3 2. Make it work on a cartesian product of cones in the wrong order
4 (apply a perm utation before/after).
5
6 3. Make sure we have the dimensions of the PSD cone correct.
7
8 4. Come up with a fast heuristic (like making nu huge and taking e1 as
9 our point) that finds a primal feasible point.
10
11 5. Fix the solve failures that we get in the translation tests. For example,
12
13 ERROR: test_translation_orthant (test.symmetric_linear_game_test.
14 SymmetricLinearGameTest)
15 ----------------------------------------------------------------------
16 Traceback (most recent call last):
17 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
18 line 374, in test_translation_orthant
19 self.assert_translation_works(L, K, e1, e2)
20 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
21 line 361, in assert_translation_works
22 value2 = game2.solution().game_value()
23 File "/home/mjo/src/dunshire/dunshire/games.py", line 458, in solution
24 raise GameUnsolvableException(self, soln_dict)
25 dunshire.errors.GameUnsolvableException: Solution failed with result
26 "unknown."
27 The linear game (L, K, e1, e2) where
28 L = [352.0763359 267.0812248 300.8004888 307.8135853]
29 [429.8303135 324.8322824 361.6866231 372.1748983]
30 [390.6592961 286.8039007 320.7409227 330.1854235]
31 [316.0538913 247.7440818 276.9063990 274.9871772],
32 K = Nonnegative orthant in the real 4-space,
33 e1 = [7.7040001]
34 [9.4324457]
35 [8.3882819]
36 [6.8908420],
37 e2 = [8.5054325]
38 [6.4738132]
39 [7.2452437]
40 [7.3307357].
41 CVXOPT returned:
42 dual infeasibility: 0.053819211766446585
43 dual objective: -5.369636805607942
44 dual slack: 2.105806354638527e-17
45 gap: 2.6823510532777825e-16
46 iterations: 11
47 primal infeasibility: 4.71536776301359e-15
48 primal objective: -5.3799616179161
49 primal slack: 1.0328930392495263e-17
50 relative gap: 4.985818196816016e-17
51 residual as dual infeasibility certificate: 0.18587493201993227
52 residual as primal infeasibility certificate: None
53 s:
54 [0.0115539]
55 [0.0000000]
56 [0.0000000]
57 [0.1230066]
58 [0.4837410]
59 [0.0000000]
60 [0.0000000]
61 [0.4044349]
62 status: unknown
63 x:
64 [ 5.3799616]
65 [ 0.0115539]
66 [-0.0000000]
67 [-0.0000000]
68 [ 0.1230066]
69 y:
70 [5.3696368]
71 z:
72 [0.0000000]
73 [0.4176330]
74 [0.6007564]
75 [0.0000000]
76 [0.0000000]
77 [0.0889310]
78 [0.0191076]
79 [0.0000000]
80
81
82 6. Fix the math domain errors that sometimes pop up:
83
84 ERROR: test_scaling_icecream (test.symmetric_linear_game_test
85 .SymmetricLinearGameTest)
86 ----------------------------------------------------------------------
87 Traceback (most recent call last):
88 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
89 line 336, in test_scaling_icecream
90 self.assert_scaling_works(L, K, e1, e2)
91 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
92 line 317, in assert_scaling_works
93 value2 = game2.solution().game_value()
94 File "/home/mjo/src/dunshire/dunshire/games.py", line 428, in solution
95 soln_dict = solvers.conelp(c, G, h, C.cvxopt_dims(), A, b)
96 File "/usr/lib64/python3.4/site-packages/cvxopt/coneprog.py", line 1395,
97 in conelp
98 misc.update_scaling(W, lmbda, ds, dz)
99 File "/usr/lib64/python3.4/site-packages/cvxopt/misc.py", line 510,
100 in update_scaling
101 ln = jnrm2(lmbda, n = m, offset = ind)
102 File "/usr/lib64/python3.4/site-packages/cvxopt/misc.py", line 856, in jnrm2
103 return math.sqrt(x[offset] - a) * math.sqrt(x[offset] + a)
104 ValueError: math domain error
105
106
107 7. Figure out why this happens, too:
108
109 FAIL: test_scaling_icecream (test.symmetric_linear_game_test
110 .SymmetricLinearGameTest)
111 ----------------------------------------------------------------------
112 Traceback (most recent call last):
113 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
114 line 336, in test_scaling_icecream
115 self.assert_scaling_works(L, K, e1, e2)
116 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
117 line 318, in assert_scaling_works
118 self.assert_within_tol(alpha*value1, value2)
119 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
120 line 254, in assert_within_tol
121 self.assertTrue(abs(first - second) < options.ABS_TOL)
122 AssertionError: False is not true
123
124
125 FAIL: test_translation_orthant (test.symmetric_linear_game_test
126 SymmetricLinearGameTest)
127 ----------------------------------------------------------------------
128 Traceback (most recent call last):
129 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
130 line 374, in test_translation_orthant
131 self.assert_translation_works(L, K, e1, e2)
132 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
133 line 366, in assert_translation_works
134 self.assert_within_tol(value2, inner_product(M*x_bar, y_bar))
135 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
136 line 254, in assert_within_tol
137 self.assertTrue(abs(first - second) < options.ABS_TOL)
138 AssertionError: False is not true
139
140
141 8. Fix floating point comparisons in the doctest output.
142
143 10. Sometimes our Lyapunov-like tests over the ice cream cone are
144 failing badly. For example,
145
146 FAIL: test_lyapunov_icecream (test.symmetric_linear_game_test
147 .SymmetricLinearGameTest)
148 ----------------------------------------------------------------------
149 Traceback (most recent call last):
150 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
151 line 620, in test_lyapunov_icecream
152 self.assert_lyapunov_works(G)
153 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
154 line 578, in assert_lyapunov_works
155 self.assertTrue(negative_stable)
156 AssertionError: False is not true
157
158
159 We should have a matrix L that is negative stable, but its eigenvalues
160 are actually,
161
162 [0.8991268260361707,
163 0.8991268260361707,
164 -1.4648148562918966,
165 3.2630685083642352,
166 0.8991268260361712]
167
168 11. Complete the unit tests for the matrices module. We still need to
169 document it, and finish adding all of the tests.
170
171 12. Investigate this test failure too. It looks like it was really
172 close to being solved, but we would have needed a fudge factor
173 of three instead of two.
174
175 ERROR: test_positive_operator_value (test.symmetric_linear_game_test
176 .SymmetricLinearGameTest)
177 ----------------------------------------------------------------------
178 Traceback (most recent call last):
179 File "/home/mjo/src/dunshire/test/symmetric_linear_game_test.py",
180 line 550, in test_positive_operator_value
181 self.assertTrue(G.solution().game_value() >= -options.ABS_TOL)
182 File "/home/mjo/src/dunshire/dunshire/games.py", line 515, in solution
183 raise GameUnsolvableException(self, soln_dict)
184 dunshire.errors.GameUnsolvableException: Solution failed with result
185 "unknown."
186 The linear game (L, K, e1, e2) where
187 L = [8.0814704 3.5584693]
188 [3.9986814 9.3381562],
189 K = Nonnegative orthant in the real 2-space,
190 e1 = [1.3288182]
191 [0.7458942],
192 e2 = [0.6814326]
193 [3.3799082],
194 Condition((L, K, e1, e2)) = 41.093597.
195 CVXOPT returned:
196 dual infeasibility: 2.368640021750079e-06
197 dual objective: -7.867137172157051
198 dual slack: 1.1314089173606103e-07
199 gap: 1.1404410161224882e-06
200 iterations: 6
201 primal infeasibility: 1.379959981010593e-07
202 primal objective: -7.867137449574777
203 primal slack: 1.0550559882036034e-08
204 relative gap: 1.4496264027827932e-07
205 residual as dual infeasibility certificate: 0.12711103707156543
206 residual as primal infeasibility certificate: None
207 s:
208 [1.4674968]
209 [0.0000000]
210 [1.4055364]
211 [0.0000000]
212 status: unknown
213 x:
214 [ 7.8671374]
215 [ 1.4674968]
216 [-0.0000000]
217 y:
218 [7.8671372]
219 z:
220 [ 0.0000001]
221 [14.0707905]
222 [ 0.0000002]
223 [ 1.3406728]
224
225
226 13. Add game payoff(x,y) method to check solutions.