X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fdunshire%2Fgames.py;h=8383a965d26e085e08befbd09f002b4806d312b6;hb=27bdc001c36113b5b95837ba32820383c263ca81;hp=9f0b0ced50628d387ef5fbe2b8d166aefc9bb6a8;hpb=27226106ec54fd64292c8fc963cdd7aea22d2b8a;p=dunshire.git diff --git a/src/dunshire/games.py b/src/dunshire/games.py index 9f0b0ce..8383a96 100644 --- a/src/dunshire/games.py +++ b/src/dunshire/games.py @@ -556,3 +556,15 @@ class SymmetricLinearGameTest(TestCase): for j in range(K.dimension())] self.assert_solution_exists(L, K, e1, e2) + + def test_negative_value_Z_operator(self): + """ + Test the example given in Gowda/Ravindran of a Z-matrix with + negative game value on the nonnegative orthant. + """ + K = NonnegativeOrthant(2) + e1 = [1,1] + e2 = e1 + L = [[1,-2],[-2,1]] + G = SymmetricLinearGame(L, K, e1, e2) + self.assertTrue(G.solution().game_value() < -options.ABS_TOL)