summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c07958a)
Our ABS_TOL is less than the CVXOPT default, and it looks like using
ours reduces the number of "unknown" results that we get. So let's try
that for now.
from . import options
printing.options['dformat'] = options.FLOAT_FORMAT
from . import options
printing.options['dformat'] = options.FLOAT_FORMAT
-solvers.options['show_progress'] = options.VERBOSE
-
# Actually solve the thing and obtain a dictionary describing
# what happened.
try:
# 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:
soln_dict = solvers.conelp(c, self._G(), h,
C.cvxopt_dims(), self._A(), b)
except ValueError as e:
# value could be under the true optimal by ``ABS_TOL``
# and the dual value could be over by the same amount.
#
# 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)
raise GameUnsolvableException(self, soln_dict)
if (p1_optimal not in self._K) or (p2_optimal not in self._K):
raise GameUnsolvableException(self, soln_dict)