schillic on gh-pages
build based on 148bcb7 (compare)
schillic on gh-pages
build based on 0cc2f23 (compare)
schillic on 2845
schillic on master
add low_high function add methods for low_high more efficient box_approximatio… and 3 more (compare)
schillic on 2850
schillic on master
strict inclusion check Merge pull request #2853 from J… (compare)
$ time julia --color=yes docs/make.jl && julia --color=yes test/runtests.jl
Test Summary: | Pass Total
LazySets.plotting | 2 2
21.167309 seconds (31.84 M allocations: 1.854 GiB, 2.67% gc time, 19.44% compilation time)
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: Skipped ExpandTemplates step (doctest only).
[ Info: Skipped CrossReferences step (doctest only).
[ Info: Skipped CheckDocument step (doctest only).
[ Info: Skipped Populate step (doctest only).
[ Info: Skipped RenderDocument step (doctest only).
Test Summary: | Pass Total
LazySets.doctests | 1 1
50.646803 seconds (79.67 M allocations: 5.673 GiB, 2.96% gc time, 4.86% compilation time)
@taylorize
works, please substitute all right-hand sides which are numeric constants with zero(u[1])
or one(u[1])
. For example,
@taylorize function stable!(du, u, p, t)
#differential equations for the stable water tank mode
du[1] = zero(u[1])
du[2] = zero(u[1])
du[3] = zero(u[1])
return du
end
and for the filling mode,
@taylorize function filling!(du, u, p, t)
d_in, d_out, h = u
#differential equations for the filling water tank mode
du[1] = one(u[1])
du[2] = zero(u[1])
du[3] = d_in
return du
end
etc
# transition "stable" -> "normal"
add_transition!(automaton, 1, 2, 1)
#guard_1 = HalfSpace(h >= 0, var)
t1 = @map(h -> h, dim: 3)
# transition "normal" -> "filling"
add_transition!(automaton, 2, 3, 2)
guard_2 = HalfSpace(h <= V_saf_min, var)
t2 = @map(h -> h, dim: 3, h ∈ guard_2)
# transition "normal" -> "emptying"
add_transition!(automaton, 2, 3, 2)
guard_3 = HalfSpace(h >= V_saf_max, var)
t3 = @map(h -> h, dim: 3, h ∈ guard_3)
add_transition!
annotations, the integer arguments correspond to the source (resp target nodes), while the final argument is just a label (tag) for the transition.
2, 3, 2
should be repeated. It is possible to have more than one transition between the same pair of source/node modes, but from your comment in the code, and given thatmodes=[stable_mode, normal_mode, filling_mode, emptying_mode]
# transition "stable" -> "normal"
add_transition!(automaton, 1, 2, 1)
#guard_1 = HalfSpace(h >= 0, var)
t1 = @map(h -> h, dim: 3)
# transition "normal" -> "filling"
add_transition!(automaton, 2, 3, 2)
guard_2 = HalfSpace(h <= V_saf_min, var)
t2 = @map(h -> h, dim: 3, h ∈ guard_2)
# transition "normal" -> "emptying"
add_transition!(automaton, 2, 4, 3)
guard_3 = HalfSpace(h >= V_saf_max, var)
t3 = @map(h -> h, dim: 3, h ∈ guard_3)
Does that make sense?
Another thing that I noticed is that the automaton begins at the "stable" mode, and the dynamics is zero, so I'm not sure that it will eventually take a transition. I may be wrong, but perhaps it's good if you revise the model with my previous comments, then we continue discussing how to obtain the reachability solution.
@map
macro with a constrained set is ignored, in fact there is an unresolved issue about that (https://github.com/JuliaReach/MathematicalSystems.jl/issues/198#issuecomment-909562237)