From: Michael Orlitzky Date: Thu, 13 Oct 2016 16:21:56 +0000 (-0400) Subject: Test the dual game value of a Lyapunov game over the orthant. X-Git-Tag: 0.1.0~148 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=42d689189cc351603607793c4a43914f707873c2;p=dunshire.git Test the dual game value of a Lyapunov game over the orthant. --- diff --git a/TODO b/TODO index 24321b1..9699cd1 100644 --- 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. diff --git a/src/dunshire/games.py b/src/dunshire/games.py index 279afdb..a039e1f 100644 --- a/src/dunshire/games.py +++ b/src/dunshire/games.py @@ -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())