Skip to content

Commit 30d5815

Browse files
author
Release Manager
committed
Trac #34717: Check the presence of lrsnash for obtain_nash()
To fix failures like {{{ File "src/sage/game_theory/catalog_normal_form_games.py", line 916, in sage.game_theory.catalog_normal_form_games.TravellersDilemma Failed example: g.obtain_nash() Exception raised: Traceback (most recent call last): File "/Users/kwankyu/GitHub/sage-dev/src/sage/doctest/forker.py", line 695, in _run self.compile_and_execute(example, compiler, test.globs) File "/Users/kwankyu/GitHub/sage-dev/src/sage/doctest/forker.py", line 1093, in compile_and_execute exec(compiled, globs) File "<doctest sage.game_theory.catalog_normal_form_games.TravellersDilemma[8]>", line 1, in <module> g.obtain_nash() File "/Users/kwankyu/GitHub/sage- dev/src/sage/game_theory/normal_form_game.py", line 1688, in obtain_nash return self._solve_lrs(maximization) File "/Users/kwankyu/GitHub/sage- dev/src/sage/game_theory/normal_form_game.py", line 1758, in _solve_lrs LrsNash().require() File "/Users/kwankyu/GitHub/sage- dev/src/sage/features/__init__.py", line 209, in require raise FeatureNotPresentError(self, presence.reason, presence.resolution) sage.features.FeatureNotPresentError: lrsnash is not available. Executable 'lrsnash' not found on PATH. No equivalent system packages for homebrew are known to Sage. To install lrsnash using the Sage package manager, you can try to run: !sage -i lrslib No equivalent system packages for pip are known to Sage. Further installation instructions might be available at http://cgm.cs.mcgill.ca/~avis/C/lrs.html. }}} I have been seeing these failures for a long time on my system (mac os). URL: https://trac.sagemath.org/34717 Reported by: klee Ticket author(s): Matthias Koeppe Reviewer(s): Kwankyu Lee
2 parents c729945 + 4a11843 commit 30d5815

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=9816c00fcfc3ba11d0a9b61033df4915a15ccf0b
3-
md5=dff4e185544cf5dd1f2bbeb4f4761cbf
4-
cksum=655542759
2+
sha1=c39297a2d58601cfa6baa9045140c3485ee9ffab
3+
md5=534693f57e442ff0cd9e4cfbc4768ebc
4+
cksum=82888323
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0e1a60596d521bf69572e1484066f4015749735e
1+
2c3a4cef8d3ce703174c93a92ed0efcbecdd36ba

src/sage/game_theory/normal_form_game.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,17 +1674,17 @@ def obtain_nash(self, algorithm=False, maximization=True, solver=None):
16741674
if not self._is_complete():
16751675
raise ValueError("utilities have not been populated")
16761676

1677-
from sage.features.lrs import Lrs
1677+
from sage.features.lrs import LrsNash
16781678
if not algorithm:
16791679
if self.is_constant_sum():
16801680
algorithm = "lp"
1681-
elif Lrs().is_present():
1681+
elif LrsNash().is_present():
16821682
algorithm = "lrs"
16831683
else:
16841684
algorithm = "enumeration"
16851685

16861686
if algorithm == "lrs":
1687-
Lrs().require()
1687+
LrsNash().require()
16881688
return self._solve_lrs(maximization)
16891689

16901690
if algorithm == "LCP":

0 commit comments

Comments
 (0)