From 27bdc001c36113b5b95837ba32820383c263ca81 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 11 Oct 2016 09:52:13 -0400 Subject: [PATCH] Add a test for an example in the Gowda/Ravindran paper. --- src/dunshire/games.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) -- 2.44.2