JuliaIntervals / TaylorModels.jl

Rigorous function approximation using Taylor models in Julia
Other
63 stars 14 forks source link

Add initialize! method and uncomment a test #118

Closed lbenet closed 3 years ago

lbenet commented 3 years ago

Requested by @mforets

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 882780697

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/validatedODEs.jl 21 23 91.3%
<!-- Total: 21 23 91.3% -->
Files with Coverage Reduction New Missed Lines %
src/validatedODEs.jl 1 82.75%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 860448609: 3.6%
Covered Lines: 890
Relevant Lines: 1336

💛 - Coveralls
mforets commented 3 years ago

awesome, thanks @lbenet

lbenet commented 3 years ago

Yes, the change was intended; sorry if I did not tagged it as breaking. There was a mismatch in the indices of tTM and qTM: The domain of qTM[:,n] (n-th time step) is from 0 to δt, and time 0 in that domain corresponded to tTM[n-1]; now it corresponds to tTM[n].

lbenet commented 3 years ago

I agree with your comment that it may be a bit confusing, but this only happens in the first and second entry in time. My point is that the very first entry corresponds to the initial condition (the domain is Interval(0,0)), while the second corresponds to the TaylorModel1, at t=0, which holds in the domain.

Using your example above, note that qTM[:,1] has only zero-order terms in t, while qTM[1,2] has the local solution in t. Note also how the domains differ.

julia> tTM[1]
0.0

julia> qTM[1,1]
  0.97 + 0.020000000000000018 ξₓ + Interval(0.0, 0.0)

julia> domain.(qTM[1,1])
 Interval(0.0, 0.0)

julia> tTM[2]
0.0

julia> qTM[1,2]
  0.97 + 0.020000000000000018 ξₓ + ( 0.1) t + Interval(0.0, 0.0)

julia> domain.(qTM[1,2])
Interval(0.0, 0.1)
mforets commented 3 years ago

absolutely. it will not be difficult to adapt how we are constructing flowpipes in ReachabilityAnalysis.jl, which happens here, to the new behavior of tTM. i just wanted to raise the point so that we are on the same page.

lbenet commented 3 years ago

With the new "convention", this line has to be adapted to something like

δt = TimeInterval(tv[i] + domain(xTM1v[1, i]))

and i can safely run over eachindex(tv).

This is what is done in #117, e.g. here.