From 42d689189cc351603607793c4a43914f707873c2 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 13 Oct 2016 12:21:56 -0400 Subject: [PATCH] Test the dual game value of a Lyapunov game over the orthant. --- TODO | 2 +- src/dunshire/games.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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()) -- 2.43.2