Skip to content

Commit

Permalink
Merge pull request #189 from JuliaReach/mforets/evaluate_tdom
Browse files Browse the repository at this point in the history
Use exact tdom in overapproximation of Taylor models
  • Loading branch information
mforets authored May 21, 2020
2 parents 7433acf + 0a125d2 commit 561335f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/Flowpipes/reachsets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,14 @@ function overapproximate(R::TaylorModelReachSet{N}, ::Type{<:Hyperrectangle}) wh
# pick the time domain of the given TM (same in all dimensions)
t0 = tstart(R)
Δt = tspan(R)
# tdom defined below is the same as Δt - t0, but the domain inclusion check
# in TM.evauate may fail, so we unpack the domain again here; also note that
# by construction the TMs in time are centered at zero
tdom = TM.domain(first(set(R)))

# evaluate the Taylor model in time
# X_Δt is a vector of TaylorN (spatial variables) whose coefficients are intervals
X_Δt = TM.evaluate(set(R), Δt - t0)
X_Δt = TM.evaluate(set(R), tdom)

# evaluate the spatial variables in the symmetric box
Bn = symBox(D)
Expand All @@ -605,10 +609,14 @@ function overapproximate(R::TaylorModelReachSet{N}, ::Type{<:Hyperrectangle}, np
# pick the time domain of the given TM (same in all dimensions)
t0 = tstart(R)
Δt = tspan(R)
# tdom defined below is the same as Δt - t0, but the domain inclusion check
# in TM.evauate may fail, so we unpack the domain again here; also note that
# by construction the TMs in time are centered at zero
tdom = TM.domain(first(set(R)))

# evaluate the Taylor model in time
# X_Δt is a vector of TaylorN (spatial variables) whose coefficients are intervals
X_Δt = TM.evaluate(set(R), Δt - t0)
X_Δt = TM.evaluate(set(R), tdom)

# evaluate the spatial variables in the symmetric box
partition = IA.mince(symBox(D), nparts)
Expand All @@ -628,11 +636,15 @@ function overapproximate(R::TaylorModelReachSet{N}, ::Type{<:Zonotope}) where {N
# pick the time domain of the given TM (same in all dimensions)
t0 = tstart(R)
Δt = tspan(R)
# tdom defined below is the same as Δt - t0, but the domain inclusion check
# in TM.evauate may fail, so we unpack the domain again here; also note that
# by construction the TMs in time are centered at zero
tdom = TM.domain(first(set(R)))

# evaluate the Taylor model in time
# X_Δt is a vector of TaylorN (spatial variables) whose coefficients are intervals
X = set(R)
X_Δt = TM.evaluate(X, Δt - t0)
X_Δt = TM.evaluate(X, tdom)

# builds the associated taylor model for each coordinate j = 1...n
# X̂ is a TaylorModelN whose coefficients are intervals
Expand Down

0 comments on commit 561335f

Please sign in to comment.