Closed lbenet closed 3 years ago
Some general feedback about this subject. In fact this is not particular to adding a new struct TMSol
to this library and a new plot recipe for it. That's great :tada: . Perhaps we should add a few examples in the TaylorModels docs as well. (ping @lucaferranti)
I'm sharing my view on how to put the pieces together for potential new users of these tools. In the upcoming JuliaCon we'll give a workshop together with @schillic, so it's a good exercise to start thinking about the big picture and how to present it....
For new users, I would (of course :smile: ) suggest that they use the the algorithms implemented in this library through the ReachabilityAnalysis.jl
interface -- in the very same way that in the DiffEq world there is one shared "base" library (DiffEqBase) and existing and new algorithms adapt to it. HOODESolver.jl is a beatufil example of that synergy.
The key idea that this future package ReachabilityBase.jl
should address are three kinds of interfaces, as it is done in ReachabilityAnalysis.jl : reach-set, flowpipes, and solutions, see https://github.com/JuliaReach/ReachabilityAnalysis.jl/tree/master/src. There are different kinds of representations -- for example, if you have a purely continuous system you'll use a Flowpipe
, but a HybridFlowpipe
for hybrid systems, because they also know about the hybrid mode where they live, etc. Dispatch plays a central role in the different kinds of reach-sets representations. We want to be able to convert between different reach-sets representations. And there's the whole AbstractLazyReachSet
interface which leverages on LazySets.jl
to have a ton of functionality "for free" (membership, inclusion, intersection, disjointness, most often with specialized algorithms that dispatch over different combinations of set types).
Apart from the plotting utilities, which are implemented in this file in ReachabilityAnalysis.jl we already have an array-like behavior, and function-like behavior, like sol[1:10]
to get the first ten reach-sets, and sol(0 .. 1)
to get the reach-sets intersecting the time span 0 .. 1
.
But the most interesting part is the combination between Taylor models and other set representations. So again, we can leverage on LazySets for things like exact conversion between structured high order zonotopes to TaylorModels. That's a great advantage over using hyperrectangular representations alone, because we can switch between representations in a cheap and convenient way.
Thanks @mforets for sharing your view and actually the big picture you have in which everything can be matched and combined together.
Regarding this proposal, at least for the time being, I think it is ok to have it implemented here, having in mind that this can be eventually moved elsewhere.
Clearly, we should avoid as much as possible code duplicity, in particular for maintenance. But until ReachabilityBase.jl
is not there it is expected there will be some code duplication. Also, there is the issue of the dependencies of the packages, which should be certainly sorted out first. Once said this, thanks for sharing the links to the locations for the relevant code which is already implemented in ReachabilityAnalysis!
This would make life much easier for plotting through a recipe. Something like this already exists in ReachabilityAnalysis.jl, but I think this would be a better place to have it.
cc @mforets