Skip to content
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

Merged
merged 2 commits into from
May 21, 2020

Conversation

mforets
Copy link
Member

@mforets mforets commented May 20, 2020

Comment on lines 585 to +595
# 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)
Copy link
Collaborator

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 it inf(tdom)?
  • Is Δt different from tdom?

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.

Copy link
Member Author

@mforets mforets May 20, 2020

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.

Copy link
Member Author

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.

Copy link
Collaborator

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 TaylorModel1s spanning the interval [0, δtn].

Copy link
Member Author

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.

Copy link
Collaborator

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...

Copy link
Member Author

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

@mforets mforets merged commit 561335f into master May 21, 2020
@mforets mforets deleted the mforets/evaluate_tdom branch May 21, 2020 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants