]> gitweb.michael.orlitzky.com - dunshire.git/blobdiff - src/dunshire/games.py
Test the dual game value of a Lyapunov game over the orthant.
[dunshire.git] / src / dunshire / games.py
index 279afdb16036fa7c36a072ab4564f075002a0721..a039e1f232ff12395e5f0634de1dde7b3cdcfb10 100644 (file)
@@ -863,3 +863,7 @@ class SymmetricLinearGameTest(TestCase):
             # L should be negative stable
             ns = all([eig < options.ABS_TOL for eig in  eigenvalues_re(L)])
             self.assertTrue(ns)
+
+        # The dual game's value should always equal the primal's.
+        dualsoln = game.dual().solution()
+        self.assert_within_tol(dualsoln.game_value(), soln.game_value())