Skip to content

Commit aa35e3c

Browse files
committed
EHN: Player.is_dominated: Add 'revised simplex' method
For SciPy >= 1.3.0
1 parent 9eabc25 commit aa35e3c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

quantecon/game_theory/normal_form_game.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,9 @@ def is_dominated(self, action, tol=None, method=None):
436436
method : str, optional(default=None)
437437
If None, `lemke_howson` from `quantecon.game_theory` is used
438438
to solve for a Nash equilibrium of an auxiliary zero-sum
439-
game. If `method` is set to `'simplex'` or
440-
`'interior-point'`, `scipy.optimize.linprog` is used with
441-
the method as specified by `method`.
439+
game. If `method` is set to `'simplex'`, `'interior-point'`,
440+
or `'revised simplex'`, then `scipy.optimize.linprog` is
441+
used with the method as specified by `method`.
442442
443443
Returns
444444
-------
@@ -469,7 +469,7 @@ def is_dominated(self, action, tol=None, method=None):
469469
g_zero_sum = NormalFormGame([Player(D), Player(-D.T)])
470470
NE = lemke_howson(g_zero_sum)
471471
return NE[0] @ D @ NE[1] > tol
472-
elif method in ['simplex', 'interior-point']:
472+
elif method in ['simplex', 'interior-point', 'revised simplex']:
473473
from scipy.optimize import linprog
474474
m, n = D.shape
475475
A_ub = np.empty((n, m+1))
@@ -508,9 +508,9 @@ def dominated_actions(self, tol=None, method=None):
508508
method : str, optional(default=None)
509509
If None, `lemke_howson` from `quantecon.game_theory` is used
510510
to solve for a Nash equilibrium of an auxiliary zero-sum
511-
game. If `method` is set to `'simplex'` or
512-
`'interior-point'`, `scipy.optimize.linprog` is used with
513-
the method as specified by `method`.
511+
game. If `method` is set to `'simplex'`, `'interior-point'`,
512+
or `'revised simplex'`, then `scipy.optimize.linprog` is
513+
used with the method as specified by `method`.
514514
515515
Returns
516516
-------

quantecon/game_theory/tests/test_normal_form_game.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# Player #
1515

16-
LP_METHODS = [None, 'simplex', 'interior-point']
16+
LP_METHODS = [None, 'simplex', 'interior-point', 'revised simplex']
1717

1818

1919
class TestPlayer_1opponent:

0 commit comments

Comments
 (0)