Skip to content

Commit

Permalink
Merge pull request #798 from JuliaReach/schillic/minor
Browse files Browse the repository at this point in the history
Minor fixes in comments
  • Loading branch information
schillic authored Mar 1, 2024
2 parents b01493b + 701fe0b commit 501e26c
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/Algorithms/LGG09/reach_inhomog.jl
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ end # quote / load_krylov_LGG09_inhomog()
# Methods using eigenvalues of the transition matrix
# ------------------------------------------------------------

#= FIXME needs review <<
#= TODO needs review <<
# it is assumed that (λ, d) is an eigenvalue-eigenvector pair of the matrix Φᵀ
function reach_inhomog_dir_eig_LGG09!(out::AbstractVector{N}, X₀, V, d::AbstractVector{N}, λ::N, NSTEPS) where {N}
Expand Down
6 changes: 3 additions & 3 deletions src/Algorithms/QINT/post.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# this algorithms assumes that the initial-value problem is one-dimensional
# FIXME requires special scalar quadratic system type
# TODO requires special scalar quadratic system type
function reach_homog_QINT(alg::QINT{N}, ivp::IVP{<:AbstractContinuousSystem}, tspan;
Δt0::TimeInterval=zeroI, kwargs...) where {N}
n = statedim(ivp)
Expand All @@ -8,7 +8,7 @@ function reach_homog_QINT(alg::QINT{N}, ivp::IVP{<:AbstractContinuousSystem}, ts

@unpack Δ, δ, θ, maxiter, approx_model = alg

# normalize system to canonical form FIXME
# normalize system to canonical form TODO
ivp_norm = _normalize(ivp)
Ω0 = initial_state(ivp_norm)

Expand All @@ -30,7 +30,7 @@ function reach_homog_QINT(alg::QINT{N}, ivp::IVP{<:AbstractContinuousSystem}, ts
#F = Vector{ReachSet{N, IT}}(undef, NSTEPS)

if got_homogeneous
# FIXME consider Δt0
# TODO consider Δt0
F = reach_homog_QINT(; a=a, b=b, c=c, X0=Ω0, T=T, Δ=Δ, δ=δ, θ=θ, maxiter=maxiter)
else
error("not implemented yet")
Expand Down
6 changes: 3 additions & 3 deletions src/Discretization/Exponentiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Abstract supertype for all exponentiation algorithms.
"""
abstract type AbstractExpAlg end

# FIXME use _alias_exp to distinguish from setops
# TODO use _alias_exp to distinguish from setops
# no-op
_alias(alg::AbstractExpAlg) = alg

Expand Down Expand Up @@ -428,8 +428,8 @@ end

# compute the matrix Φ₂ = A^{-2} (exp(A*δ) - I - A*δ) assuming that A is invertible
# and explicitly computing inv(A); this function optionally receives Φ = exp(Aδ)
# FIXME don't pass algorithm since it is ignore if Φ is given
#@time Φ2 = ReachabilityAnalysis._Φ₂_inv(abs.(A), δ, ReachabilityAnalysis.BaseExp, Φ);
# TODO don't pass algorithm since it is ignored if Φ is given
# Φ2 = ReachabilityAnalysis._Φ₂_inv(abs.(A), δ, ReachabilityAnalysis.BaseExp, Φ)
function _Φ₂_inv(A::AbstractMatrix, δ, alg, Φ=nothing)
= A * δ
if isnothing(Φ)
Expand Down
2 changes: 1 addition & 1 deletion src/Flowpipes/clustering.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function cluster(F, idx, ::LazyClustering{Missing,Val{true}})
return [convexify(view(F, idx))]
end

# FIXME return a UnionSetArray of reach-sets
# TODO return a UnionSetArray of reach-sets
function cluster(F, idx, ::LazyClustering{Missing,Val{false}})
return [view(F, idx)]
end
Expand Down
6 changes: 3 additions & 3 deletions src/ReachSets/TaylorModelReachSet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function _is_intersection_empty(R::TaylorModelReachSet, Y::LazySet, method::Fall
return isdisjoint(set(overapproximate(R, Zonotope)), Y)
end

# FIXME when UnionSet, UnionSetArray <: LazySet
# TODO when UnionSet, UnionSetArray <: LazySet
function _is_intersection_empty(R::TaylorModelReachSet, Y::Union{UnionSet,UnionSetArray},
method::FallbackDisjointness)
return isdisjoint(set(overapproximate(R, Zonotope)), Y)
Expand Down Expand Up @@ -359,7 +359,7 @@ function overapproximate(R::TaylorModelReachSet{N}, ::Type{<:Hyperrectangle};
if nsdiv == 1
partition = [S]
else
# FIXME (also below) may use IA.mince directly
# TODO (also below) may use IA.mince directly
partition = fill(nsdiv, D)
Sdiv = LazySets.split(convert(Hyperrectangle, S), partition)
partition = convert.(IntervalBox, Sdiv)
Expand Down Expand Up @@ -461,7 +461,7 @@ function overapproximate(H::AbstractHyperrectangle{N}, T::Type{<:TaylorModelReac
end

# overapproximate a zonotopic set with a taylor model reachset
# FIXME pass algorithm option to choose between using parallelotope oa or order reduction
# TODO pass algorithm option to choose between using parallelotope oa or order reduction
function overapproximate(Z::AbstractZonotope{N}, ::Type{<:TaylorModelReachSet};
orderQ::Integer=2, orderT::Integer=8, Δt::TimeInterval=zeroI,
indices=1:dim(Z), box_reduction=false) where {N}
Expand Down
2 changes: 1 addition & 1 deletion src/ReachSets/TemplateReachSet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function set(R::TemplateReachSet)
return T([HalfSpace(di, R.sf[i]) for (i, di) in enumerate(R.dirs)])
end

# FIXME requires adding boundedness property as a type parameter
# TODO requires adding boundedness property as a type parameter
setrep(::Type{<:TemplateReachSet{N,VN}}) where {N,VN} = HPolyhedron{N,VN}
setrep(::TemplateReachSet{N,VN}) where {N,VN} = HPolyhedron{N,VN}

Expand Down
2 changes: 1 addition & 1 deletion test/algorithms/ASB07.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ using ..Overapproximate: _convert_or_overapproximate
sol1_nonrec = solve(P_lin; tspan=(0.0, 1.0), alg=ASB07(; δ=0.04, recursive=false))
@test diameter(set(sol1_rec[end])) < diameter(set(sol1_nonrec[end]))

# FIXME test without IntervalMatrix wrapper
# TODO test without IntervalMatrix wrapper
#A = [-1.0 ± 0.05 -4.0 ± 0.05;
# 4.0 ± 0.05 -1.0 ± 0.05]
#P_lin = @ivp(x' = Ax, x(0) ∈ X0)
Expand Down
4 changes: 2 additions & 2 deletions test/flowpipes/flowpipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ end

@testset begin
"Flowpipe inclusion"
# Projectile problem
# Projectile problem
A = [0.0 0.5 0.0 0.0; 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.7; 0.0 0.0 0.0 0.0]
X0 = Singleton([0.0, 5.0, 100.0, 0])
U = Singleton([0.0, 0.0, 0.0, -9.81])
Expand Down Expand Up @@ -113,7 +113,7 @@ end
δ = 0.1
F1 = Flowpipe([ReachSet(X, (0 .. δ) + k * δ) for k in 0:10])

#= FIXME requires LazySets#2157
#= TODO requires LazySets#2157
N = eltype(X)
U1 = cluster(F1, 8:10, UnionClustering())
@test U1 isa Vector{ReachSet{N, UnionSetArray{N,Interval{N, IntervalArithmetic.Interval{N}}}}}
Expand Down
16 changes: 8 additions & 8 deletions test/models/hybrid/lotka_volterra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ end
# TEST RUN:
prob = lotka_volterra_hybrid(nsplit=10, ε_ext=1e-4, n_int = 30, ε = 0.008);
@time sol = solve(prob,
tspan=(0.0, 3.64),
alg=TMJets(abstol=1e-12, orderT=7, orderQ=1, adaptive=true, disjointness=RA.ZonotopeEnclosure()),
max_jumps=2,
intersect_source_invariant=false,
intersection_method=RA.BoxIntersection(),
clustering_method=RA.BoxClustering(),
disjointness_method=RA.BoxEnclosure());
sol = solve(prob,
tspan=(0.0, 3.64),
alg=TMJets(abstol=1e-12, orderT=7, orderQ=1, adaptive=true, disjointness=RA.ZonotopeEnclosure()),
max_jumps=2,
intersect_source_invariant=false,
intersection_method=RA.BoxIntersection(),
clustering_method=RA.BoxClustering(),
disjointness_method=RA.BoxEnclosure());
solz = overapproximate(sol, Zonotope);
B = Ball2([1.0, 1.0], 0.15) # "exact"
Expand Down

0 comments on commit 501e26c

Please sign in to comment.