mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Primal: Add tolerance in binary check
This commit is contained in:
@@ -280,7 +280,7 @@ class PrimalSolutionComponent(Component):
|
|||||||
assert solution is not None
|
assert solution is not None
|
||||||
opt_value = solution[var][idx]
|
opt_value = solution[var][idx]
|
||||||
assert opt_value is not None
|
assert opt_value is not None
|
||||||
assert 0.0 <= opt_value <= 1.0, (
|
assert 0.0 - 1e-5 <= opt_value <= 1.0 + 1e-5, (
|
||||||
f"Variable {var} has non-binary value {opt_value} in the optimal solution. "
|
f"Variable {var} has non-binary value {opt_value} in the optimal solution. "
|
||||||
f"Predicting values of non-binary variables is not currently supported. "
|
f"Predicting values of non-binary variables is not currently supported. "
|
||||||
f"Please set its category to None."
|
f"Please set its category to None."
|
||||||
|
|||||||
Reference in New Issue
Block a user