Closed LilithHafner closed 2 months ago
This is expected behavior that we won't be fixing.
Solvers, even when they have "binary" variables in fact solve in double precision with a tolerance (the HiGHS default is 1e-6), so anything in [N - tol, N + tol]
is considered "integer" when N
is an integer.
Note that, in most cases you can round the solution to recover integrality, but in some cases, the rounded solution may violate your constraints by more than the primal feasibility tolerance.
I've opened a PR to clarify the docs: https://github.com/jump-dev/JuMP.jl/pull/3794
The output here should be a BitMatrix, or, if you care about type stability, which is quite reasonable, a
Matrix{Float64}
with entries0.0
and1.0
. Some stray-0.0
s aren't "wrong" in the sense that-0.0 == 0.0
, but unless they convey some meaningful information that sign bit should be normalized to0.0
: