From c16aeb16cb70aeba72d574d5f08cf76d56e7b98f Mon Sep 17 00:00:00 2001 From: schillic Date: Sun, 27 Aug 2023 16:36:54 +0200 Subject: [PATCH] update to LazySets v2.11 --- Project.toml | 2 +- src/Algorithms/INT/INT.jl | 4 ++-- src/Algorithms/INT/reach_homog.jl | 8 ++++---- src/Algorithms/INT/reach_inhomog.jl | 8 ++++---- src/Algorithms/QINT/QINT.jl | 4 ++-- src/Algorithms/QINT/reach_homog.jl | 2 +- src/Continuous/normalization.jl | 2 +- src/Discretization/Forward.jl | 2 +- src/Flowpipes/Flowpipe.jl | 2 +- test/algorithms/BFFPSV18.jl | 6 +++--- test/algorithms/INT.jl | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Project.toml b/Project.toml index 73c60e353f..b8ce186a20 100644 --- a/Project.toml +++ b/Project.toml @@ -31,7 +31,7 @@ ExprTools = "0.1" HybridSystems = "0.4" IntervalArithmetic = "0.16 - 0.20" IntervalMatrices = "0.6 - 0.8" -LazySets = "2.7.5" +LazySets = "2.11" MathematicalSystems = "0.11 - 0.13" Parameters = "0.10 - 0.12" ReachabilityBase = "0.1, 0.2" diff --git a/src/Algorithms/INT/INT.jl b/src/Algorithms/INT/INT.jl index 8652a4ff5b..0932c4b624 100644 --- a/src/Algorithms/INT/INT.jl +++ b/src/Algorithms/INT/INT.jl @@ -53,8 +53,8 @@ end step_size(alg::INT) = alg.δ numtype(::INT{N}) where {N} = N -setrep(::INT{N}) where {N} = Interval{N,IA.Interval{N}} -rsetrep(::INT{N}) where {N} = ReachSet{N,Interval{N,IA.Interval{N}}} +setrep(::INT{N}) where {N} = Interval{N} +rsetrep(::INT{N}) where {N} = ReachSet{N,Interval{N}} include("post.jl") include("reach_homog.jl") diff --git a/src/Algorithms/INT/reach_homog.jl b/src/Algorithms/INT/reach_homog.jl index 1fa5e65c7c..d3811c44e9 100644 --- a/src/Algorithms/INT/reach_homog.jl +++ b/src/Algorithms/INT/reach_homog.jl @@ -3,8 +3,8 @@ # ================ # homogeneous case; no invariant; recursive implementation -function reach_homog_INT!(F::Vector{ReachSet{N,Interval{N,IA.Interval{N}}}}, - Ω0::Interval{N,IA.Interval{N}}, +function reach_homog_INT!(F::Vector{ReachSet{N,Interval{N}}}, + Ω0::Interval{N}, Φ::N, NSTEPS::Integer, δ::Float64, @@ -25,8 +25,8 @@ function reach_homog_INT!(F::Vector{ReachSet{N,Interval{N,IA.Interval{N}}}}, end # homogeneous case; with invariant; recursive implementation -function reach_homog_INT!(F::Vector{ReachSet{N,Interval{N,IA.Interval{N}}}}, - Ω0::Interval{N,IA.Interval{N}}, +function reach_homog_INT!(F::Vector{ReachSet{N,Interval{N}}}, + Ω0::Interval{N}, Φ::N, NSTEPS::Integer, δ::Float64, diff --git a/src/Algorithms/INT/reach_inhomog.jl b/src/Algorithms/INT/reach_inhomog.jl index 9c555e46a4..6761dfb790 100644 --- a/src/Algorithms/INT/reach_inhomog.jl +++ b/src/Algorithms/INT/reach_inhomog.jl @@ -3,8 +3,8 @@ # =================== # inhomogeneous case; no invariant; recursive implementation -function reach_inhomog_INT!(F::Vector{ReachSet{N,Interval{N,IA.Interval{N}}}}, - Ω0::Interval{N,IA.Interval{N}}, +function reach_inhomog_INT!(F::Vector{ReachSet{N,Interval{N}}}, + Ω0::Interval{N}, Φ::N, NSTEPS::Integer, δ::Float64, @@ -27,8 +27,8 @@ function reach_inhomog_INT!(F::Vector{ReachSet{N,Interval{N,IA.Interval{N}}}}, end # inhomogeneous case; with invariant; recursive implementation -function reach_inhomog_INT!(F::Vector{ReachSet{N,Interval{N,IA.Interval{N}}}}, - Ω0::Interval{N,IA.Interval{N}}, +function reach_inhomog_INT!(F::Vector{ReachSet{N,Interval{N}}}, + Ω0::Interval{N}, Φ::N, NSTEPS::Integer, δ::Float64, diff --git a/src/Algorithms/QINT/QINT.jl b/src/Algorithms/QINT/QINT.jl index 6944441c6b..c94fb5aa76 100644 --- a/src/Algorithms/QINT/QINT.jl +++ b/src/Algorithms/QINT/QINT.jl @@ -31,8 +31,8 @@ end step_size(alg::QINT) = alg.δ numtype(::QINT{N}) where {N} = N -setrep(::QINT{N}) where {N} = Interval{N,IA.Interval{N}} -rsetrep(::QINT{N}) where {N} = ReachSet{N,Interval{N,IA.Interval{N}}} +setrep(::QINT{N}) where {N} = Interval{N} +rsetrep(::QINT{N}) where {N} = ReachSet{N,Interval{N}} include("post.jl") include("reach_homog.jl") diff --git a/src/Algorithms/QINT/reach_homog.jl b/src/Algorithms/QINT/reach_homog.jl index d56f5c07c8..aa25db8ae6 100644 --- a/src/Algorithms/QINT/reach_homog.jl +++ b/src/Algorithms/QINT/reach_homog.jl @@ -21,7 +21,7 @@ function reach_homog_QINT(; a, b, c, # right-hand side: f(x) = ax^2 + bx + c maxiter) where {N} # total flowpipe - RT = ReachSet{N,Interval{N,IA.Interval{N}}} + RT = ReachSet{N,Interval{N}} VRT = Vector{RT} FT = Flowpipe{N,RT,VRT} Ftot = Vector{FT}() diff --git a/src/Continuous/normalization.jl b/src/Continuous/normalization.jl index 6e2d7d8e17..668be6b2e9 100644 --- a/src/Continuous/normalization.jl +++ b/src/Continuous/normalization.jl @@ -395,7 +395,7 @@ for (CAC_S, CLC_S) in ((:CACCS, :CLCCS), (:CACDS, :CLCDS)) end # fix type inference -function _normalize(ivp::IVP{LCS{N,IdentityMultiple{N}},Interval{N,IA.Interval{N}}}) where {N} +function _normalize(ivp::IVP{LCS{N,IdentityMultiple{N}},Interval{N}}) where {N} return IVP(CLCS(ivp.s.A, Universe(1)), ivp.x0) end diff --git a/src/Discretization/Forward.jl b/src/Discretization/Forward.jl index 068ef70fb4..4dfb736fe4 100644 --- a/src/Discretization/Forward.jl +++ b/src/Discretization/Forward.jl @@ -77,7 +77,7 @@ function discretize(ivp::IVP{<:CLCS,<:LazySet}, δ, alg::Forward) return InitialValueProblem(Sdis, Ω0) end -function discretize(ivp::IVP{<:CLCS,Interval{N,IA.Interval{N}}}, δ, alg::Forward) where {N} +function discretize(ivp::IVP{<:CLCS,Interval{N}}, δ, alg::Forward) where {N} A = state_matrix(ivp) @assert size(A, 1) == 1 X0 = initial_state(ivp) diff --git a/src/Flowpipes/Flowpipe.jl b/src/Flowpipes/Flowpipe.jl index eb1e683180..bad2ae72f8 100644 --- a/src/Flowpipes/Flowpipe.jl +++ b/src/Flowpipes/Flowpipe.jl @@ -327,7 +327,7 @@ function flatten(fp::Flowpipe{N,<:TemplateReachSet}, rows=(1, 2)) where {N} idx_pos_dir = rows[1] idx_neg_dir = rows[2] - RT = ReachSet{N,Interval{N,IA.Interval{N}}} + RT = ReachSet{N,Interval{N}} out = Vector{RT}(undef, length(fp)) @inbounds for (k, Rk) in enumerate(fp) diff --git a/test/algorithms/BFFPSV18.jl b/test/algorithms/BFFPSV18.jl index 410bc6527e..654952aedb 100644 --- a/test/algorithms/BFFPSV18.jl +++ b/test/algorithms/BFFPSV18.jl @@ -6,7 +6,7 @@ @test alg.block_indices == [2] @test alg.row_blocks == [[2]] @test alg.column_blocks == [[1], [2], [3], [4]] - @test setrep(alg) == Interval{Float64,IA.Interval{Float64}} + @test setrep(alg) == Interval{Float64} # interval (1D) decomposition, one variable, without explicitly passing Interval alg = BFFPSV18(; δ=1e-3, vars=[2], dim=4) @@ -14,7 +14,7 @@ @test alg.block_indices == [2] @test alg.row_blocks == [[2]] @test alg.column_blocks == [[1], [2], [3], [4]] - @test setrep(alg) == Interval{Float64,IA.Interval{Float64}} + @test setrep(alg) == Interval{Float64} # interval (1D) decomposition, two variables alg = BFFPSV18(; δ=1e-3, vars=[1, 4], dim=4) @@ -22,7 +22,7 @@ @test alg.block_indices == [1, 4] @test alg.row_blocks == [[1], [4]] @test alg.column_blocks == [[1], [2], [3], [4]] - @test setrep(alg) == Interval{Float64,IA.Interval{Float64}} + @test setrep(alg) == Interval{Float64} # hyperrectangle decomposition alg = BFFPSV18(; δ=1e-3, setrep=Hyperrectangle, vars=[3], partition=[[1], [2, 3, 4]]) diff --git a/test/algorithms/INT.jl b/test/algorithms/INT.jl index 4dce032f29..770cc25bf6 100644 --- a/test/algorithms/INT.jl +++ b/test/algorithms/INT.jl @@ -5,7 +5,7 @@ @test dim(sol) == 1 @test length(sol) == 100 @test setrep(sol) <: Interval - @test setrep(sol) == Interval{Float64,IA.Interval{Float64}} + @test setrep(sol) == Interval{Float64} prob, tspan = exponential_1d(; invariant=HalfSpace([-1.0], -0.3)) # x >= 0.3 sol_inv = solve(prob; tspan=tspan, alg=INT(; δ=0.01))