X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dunshire.git;a=blobdiff_plain;f=dunshire%2Fgames.py;h=c2ca68ea7faee4f751410a1dbf27c31517400d9f;hp=1f672abeb3870f45b13a8d9d169e8df0f1059d98;hb=aea70b13ddca62b0f6294083fd8130495d9a331e;hpb=c07958ae171cbe3a5dbbb72118cd7c7df3c42770 diff --git a/dunshire/games.py b/dunshire/games.py index 1f672ab..c2ca68e 100644 --- a/dunshire/games.py +++ b/dunshire/games.py @@ -12,8 +12,6 @@ from .matrices import append_col, append_row, condition_number, identity from . import options printing.options['dformat'] = options.FLOAT_FORMAT -solvers.options['show_progress'] = options.VERBOSE - class Solution: """ @@ -467,6 +465,8 @@ class SymmetricLinearGame: # Actually solve the thing and obtain a dictionary describing # what happened. try: + solvers.options['show_progress'] = options.VERBOSE + solvers.options['abs_tol'] = options.ABS_TOL soln_dict = solvers.conelp(c, self._G(), h, C.cvxopt_dims(), self._A(), b) except ValueError as e: @@ -511,7 +511,7 @@ class SymmetricLinearGame: # value could be under the true optimal by ``ABS_TOL`` # and the dual value could be over by the same amount. # - if abs(p1_value - p2_value) > 2*options.ABS_TOL: + if abs(p1_value - p2_value) > options.ABS_TOL: raise GameUnsolvableException(self, soln_dict) if (p1_optimal not in self._K) or (p2_optimal not in self._K): raise GameUnsolvableException(self, soln_dict)