# 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
# 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
# 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: