X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dunshire.git;a=blobdiff_plain;f=dunshire%2Fgames.py;h=ff3ec0001b4c3508ceef2c43afb6d13ffb7d403f;hp=437b53336ab5791cbf010ff15aa5f78509ea57c0;hb=428ef4a28dc25409df02f6af024043c21307a646;hpb=9112e34b6ce9e082ec0277f7528b342baff2ccfe diff --git a/dunshire/games.py b/dunshire/games.py index 437b533..ff3ec00 100644 --- a/dunshire/games.py +++ b/dunshire/games.py @@ -939,6 +939,7 @@ class SymmetricLinearGame: # Oops, CVXOPT tried to take the square root of a # negative number. Report some details about the game # rather than just the underlying CVXOPT crash. + printing.options['dformat'] = options.DEBUG_FLOAT_FORMAT raise PoorScalingException(self) else: raise error @@ -963,6 +964,7 @@ class SymmetricLinearGame: # that CVXOPT is convinced the problem is infeasible (and that # cannot happen). if soln_dict['status'] in ['primal infeasible', 'dual infeasible']: + printing.options['dformat'] = options.DEBUG_FLOAT_FORMAT raise GameUnsolvableException(self, soln_dict) # The "optimal" and "unknown" results, we actually treat the @@ -976,11 +978,13 @@ class SymmetricLinearGame: # it) because otherwise CVXOPT might return "unknown" and give # us two points in the cone that are nowhere near optimal. if abs(p1_value - p2_value) > 2*options.ABS_TOL: + printing.options['dformat'] = options.DEBUG_FLOAT_FORMAT raise GameUnsolvableException(self, soln_dict) # And we also check that the points it gave us belong to the # cone, just in case... if (p1_optimal not in self._K) or (p2_optimal not in self._K): + printing.options['dformat'] = options.DEBUG_FLOAT_FORMAT raise GameUnsolvableException(self, soln_dict) # For the game value, we could use any of: