diff --git a/Project.toml b/Project.toml index a13c9360a1..e8757b7e81 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ReachabilityAnalysis" uuid = "1e97bd63-91d1-579d-8e8d-501d2b57c93f" authors = ["mforets ", "schillic ", "dfcaporale "] -version = "0.14.7" +version = "0.14.8" [deps] ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04" @@ -49,7 +49,7 @@ Requires = "0.5, 1.0" StaticArrays = "0.12, 1.0" Symbolics = "0.1.24" TaylorIntegration = "0.6, 0.7, 0.8" -TaylorModels = "0.3" +TaylorModels = "0.4" TaylorSeries = "0.10, 0.11" UnPack = "0.1, 1.0" julia = "1.5" diff --git a/src/Algorithms/TMJets/TMJets21a/post.jl b/src/Algorithms/TMJets/TMJets21a/post.jl index 84c167669a..b532aab4e9 100644 --- a/src/Algorithms/TMJets/TMJets21a/post.jl +++ b/src/Algorithms/TMJets/TMJets21a/post.jl @@ -33,7 +33,7 @@ function post(alg::TMJets21a{N}, ivp::IVP{<:AbstractContinuousSystem}, timespan; X0tm = _initialize(X0, orderQ, orderT) # call external solver - tv, xv, xTM1v = TaylorModels.validated_integ(f!, X0tm, t0, T, orderQ, orderT, + TMSol = TaylorModels.validated_integ(f!, X0tm, t0, T, orderQ, orderT, abstol, params; maxsteps=maxsteps, parse_eqs=parse_eqs, @@ -41,6 +41,9 @@ function post(alg::TMJets21a{N}, ivp::IVP{<:AbstractContinuousSystem}, timespan; minabstol=minabstol, absorb=absorb, check_property=check_property) + tv = TMSol.time + xv = TMSol.fp + xTM1v = TMSol.xTM # preallocate flowpipe F = Vector{TaylorModelReachSet{N}}() diff --git a/src/Algorithms/TMJets/TMJets21b/post.jl b/src/Algorithms/TMJets/TMJets21b/post.jl index 8ea4047933..90592bee34 100644 --- a/src/Algorithms/TMJets/TMJets21b/post.jl +++ b/src/Algorithms/TMJets/TMJets21b/post.jl @@ -33,7 +33,7 @@ function post(alg::TMJets21b{N}, ivp::IVP{<:AbstractContinuousSystem}, timespan; X0tm = _initialize(X0, orderQ, orderT) # call external solver - tv, xv, xTM1v = TaylorModels.validated_integ2(f!, X0tm, t0, T, orderQ, orderT, + TMSol = TaylorModels.validated_integ2(f!, X0tm, t0, T, orderQ, orderT, abstol, params; parse_eqs=parse_eqs, maxsteps=maxsteps, @@ -42,6 +42,9 @@ function post(alg::TMJets21b{N}, ivp::IVP{<:AbstractContinuousSystem}, timespan; minabstol=minabstol, validatesteps=validatesteps, ε=ε, δ=ε, absorb_steps=absorb_steps) + tv = TMSol.time + xv = TMSol.fp + xTM1v = TMSol.xTM # build flowpipe F = Vector{TaylorModelReachSet{N}}() diff --git a/src/ReachSets/TaylorModelReachSet.jl b/src/ReachSets/TaylorModelReachSet.jl index 8ce5c48e5f..96da51122c 100644 --- a/src/ReachSets/TaylorModelReachSet.jl +++ b/src/ReachSets/TaylorModelReachSet.jl @@ -373,7 +373,7 @@ end function _overapproximate_structured(Z::AbstractZonotope{N}, ::Type{<:TaylorModelReachSet}; orderQ::Integer=2, orderT::Integer=8, Δt::TimeInterval=zeroI) where {N} n = dim(Z) - x = set_variables("x", numvars=n, order=2*orderQ) + x = set_variables("x", numvars=n, order=orderQ) # check structure order(Z) == 2 || throw(ArgumentError("this function requires that the order of the zonotope is 2, got $(order(Z))")) @@ -395,7 +395,7 @@ function _overapproximate_structured(Z::AbstractZonotope{N}, ::Type{<:TaylorMode # the line segment corresponding to the i-th edge of Z @inbounds for i in 1:n pi = c[i] + sum(view(M, i, :) .* x) - di = D[i, i] + di = abs(D[i, i]) rem = interval(-di, di) vTM[i] = TaylorModel1(Taylor1(pi, orderT), rem, zeroI, Δtn) end @@ -406,7 +406,7 @@ end function _overapproximate_structured(Zcp::CartesianProduct{N, <:Zonotope, <:Interval}, ::Type{<:TaylorModelReachSet}; orderQ::Integer=2, orderT::Integer=8, Δt::TimeInterval=zeroI) where {N} n = dim(Zcp) - x = set_variables("x", numvars=n, order=2*orderQ) + x = set_variables("x", numvars=n, order=orderQ) # check structure Z = Zcp.X @@ -446,7 +446,7 @@ end function _overapproximate_structured_full(Zcp::CartesianProduct{N, <:Zonotope, <:Interval}, ::Type{<:TaylorModelReachSet}; orderQ::Integer=2, orderT::Integer=8, Δt::TimeInterval=zeroI) where {N} n = dim(Zcp) - 1 - x = set_variables("x", numvars=n+1, order=2*orderQ) + x = set_variables("x", numvars=n+1, order=orderQ) # check structure # not checking structure