ReachabilityAnalysis.jl icon indicating copy to clipboard operation
ReachabilityAnalysis.jl copied to clipboard

MethodError with cartesian product in linear solver

Open mforets opened this issue 3 years ago • 0 comments

The following fails with the ClockedThermostat model:

#y = model(convert(Hyperrectangle, o["X0"] × Interval(0.0, 0.0)))
y = model(o["X0"] × Interval(0.0, 0.0))

sol′ = solve(y, T=10.0, alg=BOX(δ=0.01), fixpoint_check=false);
tspan(sol′)

MethodError: no method matching _overapproximate(::CartesianProduct{Float64,Interval{Float64,IntervalArithmetic.Interval{Float64}},Interval{Float64,IntervalArithmetic.Interval{Float64}}}, ::Type{HPolytope{Float64,Array{Float64,1}}})
Closest candidates are:
  _overapproximate(!Matched::Hyperrectangle, ::Type{var"#s21"} where var"#s21"<:HPolytope) at /home/mforets/.julia/dev/ReachabilityAnalysis/src/Flowpipes/setops.jl:459
  _overapproximate(!Matched::Hyperrectangle, ::Type{HPolytope{N,VT}}) where {N, VT} at /home/mforets/.julia/dev/ReachabilityAnalysis/src/Flowpipes/setops.jl:88
  _overapproximate(::LazySet{N}, !Matched::Type{var"#s21"} where var"#s21"<:Hyperrectangle) where N<:Real at /home/mforets/.julia/dev/ReachabilityAnalysis/src/Flowpipes/setops.jl:384
  ...

Stacktrace:
 [1] (::ReachabilityAnalysis.var"#244#245")(::Tuple{Int64,CartesianProduct{Float64,Interval{Float64,IntervalArithmetic.Interval{Float64}},Interval{Float64,IntervalArithmetic.Interval{Float64}}}}) at ./none:0
 [2] iterate at ./generator.jl:47 [inlined]
 [3] collect(::Base.Generator{Array{Tuple{Int64,CartesianProduct{Float64,Interval{Float64,IntervalArithmetic.Interval{Float64}},Interval{Float64,IntervalArithmetic.Interval{Float64}}}},1},ReachabilityAnalysis.var"#244#245"}) at ./array.jl:688
 [4] _distribute(::InitialValueProblem{HybridSystem{LightAutomaton{LightGraphs.SimpleGraphs.SimpleDiGraph{Int64},LightGraphs.SimpleGraphs.SimpleEdge{Int64}},ConstrainedAffineContinuousSystem{Float64,Array{Float64,2},Array{Float64,1},HalfSpace{Float64,Array{Float64,1}}},ConstrainedIdentityMap{HalfSpace{Float64,Array{Float64,1}}},AutonomousSwitching,Array{ConstrainedAffineContinuousSystem{Float64,Array{Float64,2},Array{Float64,1},HalfSpace{Float64,Array{Float64,1}}},1},Array{ConstrainedIdentityMap{HalfSpace{Float64,Array{Float64,1}}},1},Array{AutonomousSwitching,1}},Array{Tuple{Int64,CartesianProduct{Float64,Interval{Float64,IntervalArithmetic.Interval{Float64}},Interval{Float64,IntervalArithmetic.Interval{Float64}}}},1}}; intersection_method::HRepIntersection, check_invariant::Bool, intersect_invariant::Bool) at /home/mforets/.julia/dev/ReachabilityAnalysis/src/Hybrid/solve.jl:289
 [5] solve(::InitialValueProblem{HybridSystem{LightAutomaton{LightGraphs.SimpleGraphs.SimpleDiGraph{Int64},LightGraphs.SimpleGraphs.SimpleEdge{Int64}},ConstrainedAffineContinuousSystem{Float64,Array{Float64,2},Array{Float64,1},HalfSpace{Float64,Array{Float64,1}}},ConstrainedIdentityMap{HalfSpace{Float64,Array{Float64,1}}},AutonomousSwitching,Array{ConstrainedAffineContinuousSystem{Float64,Array{Float64,2},Array{Float64,1},HalfSpace{Float64,Array{Float64,1}}},1},Array{ConstrainedIdentityMap{HalfSpace{Float64,Array{Float64,1}}},1},Array{AutonomousSwitching,1}},Array{Tuple{Int64,CartesianProduct{Float64,Interval{Float64,IntervalArithmetic.Interval{Float64}},Interval{Float64,IntervalArithmetic.Interval{Float64}}}},1}}; max_jumps::Int64, intersection_method::HRepIntersection, clustering_method::BoxClustering{Missing,Missing}, check_invariant_initial_states::Bool, intersect_invariant_initial_states::Bool, intersection_source_invariant_method::FallbackIntersection, first_mode_representative::Bool, intersect_source_invariant::Bool, disjointness_method::NoEnclosure, fixpoint_check::Bool, kwargs::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:T, :alg),Tuple{Float64,BOX{Float64,Forward{Val{:base},Val{:lazy},Val{:concrete}},Val{false},Missing,Val{false}}}}}) at /home/mforets/.julia/dev/ReachabilityAnalysis/src/Hybrid/solve.jl:22
 [6] top-level scope at In[41]:4
 [7] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091

mforets avatar Sep 01 '20 19:09 mforets