JuliaPolyhedra / Polyhedra.jl

Polyhedral Computation Interface
Other
172 stars 27 forks source link

Undetected linearity with Clp #258

Closed blegat closed 2 years ago

blegat commented 3 years ago
julia> h = hrep([HalfSpace([-1.0], 0.0), HalfSpace([1.0], 0.0)])
H-representation Polyhedra.Intersection{Float64, Vector{Float64}, Int64}:
2-element iterator of HalfSpace{Float64, Vector{Float64}}:
 HalfSpace([-1.0], 0.0)
 HalfSpace([1.0], 0.0)

julia> detecthlinearity(h, GLPK.Optimizer)
H-representation Polyhedra.Intersection{Float64, Vector{Float64}, Int64}:
1-element iterator of HyperPlane{Float64, Vector{Float64}}:
 HyperPlane([-1.0], 0.0)

julia> detecthlinearity(h, Clp.Optimizer)
Coin0507I Presolve determined that the problem was infeasible with tolerance of 1e-08
Clp3003W Analysis indicates model infeasible or unbounded
Clp0006I 0  Obj 0 Primal inf 0.9999999 (1)
Clp0001I Primal infeasible - objective value 0
Clp0032I PrimalInfeasible objective 0 - 1 iterations time 0.002
H-representation Polyhedra.Intersection{Float64, Vector{Float64}, Int64}:
2-element iterator of HalfSpace{Float64, Vector{Float64}}:
 HalfSpace([-1.0], 0.0)
 HalfSpace([1.0], 0.0)
blegat commented 2 years ago

I can't reproduce it anymore

julia> detecthlinearity(h, Clp.Optimizer)
Coin0506I Presolve 0 (-3) rows, 0 (-2) columns and 0 (-4) elements
Clp3002W Empty problem - 0 rows, 0 columns and 0 elements
Clp0000I Optimal - objective value 0
Coin0511I After Postsolve, objective 0, infeasibilities - dual 0 (0), primal 0 (0)
Clp0032I Optimal objective 0 - 0 iterations time 0.002, Presolve 0.00
H-representation Polyhedra.Intersection{Float64, Vector{Float64}, Int64}:
1-element iterator of HyperPlane{Float64, Vector{Float64}}:
 HyperPlane([-1.0], 0.0)