Skip to content

Commit

Permalink
Merge pull request #473 from JuliaReach/mforets-patch-1
Browse files Browse the repository at this point in the history
Update Project.toml
  • Loading branch information
mforets authored May 20, 2021
2 parents 8541809 + 38a8fb4 commit 0ca3986
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ReachabilityAnalysis"
uuid = "1e97bd63-91d1-579d-8e8d-501d2b57c93f"
authors = ["mforets <mforets@gmail.com>", "schillic <christian.schilling@ist.ac.at>", "dfcaporale <dfcaporale@gmail.com>"]
version = "0.12.2"
version = "0.13.0"

[deps]
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
Expand Down
15 changes: 9 additions & 6 deletions src/Algorithms/TMJets/post.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function post(alg::TMJets{N}, ivp::IVP{<:AbstractContinuousSystem}, timespan;
else
f! = VectorField(ivp)
end
parse_eqs = get(kwargs, :parse_eqs, false)

n = statedim(ivp)
ivp_norm = _normalize(ivp)
X = stateset(ivp_norm)
Expand All @@ -27,7 +29,7 @@ function post(alg::TMJets{N}, ivp::IVP{<:AbstractContinuousSystem}, timespan;
X0 = initial_state(ivp_norm)

if external
return _solve_external(f!, X0, t0, T, orderQ, orderT, abs_tol, max_steps, Δt0; kwargs...)
return _solve_external(f!, X0, t0, T, orderQ, orderT, abs_tol, max_steps, Δt0; parse_eqs=parse_eqs, kwargs...)
end

X0tm = _initialize(X0, orderQ, orderT)
Expand All @@ -37,7 +39,7 @@ function post(alg::TMJets{N}, ivp::IVP{<:AbstractContinuousSystem}, timespan;
sizehint!(F, max_steps)

F, tv, xv, xTM1v, success, _t0 = validated_integ!(F, f!, X0tm, t0, T, orderQ, orderT,
abs_tol, max_steps, X, disjointness, Δt0, adaptive)
abs_tol, max_steps, X, disjointness, Δt0, adaptive; parse_eqs=parse_eqs)

if success || !adaptive
ext = Dict{Symbol, Any}(:tv => tv, :xv => xv, :xTM1v => xTM1v, :actual_abs_tol=>[abs_tol])
Expand Down Expand Up @@ -79,7 +81,7 @@ function post(alg::TMJets{N}, ivp::IVP{<:AbstractContinuousSystem}, timespan;
sizehint!(Fk, max_steps)

Fk, tv, xv, xTM1v, success, _t0 = validated_integ!(Fk, f!, X0tm, _t0, T, orderQ, orderT,
abs_tol, max_steps, X, disjointness, Δt0, adaptive)
abs_tol, max_steps, X, disjointness, Δt0, adaptive; parse_eqs=parse_eqs)

# append the new flowpipe to the accumulated flowpipe and extra data
append!(F, Fk)
Expand All @@ -100,11 +102,12 @@ function _solve_external(f!, X0, t0, T, orderQ, orderT, abs_tol, max_steps, Δt0
X0box = convert(IntervalBox, box_approximation(X0))

# extract solver name and options
solver_name = haskey(kwargs, :solver_name) ? kwargs[:solver_name] : TM.validated_integ
solver_kwargs = haskey(kwargs, :solver_kwargs) ? kwargs[:solver_kwargs] : Dict(:maxsteps=>max_steps)
parse_eqs = get(kwargs, :parse_eqs, false)
solver_name = get(kwargs, :solver_name, TM.validated_integ)
solver_kwargs = get(kwargs, :solver_kwargs, Dict(:maxsteps=>max_steps))

# call external solver
tv, xv, xTM1v = solver_name(f!, X0box, t0, T, orderQ, orderT, abs_tol; solver_kwargs...)
tv, xv, xTM1v = solver_name(f!, X0box, t0, T, orderQ, orderT, abs_tol; parse_eqs, olver_kwargs...)

# build flowpipe
F = Vector{TaylorModelReachSet{N}}()
Expand Down
2 changes: 1 addition & 1 deletion src/Flowpipes/recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ end

# extract limits and extrema of already plotted sets
p = plotattributes[:plot_object]
lims = _extract_limits(p)
lims = _extract_limits(p, plotattributes)
extr = _extract_extrema(p)

if !isbounded(X)
Expand Down

0 comments on commit 0ca3986

Please sign in to comment.