Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No method matching sethrep!(::CDDLib.Polyhedron, ::CDDInequalityMatrix) #73

Closed
schillic opened this issue Apr 5, 2022 · 2 comments · Fixed by JuliaPolyhedra/Polyhedra.jl#302 or #74

Comments

@schillic
Copy link

schillic commented Apr 5, 2022

After JuliaPolyhedra/Polyhedra.jl#298 I reach another problem (maybe this should rather be reported in CDDLib, not sure).

(@v1.7) pkg> status Polyhedra CDDLib
      Status `~/.julia/environments/v1.7/Project.toml`
  [3391f64e] CDDLib v0.9.0
  [67491407] Polyhedra v0.7.4

julia> using Polyhedra, CDDLib

julia> Q = polyhedron(vrep([[1.0]]), CDDLib.Library());

julia> removevredundancy!(Q; ztol=1e-7)

ERROR: MethodError: no method matching sethrep!(::CDDLib.Polyhedron{Float64}, ::CDDInequalityMatrix{Float64, Float64})
Closest candidates are:
  sethrep!(::Any, ::Any, ::Any) at ~/.julia/packages/Polyhedra/3AInN/src/defaultlibrary.jl:115
  sethrep!(::Interval, ::HRep) at ~/.julia/packages/Polyhedra/3AInN/src/interval.jl:207
  sethrep!(::DefaultPolyhedron, ::HRepresentation) at ~/.julia/packages/Polyhedra/3AInN/src/defaultlibrary.jl:120
  ...
Stacktrace:
 [1] sethrep!(p::CDDLib.Polyhedron{Float64}, h::CDDInequalityMatrix{Float64, Float64}, red::Redundancy)
   @ Polyhedra ~/.julia/packages/Polyhedra/3AInN/src/defaultlibrary.jl:115
 [2] detecthlinearity!(p::CDDLib.Polyhedron{Float64}, solver::Type; kws::Base.Pairs{Symbol, Float64, Tuple{Symbol}, NamedTuple{(:ztol,), Tuple{Float64}}})
   @ Polyhedra ~/.julia/packages/Polyhedra/3AInN/src/linearity.jl:37
 [3] removevredundancy!(p::CDDLib.Polyhedron{Float64}; strongly::Bool, planar::Bool, kws::Base.Pairs{Symbol, Float64, Tuple{Symbol}, NamedTuple{(:ztol,), Tuple{Float64}}})
   @ Polyhedra ~/.julia/packages/Polyhedra/3AInN/src/redundancy.jl:159
@blegat
Copy link
Member

blegat commented Apr 5, 2022

That's because ztol is not supported here:

function Polyhedra.detecthlinearity!(p::Polyhedron{T}, solver::Type{<:Optimizer}=Optimizer{T}) where T

As CDDLib does not need any ztol, we should just ignore it.

@blegat blegat transferred this issue from JuliaPolyhedra/Polyhedra.jl Apr 7, 2022
@blegat blegat reopened this Apr 7, 2022
@blegat
Copy link
Member

blegat commented Apr 7, 2022

CDDLib should now be failing the new test added in JuliaPolyhedra/Polyhedra.jl#302

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants