-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use exact tdom in overapproximation of Taylor models #189
Conversation
# 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two questions:
- Is
t0
the expansion point, or is itinf(tdom)
? - Is
Δt
different fromtdom
?
One remark: I think the correct evaluation should read TM.evaluate(set(R), tdom-t0)
, with t0
the point where the Taylor expansion is constructed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The R
here is xTM1v
in the validated_integ
algorithm, defined in this line:
Ri = TaylorModelReachSet(xTM1v[:, nsteps], TimeInterval(t0-δt, t0) + time_shift) |
For xTM1v
, the expansions in time are centered at zero (zI
). That's why TM.evaluate(set(R), tdom)
should match TM.evaluate(set(R), tdom-tdom.x0)
, which should also match TM.evaluate(set(R), Δt - t0)
modulo rounding errors.
Here, t0
corresponds to the start time of this reach-set, which is the final time of the previously computed reach-set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear,
Is t0 the expansion point, or is it inf(tdom)?
The expansion point of this taylor model is inf(tdom)
, which is zero by construction in validated_integ
. OTOH, t0
is what we call the tstart(R)
; think of a flowpipe as a union of reach-sets, and each reach-sets carries it's time span that you can access with tspan(R)
; there is tstart(R)
and tend(R)
which are just the inf
and sup
of the interval tspan(R)
.
Is Δt different from tdom?
Yes. tdom
is the domain of the taylor model which by construction are always of the form [0, t]
. However, Δt = tspan(R)
.
Storing time like that allows to see flowpipes as "one thing", instead of the reach-sets in isolation; in other words, you can take a solution and ask for sol(1 .. 2)
which will return all those reach-sets whose time intervals intersect 1 .. 2
; and also do sol(30.5)
and this will return the reach-set corresponding to time 30.5
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation; that clarifies a lot.
One disadvantage of storing [t0, t1], [t1, t2], [t2, t3], ... is that you will loose precision if the integration span is large: simply think that eps(tn)
grows with a growing tn
, so you loose some significant figures. That's the reason that validated_integ
returns the vector [t0, t1, t2, ...]
, and the TaylorModel1
s spanning the interval [0, δtn].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting observation! As i did in this PR, one can access this "true" domain through TM.domain(first(set(R)))
; i pick the first one because it's the same for all components. Perhaps there should be a getter function for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how general this is, I mean, to have a vector of TM1s which share the same domain. I also think we should provide a getter function for tm.x0
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 see PR #190.
I also think we should provide a getter function for tm.x0...
i've opened JuliaIntervals/TaylorModels.jl#75
xref: JuliaIntervals/TaylorModels.jl#74