Skip to content

Commit

Permalink
fix namespace conflict with TaylorSeries
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Aug 14, 2019
1 parent 2673c7e commit 1e5b9bb
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
1 change: 0 additions & 1 deletion src/ReachSets/ContinuousPost/BFFPS19/reach.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ using LazySets: CacheMinkowskiSum,
isdisjoint

import LazySets.Approximations: overapproximate
import ProgressMeter: update!

"""
combine_cpas(cpa1::CartesianProductArray{N, S}, cpa2::CartesianProductArray{N, S},
Expand Down
8 changes: 4 additions & 4 deletions src/ReachSets/ContinuousPost/BFFPS19/reach_blocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function reach_blocks!(ϕ::SparseMatrixCSC{NUM, Int},
progress_meter::Union{Progress, Nothing},
res::Vector{<:ReachSet}
)::Tuple{Int, Bool} where {NUM}
update!(progress_meter, 1)
ProgressMeter.update!(progress_meter, 1)
array = CartesianProductArray(Xhat0[blocks])
X_store = (output_function == nothing) ?
array :
Expand Down Expand Up @@ -126,7 +126,7 @@ function reach_blocks!(ϕ::SparseMatrixCSC{NUM, Int},

k = 2
@inbounds while true
update!(progress_meter, k)
ProgressMeter.update!(progress_meter, k)
X_store = deco_post_sparse(b, blocks, Whatk_blocks, partition,
ϕpowerk, Xhatk, Xhat0, output_function, overapproximate)

Expand Down Expand Up @@ -189,7 +189,7 @@ function reach_blocks!(ϕ::AbstractMatrix{NUM},
progress_meter::Union{Progress, Nothing},
res::Vector{<:ReachSet}
)::Tuple{Int, Bool} where {NUM}
update!(progress_meter, 1)
ProgressMeter.update!(progress_meter, 1)
array = CartesianProductArray(Xhat0[blocks])
X_store = (output_function == nothing) ?
array :
Expand Down Expand Up @@ -237,7 +237,7 @@ function reach_blocks!(ϕ::AbstractMatrix{NUM},
arr = Vector{LazySet{NUM}}(undef, arr_length)
k = 2
@inbounds while true
update!(progress_meter, k)
ProgressMeter.update!(progress_meter, k)
X_store = deco_post_dense(b, blocks, Whatk_blocks, partition, ϕpowerk,
arr, arr_length, U, Xhat0, Xhatk, output_function, overapproximate)
t0 = t1
Expand Down
16 changes: 8 additions & 8 deletions src/ReachSets/ContinuousPost/BFFPSV18/check_blocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function check_blocks(ϕ::SparseMatrixCSC{NUM, Int},
prop::Property,
progress_meter::Union{Progress, Nothing}
)::Int where {NUM}
update!(progress_meter, 1)
ProgressMeter.update!(progress_meter, 1)
violation_index = 0
if !check(prop, CartesianProductArray(Xhat0[blocks]))
if eager_checking
Expand All @@ -62,7 +62,7 @@ function check_blocks(ϕ::SparseMatrixCSC{NUM, Int},

k = 2
@inbounds while true
update!(progress_meter, k)
ProgressMeter.update!(progress_meter, k)
for i in 1:b
bi = partition[blocks[i]]
Xhatk_bi = ZeroSet(length(bi))
Expand Down Expand Up @@ -114,7 +114,7 @@ function check_blocks(ϕ::AbstractMatrix{NUM},
prop::Property,
progress_meter::Union{Progress, Nothing}
)::Int where {NUM}
update!(progress_meter, 1)
ProgressMeter.update!(progress_meter, 1)
violation_index = 0
if !check(prop, CartesianProductArray(Xhat0[blocks]))
if eager_checking
Expand Down Expand Up @@ -142,7 +142,7 @@ function check_blocks(ϕ::AbstractMatrix{NUM},
arr_length = (U == nothing) ? length(partition) : length(partition) + 1
k = 2
@inbounds while true
update!(progress_meter, k)
ProgressMeter.update!(progress_meter, k)
for i in 1:b
bi = partition[blocks[i]]
arr = Vector{LazySet{NUM}}(undef, arr_length)
Expand Down Expand Up @@ -196,7 +196,7 @@ function check_blocks(ϕ::SparseMatrixExp{NUM},
prop::Property,
progress_meter::Union{Progress, Nothing}
)::Int where {NUM}
update!(progress_meter, 1)
ProgressMeter.update!(progress_meter, 1)
violation_index = 0
if !check(prop, CartesianProductArray(Xhat0[blocks]))
if eager_checking
Expand All @@ -222,7 +222,7 @@ function check_blocks(ϕ::SparseMatrixExp{NUM},

k = 2
@inbounds while true
update!(progress_meter, k)
ProgressMeter.update!(progress_meter, k)
for i in 1:b
bi = partition[blocks[i]]
ϕpowerk_πbi = row(ϕpowerk, bi)
Expand Down Expand Up @@ -272,7 +272,7 @@ function check_blocks(ϕ::SparseMatrixExp{NUM},
prop::Property,
progress_meter::Union{Progress, Nothing}
)::Int where {NUM}
update!(progress_meter, 1)
ProgressMeter.update!(progress_meter, 1)
violation_index = 0
if !check(prop, CartesianProductArray(Xhat0[blocks]))
if eager_checking
Expand All @@ -299,7 +299,7 @@ function check_blocks(ϕ::SparseMatrixExp{NUM},
arr_length = (U == nothing) ? length(partition) : length(partition) + 1
k = 2
@inbounds while true
update!(progress_meter, k)
ProgressMeter.update!(progress_meter, k)
for i in 1:b
bi = partition[blocks[i]]
arr = Vector{LazySet{NUM}}(undef, arr_length)
Expand Down
4 changes: 0 additions & 4 deletions src/ReachSets/ContinuousPost/BFFPSV18/reach.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ using LazySets: CacheMinkowskiSum,
isdisjoint

import LazySets.Approximations: overapproximate
import ProgressMeter: update!

"""
reach(problem, options)
Expand Down Expand Up @@ -291,6 +290,3 @@ end
function has_constant_directions(block_options, i::Int)
return true
end

# no-op progress meter for unbounded time
function update!(::Nothing, ::Int) end
16 changes: 8 additions & 8 deletions src/ReachSets/ContinuousPost/BFFPSV18/reach_blocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function reach_blocks!(ϕ::SparseMatrixCSC{NUM, Int},
progress_meter::Union{Progress, Nothing},
res::Vector{<:ReachSet}
)::Tuple{Int, Bool} where {NUM}
update!(progress_meter, 1)
ProgressMeter.update!(progress_meter, 1)
array = CartesianProductArray(Xhat0[blocks])
X_store = (output_function == nothing) ?
array :
Expand Down Expand Up @@ -85,7 +85,7 @@ function reach_blocks!(ϕ::SparseMatrixCSC{NUM, Int},

k = 2
@inbounds while true
update!(progress_meter, k)
ProgressMeter.update!(progress_meter, k)
for i in 1:b
bi = partition[blocks[i]]
Xhatk_bi = ZeroSet(length(bi))
Expand Down Expand Up @@ -144,7 +144,7 @@ function reach_blocks!(ϕ::AbstractMatrix{NUM},
progress_meter::Union{Progress, Nothing},
res::Vector{<:ReachSet}
)::Tuple{Int, Bool} where {NUM}
update!(progress_meter, 1)
ProgressMeter.update!(progress_meter, 1)
array = CartesianProductArray(Xhat0[blocks])
X_store = (output_function == nothing) ?
array :
Expand Down Expand Up @@ -175,7 +175,7 @@ function reach_blocks!(ϕ::AbstractMatrix{NUM},
arr = Vector{LazySet{NUM}}(undef, arr_length)
k = 2
@inbounds while true
update!(progress_meter, k)
ProgressMeter.update!(progress_meter, k)
for i in 1:b
bi = partition[blocks[i]]
for (j, bj) in enumerate(partition)
Expand Down Expand Up @@ -236,7 +236,7 @@ function reach_blocks!(ϕ::SparseMatrixExp{NUM},
progress_meter::Union{Progress, Nothing},
res::Vector{<:ReachSet}
)::Tuple{Int, Bool} where {NUM}
update!(progress_meter, 1)
ProgressMeter.update!(progress_meter, 1)
array = CartesianProductArray(Xhat0[blocks])
X_store = (output_function == nothing) ?
array :
Expand Down Expand Up @@ -264,7 +264,7 @@ function reach_blocks!(ϕ::SparseMatrixExp{NUM},

k = 2
@inbounds while true
update!(progress_meter, k)
ProgressMeter.update!(progress_meter, k)
for i in 1:b
bi = partition[blocks[i]]
ϕpowerk_πbi = row(ϕpowerk, bi)
Expand Down Expand Up @@ -322,7 +322,7 @@ function reach_blocks!(ϕ::SparseMatrixExp{NUM},
progress_meter::Union{Progress, Nothing},
res::Vector{<:ReachSet}
)::Tuple{Int, Bool} where {NUM}
update!(progress_meter, 1)
ProgressMeter.update!(progress_meter, 1)
array = CartesianProductArray(Xhat0[blocks])
X_store = (output_function == nothing) ?
array :
Expand Down Expand Up @@ -352,7 +352,7 @@ function reach_blocks!(ϕ::SparseMatrixExp{NUM},
arr = Vector{LazySet{NUM}}(undef, arr_length)
k = 2
@inbounds while true
update!(progress_meter, k)
ProgressMeter.update!(progress_meter, k)
for i in 1:b
bi = partition[blocks[i]]
ϕpowerk_πbi = row(ϕpowerk, bi)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function reach_blocks_wrapping_effect!(
k = 2
p = Progress(N, 1, "Computing successors ")
@inbounds while true
update!(p, k)
ProgressMeter.update!(p, k)
for i in 1:b
bi = partition[blocks[i]]
for (j, bj) in enumerate(partition)
Expand Down
2 changes: 1 addition & 1 deletion src/ReachSets/ContinuousPost/TMJets/reach.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=#

import IntervalArithmetic
using TaylorSeries
using TaylorIntegration: jetcoeffs!
using TaylorModels: validated_step!, TaylorModel1, TaylorModelN
import IntervalArithmetic

function validated_integ(f!, qq0::AbstractVector{T}, δq0::IntervalBox{N,T},
t0::T, tmax::T, orderQ::Int, orderT::Int, abstol::T;
Expand Down
7 changes: 6 additions & 1 deletion src/ReachSets/ReachSets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ module ReachSets

using ..Utils, ..Properties
using LazySets, MathematicalSystems, HybridSystems, Expokit, Optim,
LinearAlgebra, SparseArrays, ProgressMeter
LinearAlgebra, SparseArrays

import ProgressMeter
using ProgressMeter: Progress
# no-op progress meter for unbounded time
function ProgressMeter.update!(::Nothing, ::Int) end

# fix namespace conflicts with MathematicalSystems
using LazySets: LinearMap, AffineMap, ResetMap
Expand Down

0 comments on commit 1e5b9bb

Please sign in to comment.