I even did Pkg.update() to ensure i have the latest versions, but still get t
using LazySets, Makie, Polyhedra
LazySets.plot3d(10. * rand(Hyperrectangle, dim=3))
MethodError: no method matching iterate(::Polyhedra.Mesh{3,Float64,DefaultPolyhedron{Float64,MixedMatHRep{Float64,Array{Float64,2}},MixedMatVRep{Float64,Array{Float64,2}}}})
Closest candidates are:
iterate(!Matched::MutableArithmetics.Zero) at C:\Users\<USER>\.julia\packages\MutableArithmetics\NuiNA\src\rewrite.jl:78
iterate(!Matched::MutableArithmetics.Zero, !Matched::Nothing) at C:\Users\<USER>\.julia\packages\MutableArithmetics\NuiNA\src\rewrite.jl:79
iterate(!Matched::DataStructures.TrieIterator) at C:\Users\<USER>\.julia\packages\DataStructures\DLSxi\src\trie.jl:112
xref: https://github.com/JuliaReach/LazySets.jl/issues/2496
The code works for me (see below; I also wrote @time to measure the “time-to-first-plot”). Maybe it is an issue related to your installed versions? Can you please try
julia> using Pkg; Pkg.status(["LazySets", "Makie", "Polyhedra"])
Status `~/.julia/environments/v1.5/Project.toml`
[b4f0291d] LazySets v1.38.0 `~/.julia/dev/LazySets`
[ee78f7c6] Makie v0.11.2
[67491407] Polyhedra v0.6.11
julia> @time using LazySets, Makie, Polyhedra
26.437159 seconds (47.59 M allocations: 2.562 GiB, 3.76% gc time)
julia> @time LazySets.plot3d(10. * rand(Hyperrectangle, dim=3))
glp_simplex: unable to recover undefined or non-optimal solution
34.541621 seconds (76.54 M allocations: 4.091 GiB, 3.09% gc time)
julia> @time LazySets.plot3d(10. * rand(Hyperrectangle, dim=3))
0.020464 seconds (71.35 k allocations: 2.947 MiB)
1 Like
thanks, here’s what i get, only Polyhedra is of different version at my end - will get the v6.11 and post results again
Pkg.status(["LazySets", "Makie", "Polyhedra"])
@time using LazySets, Makie, Polyhedra
@time LazySets.plot3d(10. * rand(Hyperrectangle, dim=3))
Status `C:\Users\<user>\.julia\environments\v1.5\Project.toml`
[b4f0291d] LazySets v1.38.0
[ee78f7c6] Makie v0.11.1
[67491407] Polyhedra v0.6.12
0.008659 seconds (1.89 k allocations: 114.547 KiB)
MethodError: no method matching iterate(::Polyhedra.Mesh{3,Float64,DefaultPolyhedron{Float64,MixedMatHRep{Float64,Array{Float64,2}},MixedMatVRep{Float64,Array{Float64,2}}}})
Closest candidates are:
iterate(!Matched::MutableArithmetics.Zero) at C:\Users\Ashish.Madkaikar\.julia\packages\MutableArithmetics\NuiNA\src\rewrite.jl:78
iterate(!Matched::MutableArithmetics.Zero, !Matched::Nothing) at C:\Users\Ashish.Madkaikar\.julia\packages\MutableArithmetics\NuiNA\src\rewrite.jl:79
iterate(!Matched::DataStructures.TrieIterator) at C:\Users\Ashish.Madkaikar\.julia\packages\DataStructures\DLSxi\src\trie.jl:112
LazySets.plot3d (see definition here) calls Polyhedra’s mesh
. Did you try plotting commands from Polyhedra directly? E.g. all the examples in the section 3D Plotting with Plots.