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

Document fast powers in IA #194

Open
mforets opened this issue May 21, 2020 · 0 comments
Open

Document fast powers in IA #194

mforets opened this issue May 21, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@mforets
Copy link
Member

mforets commented May 21, 2020

Using the nonrecursive_powers branch from IntervalArithmetic gives a nice speedup; we should document it (if possible make it our default choice, see JuliaIntervals/IntervalArithmetic.jl#355).

cc: @dpsanders


Examples:

1) Lotka-Volterra with tangential crossing (showing only the computation of the first flowpipe):

# using IntervalArithmetic#master
   2.117550 seconds (11.04 M allocations: 628.267 MiB, 5.26% gc time) 

# using IntervalArithmetic#nonrecursive_powers
  1.102706 seconds (8.08 M allocations: 494.141 MiB, 9.57% gc time) 

2) Production-Destruction with uncertain IC

using IntervalArithmetic#master

@time sol1 = solve(prob, tspan=(0.0, 100.0), alg=TMJets(orderT=7, orderQ=1, abs_tol=1e-12));
  3.883992 seconds (47.52 M allocations: 2.808 GiB, 19.66% gc time)
tspan(X) = [99.1936, 100]
X ⊆ positive_orthant = true
volume(H) = 4.363464432248047e-20
10 ∈ sum(B) = true
true

using IntervalArithmetic#nonrecursive_powers

# using IntervalArithmetic#nonrecursive_powers
  1.788210 seconds (38.75 M allocations: 2.435 GiB, 24.66% gc time)
tspan(X) = [99.2048, 100]
X ⊆ positive_orthant = true
volume(H) = 3.7004693455099e-20
10 ∈ sum(B) = true
true

I would have expected the opposite, but the volume is actually a bit smaller.

(*) In the "new" results (those with nonrecursive_powers branch) i also moved to TaylorModels#master, while i can't assure i was indeed running the latest version previously, or i was missing the optimization from this PR.

3) Production-Destruction with uncertain IC and uncertain parameters

using IntervalArithmetic#master

@time sol2 = solve(prob, tspan=(0.0, 100.0), alg=TMJets(orderT=7, orderQ=1, adaptive=true, abs_tol=1e-12));
  4.935956 seconds (85.01 M allocations: 5.131 GiB, 23.47% gc time)
tspan(X) = [99.5369, 100]
X ⊆ positive_orthant = true
volume(H) = 6.6200725506016844e-21
10 ∈ sum(B) = true
true

using IntervalArithmetic#nonrecursive_powers

# using IntervalArithmetic#nonrecursive_powers
  3.480925 seconds (76.07 M allocations: 4.832 GiB, 26.65% gc time)
tspan(X) = [99.9736, 100]
X ⊆ positive_orthant = true
volume(H) = 6.570202463333817e-21
10 ∈ sum(B) = true

4) Quadcopter (width 0.8)

# using IntervalArithmetic#master
 2.917486 seconds (41.88 M allocations: 2.539 GiB, 23.41% gc time)
# using IntervalArithmetic#nonrecursive_powers
  1.279259 seconds (29.45 M allocations: 2.044 GiB, 27.38% gc time)
@mforets mforets added the documentation Improvements or additions to documentation label May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant