schillic on gh-pages
build based on 9184ca9 (compare)
schillic on gh-pages
build based on 3a6cd33 (compare)
lucaferranti on lf-spz-linmap
Apply suggestions from code rev… (compare)
lucaferranti on lf-spz-linmap
remove operator overloading (compare)
schillic on gh-pages
build based on 0790e4a (compare)
lucaferranti on lf-spz-linmap
fix docstrings (compare)
lucaferranti on lf-spz-linmap
update linear map for polynomia… (compare)
schillic on gh-pages
build based on eb7fa20 (compare)
schillic on lf-spz-rename
schillic on master
rename genmat methods for spz Merge pull request #3035 from J… (compare)
alpha=0.5
, darker color will appear at region (5,7) due to the overlap.P = VPolygon([[0.0, 0.0], [1.0, 0.0], [0.0, 1.0]])
, Q = UnionSetArray([Hyperrectangle([0.0, 0.0],[3.0, 3.0])])
, P ⊆ Q
UnionSetArray of hyperrectangle
. The reason is that isdisjoint
of VPolygon
and Hyperrectangle
doesn't work. I also found the same problem in intersection
function several days ago.hyperrectangle
to HPolyhedron
by writing a small function, then they all work very well now.
@taylorize function f(x⁺, x, u)
x⁺[1] = u[1]
x⁺[2] = u[2]
x⁺[3] = x[1]*x[2]
return x⁺
end
X0 = Hyperrectangle([0,0,0], [1,2,1])
U = Hyperrectangle([0,0],[1,1])
ivp
as follows and then how to solve it? It seems simple solve
doesn't work. (I'm not sure). Or, is there a better way?@taylorize function f(x⁺, x, p, t)
x⁺[1] = x[4]
x⁺[2] = x[5]
x⁺[3] = x[1]*x[2]
x⁺[4] = zero(x[1])
x⁺[5] = zero(x[1])
return x⁺
end
X0 = Hyperrectangle([0,0,0, 0,0], [1,2,1,1,1])
prob = @ivp(x⁺ = f(x), dim:5, x(0) ∈ X0)
solve
for discrete systems, only for continuous systems (i guess the reason is that we never needed it). technically discrete systems are easier to handle than continuous systems, but it is still a bit of work
i think you could use https://juliareach.github.io/LazySets.jl/dev/lib/lazy_operations/QuadraticMap/#LazySets.QuadraticMap with
overapproximate(qm::QuadraticMap{N, <:AbstractZonotope}, ::Type{<:Zonotope}) where {N}
(see this page) to propagate the set under f
you could also use sparse polynomial zonotopes..
Thanks for your help again @mforets . It works for above simple example, but for one item with both x[1]
and x[1]*x[2]
as follows, it seems that quadraticmap doesn't work.
x_next[1] = x[1] + x[1]*x[2]
x_next[2] = x[2] + x[1]^2
I also tried to solve it by SimpleSparsePolynomialZonotope. It can deal with x[1] + x[1]*x[2]
, but the default interval of x[1]
and x[2]
are both [-1,1]
and can not change. If I want to consider [25, 30] x [-5,0]
, it seems too complex to adjust the parameters in SimpleSparsePolynomialZonotope.
@ivp
, sol = solve(prob, T=10.0)
, how to get the solution at a specific time from sol
, e.g., the solution at instant t=3? I didn't find the answer since the document of Flowpipe
is still empty now.
SimpleSparsePolynomialZonotope
) is that the quadratic map is computed without approximation
Q1 = [0 1; 0 0]
and Q2 = [1 0; 0 0]
SingleSparsePolynomialZonotope
(since it uses minkowski sum)exact_sum
SparsePolynomialZonotope
, which will be added in an upcoming PRIt can deal with x[1] + x[1]*x[2], but the default interval of x[1] and x[2] are both [-1,1] and can not change
Ah, I think I understood what you meant by that. If you want to handle the linear terms as generators, that is also possible. I was proposing to add the linear terms with the quadratic part using set operations. This is cleaner, since you don't have to manually adjust the weights of the generators.
I * X + QuadraticMap([Q1, Q2], X)
. The advantage of SingleSparsePolynomialZonotope
is that It can also deal with higher-order terms, not just quadratic terms. However, if I want to consider the X domain
which is not [-1,1]
, it is too complex to adjust the weights of generators, especially for high order term.
If you want to handle the linear terms as generators, that is also possible. I was proposing to add the linear terms with the quadratic part using set operations.
intersection, union, issubset, in
. I can say JuliaReach is the most suitable tool for me to finish our work, but unfortunately I was stuck in this reachable set computation of discrete-time system now.
TMJets
algorithm (standard for nonlinear problems), you can just use evaluate(sol, 3.0)
as in the example hereSimpleSparsePolynomialZonotope
, but I'm not sure I understand the issue you mention about adjusting weights.
SparsePolynomialZonotope
which can handle set sums in an exact fashion, so it should give more precise results than the SimpleSparsePolynomialZonotope
.