]> gitweb.michael.orlitzky.com - dunshire.git/commitdiff
Test the dual game value of a Lyapunov game over the orthant.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 13 Oct 2016 16:21:56 +0000 (12:21 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 13 Oct 2016 16:21:56 +0000 (12:21 -0400)
TODO
src/dunshire/games.py

diff --git a/TODO b/TODO
index 24321b14a9c4ebca5e9d9597b046e4e069ad0053..9699cd15b56acc12d751b40eb1a7e692403c7448 100644 (file)
--- a/TODO
+++ b/TODO
@@ -21,4 +21,4 @@
 9. We only need to include the API docs for dunshire.games in the
    "user manual;" everything else can go in an appendix.
 
-10. Check value of dual Lyapunov game, and test over the ice creams.
+10. Test Lyapunov games over the ice cream cone.
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())