Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some minor warnings #842

Merged
merged 3 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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