Skip to content

Commit

Permalink
Merge pull request #842 from JuliaReach/schillic/fixes
Browse files Browse the repository at this point in the history
Fix some minor warnings
  • Loading branch information
schillic authored Aug 19, 2024
2 parents 3d9acf3 + 9111c04 commit eb94759
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Algorithms/CARLIN/reach.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ end
function _compute_resets(resets::Vector{Float64}, T)
# assumes initial time is 0
aux = vcat(0.0, resets, T)
return [interval(aux[i], aux[i + 1]) for i in 1:(length(aux) - 1)]
return [IA.interval(aux[i], aux[i + 1]) for i in 1:(length(aux) - 1)]
end

function reach_CARLIN_resets(X0, F1, F2, resets; alg, N, T, Δt, bloat, compress)
Expand Down
1 change: 0 additions & 1 deletion src/Discretization/Overapproximate.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module Overapproximate

using LazySets
import LazySets: _split
using IntervalMatrices
using StaticArrays: SVector, SMatrix, MMatrix, StaticArray
import IntervalArithmetic as IA
Expand Down
2 changes: 1 addition & 1 deletion src/ReachSets/AbstractReachSet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Return the type of the set representation of this reach-set.
Type of the set representation of the given reach-set.
"""
setrep(::AbstractReachSet)
function setrep(::AbstractReachSet) end

"""
tstart(R::AbstractReachSet)
Expand Down
8 changes: 4 additions & 4 deletions src/ReachSets/TaylorModelReachSet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ function _overapproximate_structured(Z::AbstractZonotope{N}, ::Type{<:TaylorMode
@inbounds for i in 1:n
pi = c[i] + sum(view(M, i, :) .* x)
di = abs(D[i, i])
rem = interval(-di, di)
rem = IA.interval(-di, di)
vTM[i] = TaylorModel1(Taylor1(pi, orderT), rem, zeroI, Δtn)
end

Expand Down Expand Up @@ -543,7 +543,7 @@ function _overapproximate_structured(Zcp::CartesianProduct{N,<:Zonotope,<:Interv
@inbounds begin
pi = mid(Y.dat) + zero(TaylorN(1; order=orderQ))
d = diam(Y.dat) / 2
rem = interval(-d, d)
rem = IA.interval(-d, d)
vTM[n] = TaylorModel1(Taylor1(pi, orderT), rem, zeroI, Δtn)
end
return TaylorModelReachSet(vTM, Δt)
Expand Down Expand Up @@ -574,15 +574,15 @@ function _overapproximate_structured_full(Zcp::CartesianProduct{N,<:Zonotope,<:I
@inbounds for i in 1:n
pi = c[i] + sum(view(G, i, 1:(n + 1)) .* x) + zero(TaylorN(n + 1; order=orderQ))
d = abs(G[i, n + 1 + i])
rem = interval(-d, d)
rem = IA.interval(-d, d)
vTM[i] = TaylorModel1(Taylor1(pi, orderT), rem, zeroI, Δtn)
end

# fill the final row, which correspponds to the "interval" variable: (n+1)-th
I = Zcp.Y.dat
pi = mid(I) + zero(TaylorN(n + 1; order=orderQ))
d = diam(I) / 2
rem = interval(-d, d)
rem = IA.interval(-d, d)
@inbounds vTM[n + 1] = TaylorModel1(Taylor1(pi, orderT), rem, zeroI, Δtn)

return TaylorModelReachSet(vTM, Δt)
Expand Down

0 comments on commit eb94759

Please sign in to comment.