From 9028e5ce5502956aafdfcaf6956349c61d6094cf Mon Sep 17 00:00:00 2001 From: schillic Date: Wed, 15 Jan 2020 09:08:21 +0100 Subject: [PATCH] rename CacheMinkowskiSum --- src/ReachSets/ContinuousPost/BFFPS19/reach.jl | 9 +++------ src/ReachSets/ContinuousPost/BFFPSV18/check_property.jl | 8 +++----- src/ReachSets/ContinuousPost/BFFPSV18/reach.jl | 9 +++------ test/Reachability/solve_continuous.jl | 5 +++++ 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/ReachSets/ContinuousPost/BFFPS19/reach.jl b/src/ReachSets/ContinuousPost/BFFPS19/reach.jl index 69f5d2f5..32dc91a5 100644 --- a/src/ReachSets/ContinuousPost/BFFPS19/reach.jl +++ b/src/ReachSets/ContinuousPost/BFFPS19/reach.jl @@ -1,8 +1,5 @@ using ..Utils: LDS, CLCDS -using LazySets: CacheMinkowskiSum, - isdisjoint - import LazySets.Approximations: overapproximate """ @@ -140,10 +137,10 @@ function reach_mixed(problem::Union{IVP{<:CLDS{NUM}, <:LazySet{NUM}}, # first set in a series function _f(k, i, x::LinearMap{NUM}) where {NUM} @assert k == 1 "a LinearMap is only expected in the first iteration" - return CacheMinkowskiSum(LazySet{NUM}[x]) + return CachedMinkowskiSumArray(LazySet{NUM}[x]) end # further sets of the series - function _f(k, i, x::MinkowskiSum{NUM, <:CacheMinkowskiSum}) where NUM + function _f(k, i, x::MinkowskiSum{NUM, <:CachedMinkowskiSumArray}) where NUM if has_constant_directions(block_options_iter, i) # forget sets if we do not use epsilon-close approximation forget_sets!(x.X) @@ -152,7 +149,7 @@ function reach_mixed(problem::Union{IVP{<:CLDS{NUM}, <:LazySet{NUM}}, if lazy_inputs_interval(k) # overapproximate lazy set y = overapproximate_fun(i, x.X) - return CacheMinkowskiSum(LazySet{NUM}[y]) + return CachedMinkowskiSumArray(LazySet{NUM}[y]) end return x.X end diff --git a/src/ReachSets/ContinuousPost/BFFPSV18/check_property.jl b/src/ReachSets/ContinuousPost/BFFPSV18/check_property.jl index 1d392843..403da9d8 100644 --- a/src/ReachSets/ContinuousPost/BFFPSV18/check_property.jl +++ b/src/ReachSets/ContinuousPost/BFFPSV18/check_property.jl @@ -1,5 +1,3 @@ -using LazySets: CacheMinkowskiSum - """ check_property(S, property, options) @@ -92,10 +90,10 @@ function check_property(S::IVP{<:AbstractDiscreteSystem}, # first set in a series function _f(k, i, x::LinearMap{NUM}) where {NUM} @assert k == 1 "a LinearMap is only expected in the first iteration" - return CacheMinkowskiSum(LazySet{NUM}[x]) + return CachedMinkowskiSumArray(LazySet{NUM}[x]) end # further sets of the series - function _f(k, i, x::MinkowskiSum{NUM, <:CacheMinkowskiSum}) where NUM + function _f(k, i, x::MinkowskiSum{NUM, <:CachedMinkowskiSumArray}) where NUM if has_constant_directions(block_options_iter, i) # forget sets if we do not use epsilon-close approximation forget_sets!(x.X) @@ -104,7 +102,7 @@ function check_property(S::IVP{<:AbstractDiscreteSystem}, if lazy_inputs_interval(k) # overapproximate lazy set y = overapproximate_fun(i, x.X) - return CacheMinkowskiSum(LazySet{NUM}[y]) + return CachedMinkowskiSumArray(LazySet{NUM}[y]) end return x.X end diff --git a/src/ReachSets/ContinuousPost/BFFPSV18/reach.jl b/src/ReachSets/ContinuousPost/BFFPSV18/reach.jl index 05032832..be9985d0 100644 --- a/src/ReachSets/ContinuousPost/BFFPSV18/reach.jl +++ b/src/ReachSets/ContinuousPost/BFFPSV18/reach.jl @@ -1,8 +1,5 @@ using ..Utils: LDS, CLCDS -using LazySets: CacheMinkowskiSum, - isdisjoint - import LazySets.Approximations: overapproximate """ @@ -120,10 +117,10 @@ function reach(problem::Union{IVP{<:CLDS{NUM}, <:LazySet{NUM}}, # first set in a series function _f(k, i, x::LinearMap{NUM}) where {NUM} @assert k == 1 "a LinearMap is only expected in the first iteration" - return CacheMinkowskiSum(LazySet{NUM}[x]) + return CachedMinkowskiSumArray(LazySet{NUM}[x]) end # further sets of the series - function _f(k, i, x::MinkowskiSum{NUM, <:CacheMinkowskiSum}) where NUM + function _f(k, i, x::MinkowskiSum{NUM, <:CachedMinkowskiSumArray}) where NUM if has_constant_directions(block_options_iter, i) # forget sets if we do not use epsilon-close approximation forget_sets!(x.X) @@ -132,7 +129,7 @@ function reach(problem::Union{IVP{<:CLDS{NUM}, <:LazySet{NUM}}, if lazy_inputs_interval(k) # overapproximate lazy set y = overapproximate_fun(i, x.X) - return CacheMinkowskiSum(LazySet{NUM}[y]) + return CachedMinkowskiSumArray(LazySet{NUM}[y]) end return x.X end diff --git a/test/Reachability/solve_continuous.jl b/test/Reachability/solve_continuous.jl index 743b3a8f..8db0cf7d 100644 --- a/test/Reachability/solve_continuous.jl +++ b/test/Reachability/solve_continuous.jl @@ -106,6 +106,11 @@ s = solve(IVP(LCS(sparse(A)), X0), op=BFFPSV18(:vars=>[1,3], :partition=>[1:2, 3:4], :exp_method=>"lazy", :assume_sparse=>true)) +s = solve(IVP(LCS(A), X0), + Options(:T=>0.1), + op=BFFPSV18(:vars=>[1,3], :partition=>[1:2, 3:4], + :lazy_inputs_interval => (k -> false))) + # uses Interval for set_type_init and set_type_iter but Hyperrectangle for # set_type_proj s = solve(IVP(LCS(sparse(A)), X0),